[R] weird "vector size cannot be NA/NaN" problem

Werner Wernersen pensterfuzzer at yahoo.de
Wed Sep 9 17:11:32 CEST 2009


Hi,

I have a weird problem with my data but I cannot really locate it and cannot make a small example data set do reproduce the problem.
I basically divide one numerical column of a data frame with another. When I run describe() on that column, I get
"Error in vector("integer", length) : vector size cannot be NA/NaN"

The two original columns comprise many zero values and I think the particular row which causes the problem ends up with an "Inf". 

I fear that other functions might also not be reliable for this data and that I have to repair it somehow. It actually happens with many of the variables from the various tables which originally are in Stata .dta format and which I import with the foreign library.

I am working on windows XP and R 2.9.1

I assume that this description is too vague but if anybody has an idea, I would appreciate it.

Thanks so much,
  Werner







More information about the R-help mailing list