Re: [R] (no subject)

From: Joshua Wiley <jwiley.psych_at_gmail.com>
Date: Fri, 11 Mar 2011 08:56:27 -0800

Hi Andreas,

Assuming you are using read.table(), try setting the argument: stringsAsFactors = FALSE

Also consider what about the Excel file is making R default to a factor rather than numerical? There may be a nonstandard reprsentation of missing data (e.g., "."), which could also be specified to read.table()

For more info, see the documentation for ?read.table

HTH, Josh

On Fri, Mar 11, 2011 at 7:45 AM, Andreas Emanuelsson <Andreas.Emanuelsson_at_sik.se> wrote:
> Hi, I have tried to load a file originally from Excel, via csv, text and clipboard today.
>
> When I succeed I cannot change the format from "factor", and when I try to convert it to numerical it only gives the position of the "factor-group", not the real value in the column?
>
> Any quick suggestions?
>
> Andreas
>
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help_at_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.
>

-- 
Joshua Wiley
Ph.D. Student, Health Psychology
University of California, Los Angeles
http://www.joshuawiley.com/

______________________________________________
R-help_at_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.
Received on Fri 11 Mar 2011 - 17:09:36 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 11 Mar 2011 - 17:10:20 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive