Skip to content
Prev 261934 / 398506 Next

How to convert a factor column into a numeric one?

Thanks for your help.

As far as your question below is concerned, the data frame arose as a 
result of some data cleaning on an original data frame, which was 
changed into a table, modified, and changed back to a data frame:

ttcrmean<- as.table(by(ngbe[,'Log10'], 
list(Time=ngbe$Time,Temp=ngbe$Temp,Conc=ngbe$Conc,Repl=ngbe$Replicate),
   mean))
for (k in 1:3) {  #fix-up time zeroes
   for (l in 1:5) { #replicates
     t0val<- ttcrmean[1,3,k,l]
     for (j in 1:4) {  #temps
       ttcrmean[1,j,k,l]<- t0val
     } #j
   } #l
} #i
df<- na.omit(as.data.frame(ttcrmean))
colnames(df)[5]<- 'Log10'
At 12:51 AM 6/5/2011, Joshua Wiley wrote:
================================================================
Robert A. LaBudde, PhD, PAS, Dpl. ACAFS  e-mail: ral at lcfltd.com
Least Cost Formulations, Ltd.            URL: http://lcfltd.com/
824 Timberlake Drive                     Tel: 757-467-0954
Virginia Beach, VA 23464-3239            Fax: 757-467-2947

"Vere scire est per causas scire"