On 05/08/2013 01:38 PM, Alannah wrote:
Hi there, I am reading into R a dataset with 30 variables. It is in csv file
format but have also tried txt. While my dataset loads without warning, when
I tried to use Geomorph package (my dataset is from a 3D model) I get a
warning that is.atomic(x) is not true. I understand this is a broad problem
with my dataset now being read as numbers. Thus, is.numeric comes back
FALSE.
How do I fix this problem so my numeric dataset is read as numeric?
Hi Alannah,
The "str" function might be helpful. Say your dataset is named
"alannahdat". "str" will tell you what is in the dataset:
str(alannahdat)
The output is a listing of the components with information about the
"class" of each. If you see that one or more components of the dataset
are not what you expect, you can then trace them back into your CSV data
file to see what is going wrong. Often a single typographic error in a
numeric field will cause the entire field to be read as a factor rather
than numeric.
Jim
______________________________________________
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.