Skip to content

Commit

Permalink
clarify unit of timestamps in read.myacc.csv output
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentvanhees committed Dec 11, 2024
1 parent 72d4c2b commit b32d540
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 3 additions & 2 deletions man/read.myacc.csv.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,9 @@
except rmc.file, rmc.nrow, and rmc.skip as input for function \link{GGIR} or \link{g.part1} and also specify argument rmc.noise, which is not part of this function but needed to tell GGIR what noise level to expect in the data. The rmc.noise is taken from the params_rawdata object if not explicitly specified by user.
}
\value{
List with objects data holding the time series of acceleration, and
header if it was available in the orignal file.
List with objects data holding the time series of acceleration with among others
a column named "time" that holds the time expressed in seconds since 1-1-1970, and
header if a header was present in the input file.
}
\examples{

Expand Down
5 changes: 4 additions & 1 deletion vignettes/readmyacccsv.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ Before we can use this with GGIR, we first test read this file using the `read.m

```{R,eval=FALSE}
library(GGIR)
read.myacc.csv(rmc.file = "C:/mystudy/mydata/datafile.csv",
data = read.myacc.csv(rmc.file = "C:/mystudy/mydata/datafile.csv",
rmc.nrow = Inf,
rmc.skip = 0,
rmc.dec = ".",
Expand All @@ -132,6 +132,9 @@ read.myacc.csv(rmc.file = "C:/mystudy/mydata/datafile.csv",
rmc.sf = 100)
```

The object data is a list with a data.frame name data and a header.
The time column in the data.frame represents timestamps expressed in seconds since 1-1-1970.

## Example using the shell function

If the `rmc.firstrow.acc` argument is defined within the `GGIR` function, then the data will be read through `read.myacc.csv`. GGIR needs the user to specify in which row starts the accelerometer data within the csv, so this argument must be always explicitly specified by the user. Thus, a call to the `GGIR` including the rmc arguments would look as follows (note that the `rmc.file`, `rmc.nrow`, and `rmc.skip` arguments will not be used by `GGIR` as these arguments are already defined by `datadir`, `strategy`, and [header](#header) arguments, respectively).
Expand Down

0 comments on commit b32d540

Please sign in to comment.