Learn R Programming

stepcount (version 0.3.2)

sc_read: Read a Data Set for stepcount

Description

Read a Data Set for stepcount

Usage

sc_read(
  file,
  sample_rate = NULL,
  resample_hz = "uniform",
  verbose = TRUE,
  keep_pandas = FALSE
)

Value

A list of the data and information about the data

Arguments

file

path to the file for reading

sample_rate

the sample rate of the data. Set to NULL for stepcount to try to guess this

resample_hz

Target frequency (Hz) to resample the signal. If "uniform", use the implied frequency (use this option to fix any device sampling errors). Pass NULL to disable. Defaults to "uniform".

verbose

print diagnostic messages

keep_pandas

do not convert the data to a data.frame and keep as a pandas data.frame

Examples

Run this code

file = system.file("extdata/P30_wrist100.csv.gz", package = "stepcount")
if (stepcount_check()) {
  out = sc_read(file)
}
if (FALSE) {
  file = system.file("extdata/P30_wrist100.csv.gz", package = "stepcount")
  if (stepcount_check()) {
    out = sc_read(file, sample_rate = 100L)
  }
}

Run the code above in your browser using DataLab