get_mean_sd_age {packDAMipd}R Documentation

Function to return mean age from a data frame

Description

Function to return mean age from a data frame

Usage

get_mean_sd_age(this_data, age_nrcode)

Arguments

this_data

the data containing column with age

age_nrcode

non response code

Details

Age data is complete with the nr code given and get the mean and sd

Value

mean and sd, if success -1, if failure

Examples

this_data <- as.data.frame(cbind(num = c(1, 2, 3, 4),
age = c(14, 25, 26, 30)))
get_mean_sd_age(this_data, NA)

[Package packDAMipd version 1.1.0 Index]