summary_glu | R Documentation |
The function 'summary_glu' is a wrapper for the base function 'summary()'. Output is a tibble object with subject id and the summary value: Minimum, 1st Quantile, Median, Mean, 3rd Quantile and Max.
summary_glu(data)
data |
DataFrame object with column names "id", "time", and "gl", or numeric vector of glucose values. |
A tibble object with 1 row for each subject, a column for subject id and a column for each of summary values is returned. 'NA' glucose values are omitted from the calculation of the summary values.
If a DataFrame object is passed, then a tibble object with a column for subject id and then a column for each summary value is returned. If a vector of glucose values is passed, then a tibble object without the subject id is returned. 'as.numeric()' can be wrapped around the latter to output a numeric vector with values in order of Min, 1st Quantile, Median, Mean, 3rd Quantile and Max.
data(example_data_1_subject)
summary_glu(example_data_1_subject)
data(example_data_5_subject)
summary_glu(example_data_5_subject)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.