[R] How to modify function for list

Chung-hong Chan chainsawtiney at gmail.com
Wed Oct 3 09:12:00 CEST 2007


Yes, I tried. Wrong calculation.


On 10/3/07, Stefan Grosse <singularitaet at gmx.net> wrote:
> On Wednesday 03 October 2007 08:23:15 Chung-hong Chan wrote:
> CC >
> CC > Suppose I have a long list of age, gender and bmi from a data.frame
> CC > called msltdata.
> CC >
> CC > > age <- msltdata$age
> CC > > gender <- msltdata$data
> CC > > bmi <-msltdata$bmi
> CC > > age
> CC > [1]  5 10 14
> CC > > gender
> CC > [1] 0 0 0
> CC > Levels: 0 1
> CC > > bmi
> CC > [1] 17.17693 16.40702 16.87695
> CC > > mapply(bmisds,age,gender,bmi)
>
> have you tried
> bmisds(msltdata$age,msltdata$data,msltdata$bmi)
> ?
>


-- 
CH Chan
Research Assistant - KWH
http://www.macgrass.com



More information about the R-help mailing list