Dear R-Help
I am running apply on a data.frame containing factors and numeric
columns. It appears to convert are columns into as.character? Does it
convert data.frame into matrix? Is this expected? I wish it to recognise
numerical columns and round numbers. Can I use another function instead
On Fri, 13 Apr 2007, aedin culhane wrote:
Dear R-Help
I am running apply on a data.frame containing factors and numeric
columns. It appears to convert are columns into as.character? Does it
convert data.frame into matrix? Is this expected? I wish it to recognise
Yes, and quite explicit on
?apply says
If X is not an array but has a dimension attribute, apply attempts to coerce
it to an array via as.matrix if it is two-dimensional (e.g., data frames). .
.
It would probably be easiest with a FOR-LOOP, but you could also try
something like the code below (and insert your operations
aedin culhane [EMAIL PROTECTED] writes:
Dear R-Help
I am running apply on a data.frame containing factors and numeric
columns. It appears to convert are columns into as.character? Does it
convert data.frame into matrix? Is this expected? I wish it to recognise
numerical columns and round