I know the following is documented behaviour, in the sense that the help page for as.character mentions that it truncates at about 500 characters... but wouldn't it be better if there was a warning of some sort issued? Or am I misunderstanding what's happening here?

> str <- sample(LETTERS,301, replace=TRUE)
> search.list <- list(str[-301],str)
> item <- list(str)                        # == search.list[2]
> match(item, search.list)
[1] 1
> item <- list(str[1:299])
> match(item, search.list)
[1] 1
> item <- list(str[1:29])
> match(item, search.list)
[1] NA
> version$version.string
[1] "R version 2.7.1 (2008-06-23)"

Thanks.



-Eric Weese
PhD candidate, Economics
MIT

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to