-8

There seems to be a limit to number of items that can be included in c() function in R (100 items). Is there any way to evade this limitation? Thanks in advance.

1 Answers1

4

There is a limit, but it is a limit of vector length, not a limitation of c:

length(eval(call('c', 1:(2^31-1))))
## [1] 2147483647

length(eval(call('c', 1:(2^31))))
## Error in 1:(2^31) : result would be too long a vector
Matthew Lundberg
  • 41,139
  • 6
  • 86
  • 109