Convert Actigraphy data.frame to a SummarizedExperiment
Source:R/actigraphy_to_SE.R
actigraphy_df_to_SummarizedExperiment.Rd
Convert Actigraphy data.frame to a SummarizedExperiment
Usage
actigraphy_df_to_SummarizedExperiment(
x,
path_column = "file",
measure = NULL,
assay_name = measure,
rowData = NULL,
...,
verbose = TRUE,
metadata = list()
)
Arguments
- x
An optional `data.frame` describing the samples/participants.
- path_column
column in `x` that is the paths to the file names of the data. Can also be a list column of `x` where this column are the images
- measure
measure to grab to create an assay. If
NULL
, then every measure that is not the columntime
- assay_name
Name of the `assay` in the
SummarizedExperiment
- rowData
row data to pass to
SummarizedExperiment
- ...
additional arguments to pass to
summarize_actigraphy
- verbose
print diagnostic messages
- metadata
metadata passed to
SummarizedExperiment
Examples
# \donttest{
file = system.file("extdata",
"TAS1H30182785_2019-09-17.gt3x",
package = "SummarizedActigraphy")
files = rep(file, 2)
df = data.frame(file = files,
age = stats::rpois(length(files), 50),
stringsAsFactors = FALSE)
se = actigraphy_df_to_SummarizedExperiment(df, "file")
#> Running Daily Actigraphy
#> Getting the First Day
#> Summarizing Data
#> Running Daily Actigraphy
#> Getting the First Day
#> Summarizing Data
# }
if (FALSE) { # \dontrun{
df$file = factor(df$file)
se = actigraphy_df_to_SummarizedExperiment(df, "file", measure = "AI_mean")
} # }