Re: [R] max length of a factor variable

2013-05-17 Thread bennose
Technically this is correct for raw R functionality. in practice various modules impose their own limits on variables so you have to check. For example the coxreg package truncates all variables to 16 characters. for example the test below res Call: coxreg(formula = Surv(vtime, vstatus) ~

Re: [R] max length of a factor variable

2010-09-28 Thread Richard Mott
Thanks I eventually tracked down the problem to something unrelated to this question (one out of the millions of character strings happened to be NA by chance, which of course was parsed as a missing value, breaking the code a long way downstream.) Richard On 28/09/2010 04:01, Michael

Re: [R] max length of a factor variable

2010-09-27 Thread Michael Bedward
Hello Richard, Since no one else has answered yet I'll venture a guess. The following works on my little macbook... x - as.factor(sapply(letters[1:26], function(x) paste(rep(x, 10), collapse=))) So each of the 26 factor levels in x has a string representation of 100,000 chars. So I'm

Re: [R] max length of a factor variable

2010-09-27 Thread jim holtman
You have provided no information as to what you mean by my analysis fails. Exactly what error message are you getting, what operation system do you have, how much memory do you have, how much are you using for all the other objects in your address space, etc.. Information like this would help