Description Usage Arguments Value See Also Examples
View source: R/bloodpress-functions.R
functions that given a data.frame and columns selection in argument 'cols' using tidy selectors, will calculate the mean
1 | bloodpress_mean(data, cols, na.rm = TRUE)
|
data |
data frame |
cols |
columns selected with tidy selectors |
na.rm |
logical. Should missing values (including NaN) be omitted from the calculations? |
numeric vector with mean
Other blood pressure functions:
bloodpress_map()
1 2 3 4 5 6 7 8 9 | dt <- data.frame(
BloodPress_Diastolic_1 = c(80,32,66,NA),
BloodPress_Diastolic_2 = c(58,45,NA,99),
BloodPress_Systolic_1 = c(40,NA,80,120),
BloodPress_Systolic_2 = c(NA, 65,45,100)
)
bloodpress_mean(dt, dplyr::contains("Diastolic"))
bloodpress_mean(dt, dplyr::contains("Systolic"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.