read_acc_csv | R Documentation |
Read ActiGraph Accelerometer CSV
read_acc_csv(file, ..., only_xyz = TRUE)
extract_acc_header(file)
file |
CSV file to read in |
... |
additional arguments to pass to |
only_xyz |
should the data be subset for only X/Y/Z values (and time)? |
A list of the header and the data set
file = system.file("extdata", "TAS1H30182785_2019-09-17.csv.gz",
package = "SummarizedActigraphy")
if (file.exists(file)) {
out = read_acc_csv(file)
SummarizedActigraphy:::parse_acc_header(file)
}
file = system.file("extdata", "example1sec.csv", package = "AGread")
if (file.exists(file)) {
out = read_acc_csv(file, only_xyz = FALSE)
SummarizedActigraphy:::quick_check(out$data)
acc = out
class(acc) = "AccData"
SummarizedActigraphy:::quick_check(acc)
}
file = system.file("extdata", "721431sec.csv.gz",
package = "SummarizedActigraphy")
if (file.exists(file)) {
out = read_acc_csv(file, only_xyz = FALSE)
cn = colnames(out$data)
names(cn) = cn
cn[c("X1", "X2", "X3", "X4")] = c("Axis1", "Axis2", "Axis3", "Steps")
colnames(out$data) = cn
acc = out
class(acc) = "AccData"
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.