get_mean_sd_age: Function to return mean age from a data frame

Description Usage Arguments Details Value Examples

View source: R/3b_outcome_analysis_functions.R

Description

Function to return mean age from a data frame

Usage

1
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

1
2
3
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)

packDAMipd documentation built on March 3, 2021, 5:07 p.m.