load_data | R Documentation |
R function to read biosensors data from a csv files.
load_data(filename_fdata, filename_variables = NULL)
filename_fdata |
A csv file with the functional data. The csv file must have long format with, at least, the following three columns: id, time, and value, where the id identifies the individual, the time indicates the moment in which the data was captured, and the value is a monitor measure. |
filename_variables |
A csv file with the clinical variables. The csv file contains a row per individual and must have a column id identifying this individual. |
A biosensor object:
data
A data frame with biosensor raw data.
densities
A functional data object (fdata) with a non-parametric density estimation.
quantiles
A functional data object (fdata) with the empirical quantile estimation.
variables
A data frame with the covariates.
# Data extracted from the paper: Hall, H., Perelman, D., Breschi, A., Limcaoco, P., Kellogg, R., # McLaughlin, T., Snyder, M., Glucotypes reveal new patterns of glucose dysregulation, PLoS # biology 16(7), 2018. file1 = system.file("extdata", "data_1.csv", package = "biosensors.usc") file2 = system.file("extdata", "variables_1.csv", package = "biosensors.usc") data = load_data(file1, file2) names(data) head(data$quantiles) head(data$variables) plot(data$quantiles, main="Quantile curves")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.