Learn R Programming

childsds (version 0.5)

sds.df,refs-method: calculates standard deviation scores according to a given reference and adds the respective column

Description

calculates standard deviation scores according to a given reference and adds the respective column

Usage

"sds.df"(object, df, item, value = "value", age = "age", sex = "sex", male = 0, female = 1)

Arguments

object
refs object
df
dataframe
item
reference contained in object
sex
name of the column containing sex
age
name of the column containing age
value
name of the column containing numeric value which should transform into SDscore
male
coding for male
female
coding for female

Examples

Run this code
data(who.ref)
x <- data.frame(height=c(50,100,60,54),
                sex=c("m","f","f","m"),
                age=c(0,2.9,0.6,0.2))
sds.df(who.ref,df=x,item="height",value="height",sex="sex",age="age",male="m",female="f")

Run the code above in your browser using DataLab