Re: [R] help with as.numeric

2009-05-15 Thread Marc Schwartz
On May 15, 2009, at 6:57 AM, deanj2k wrote: hi everyone, wondering if you could help me with a novice problem. I have a data frame called subjects with a height and weight variable and want to calculate a bmi variable from the two. i have tried: attach(subjects) bmi <- (weight)/((height

Re: [R] help with as.numeric

2009-05-15 Thread Nutter, Benjamin
values, you need to do > as.numeric(as.character(height)) This will get you around the internal coding. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of deanj2k Sent: Friday, May 15, 2009 7:58 AM To: r-help@r-project.org Subject: [R

[R] help with as.numeric

2009-05-15 Thread deanj2k
hi everyone, wondering if you could help me with a novice problem. I have a data frame called subjects with a height and weight variable and want to calculate a bmi variable from the two. i have tried: attach(subjects) bmi <- (weight)/((height/100)^2) but it comes up with the error: Warning me