In this example, we’ll use the Age column from our final analysis dataframe. To calculate mean:
age_mean <- mean(analysis_data$Age, na.rm = TRUE)
To calculate standard deviation:
age_sd <- sd(analysis_data$demographAge, na.rm = TRUE)
To calculate range:
age_range <- range(analysis_data$Age, na.rm = TRUE)