Skip to content
Prev 359087 / 398503 Next

package FD

That code doesn't show what a$x IS, just what comes out after you force things. The fact that you felt compelled to apply those functions just makes it seem more likely that Jim is onto something. The output of

str( a$x )

would show what kind of data it is, and

dput( a$x )

would let us put the data column into our copy of R and guess about why it might not already be numeric, and

dput( a )

followed by your actual code that uses `a` would give us a possibility to reproduce your actual error.  At this point the cause of the problem seems likely to be in the original input data or the code that you are using to import and manipulate that data, which is where most questions like this seem to end up.