actigraphy_df_to_SummarizedExperiment: Convert Actigraphy data.frame to a SummarizedExperiment

View source: R/actigraphy_to_SE.R

actigraphy_df_to_SummarizedExperimentR Documentation

Convert Actigraphy data.frame to a SummarizedExperiment

Description

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 column time

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

Value

A SummarizedExperiment output

Examples


  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")

## Not run: 
  df$file = factor(df$file)
  se = actigraphy_df_to_SummarizedExperiment(df, "file", measure = "AI_mean")

## End(Not run)

muschellij2/SummarizedActigraphy documentation built on April 9, 2024, 8:32 a.m.