An example would be useful. Look at what is causing what you think
are numbers to be interpreted as character strings and therefore being
changed to numbers. For example, are there commas in the numbers, are
some missing and replaced by some character sequence that represents
missing values. You
Hi Sonia,
This suggests that those columns have something in them that is not
numeric (e.g., "." to represent missing data, text, etc.). You can
avoid them being converted to factor using:
read.csv("yourfile.csv", stringsAsFactors = FALSE)
however, they will still be character class, not numeri
Hi,
I'm using read.csv to import a table. But sevel columns are changed to
factor variables automatically. They are actually numbers not factor levels.
Why this happened? How can I get the correct table? Thanks a lot.
Sonia
[[alternative HTML version deleted]]
__
3 matches
Mail list logo