Skip to content
Back to formatted view

Raw Message

Message-ID: <16294.73463.qm@web32814.mail.mud.yahoo.com>
Date: 2007-12-04T14:48:47Z
From: John Kane
Subject: Dataframe manipulation
In-Reply-To: <47553007.7080003@yahoo.de>

See  R-FAQ # 7-11 for the solution.


Have a look at
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/98227.html
for a discussion of this type of problem and ways to
get around the issue.


--- Antje <niederlein-rstat at yahoo.de> wrote:

> Hello,
> 
> can anybody help me with this problem?
> I have a dataframe, which contains its values as
> factors though I have numbers 
> but it was read as factors with "scan". Now I would
> like to convert these 
> columns (multiple) to a numeric format.
> 
> 
> # this example creates a similar situation
> 
> testdata <- as.factor(c("1.1",NA,"2.3","5.5"))
> testdata2 <- as.factor(c("1.7","4.3","8.5",10.0))
> 
> df <- data.frame(testdata, testdata2)
> 
> what do I have to do to get the same datafram but
> with numeric values???
> 
> Antje
> 
> ______________________________________________
> 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.
>