Skip to contents

Write ActiGraph-like Accelerometer CSV

Usage

write_acc_csv(x, file = tempfile(fileext = ".csv.gz"))

Arguments

x

either an AccData or a data.frame of time and values.

file

CSV file to write out

Value

The character path of the output file.

Examples

file = system.file("extdata", "TAS1H30182785_2019-09-17.csv.gz",
package = "SummarizedActigraphy")
if (file.exists(file)) {
   x = read_acc_csv(file)
   outfile = write_acc_csv(x)
   out2 = read_acc_csv(outfile)
   all.equal(x$data, out2$data)
}
#> [1] TRUE