Skip to content

Commit

Permalink
improve function documentation
Browse files Browse the repository at this point in the history
- add function documentation for signalNoiseRation
- improve load_and_tidy_up_GPS function documentation
- update changelog
  • Loading branch information
vincentvanhees committed Mar 5, 2024
1 parent b823a0c commit d0c4d6d
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 2 deletions.
6 changes: 6 additions & 0 deletions inst/NEWS.Rd
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
\name{NEWS}
\title{News for Package \pkg{GGIRread}}
\newcommand{\cpkg}{\href{http://CRAN.R-project.org/package=#1}{\pkg{#1}}}
\section{Changes in version 0.0.5 (release date:05-03-2024)}{
\itemize{
\item More formats for GPS satillitate info now supported, see #12
\item Add documentation for GPS csv file format
}
}
\section{Changes in version 0.0.4 (release date:28-09-2023)}{
\itemize{
\item Handle absence of activity bouts
Expand Down
2 changes: 1 addition & 1 deletion man/hbGPS.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
\arguments{
\item{gps_file}{
Path to GPS file in .csv format
Path to GPS file in .csv format. For details on format see \link{load_and_tidy_up_GPS}
}
\item{GGIRpath}{
Path to GGIR time series ouput folder (ms5.outraw)
Expand Down
12 changes: 11 additions & 1 deletion man/load_and_tidy_up_GPS.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}
\arguments{
\item{gps_file}{
Path to GPS file in .csv format
Path to GPS file in .csv format, see details for format.
}
\item{idloc}{
Number to indicato id location in file name (same as GGIR)
Expand All @@ -24,6 +24,16 @@
See \link{hbGPS}
}
}
\details{
The code ignores letter case when reading column names. The GPS csv file is
expected to have the following column names: latitude or lat; longitude or lon;
nat(used/view) or nat (used/view) where the value format can be
3 (2), 3(2), 3/2, 3 / 2; a column with at least the character string "sat info "
where the valueformat can be "(1-1-1-10);(1-1-1-10)" or "#1-1-1-10;#1-1-1-10" where
the number values per substring does not have to be 4 but the last value is always assumed
to reflect SNR; a column name height(m); a column named speed(km/h);
a column local data or just date, and; a column local time or just time.
}
\value{
List with a data.frame df that holds the GPS time series
and ID a scalar to hold the ID of the participant.
Expand Down
21 changes: 21 additions & 0 deletions man/signalNoiseRatio.Rd
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
\name{signalNoiseRatio}
\alias{signalNoiseRatio}
\title{
Derive signal to noise ratios
}
\description{
Derive signal to noise ratios from GPS data
}
\usage{
signalNoiseRatio(df)
}
\arguments{
\item{df}{
Data,frane as genated by \link{load_and_tidy_up_GPS}
}
}
\value{
List with a data.frame df that holds the GPS time series,
Boolean snr_available and snr_ratio_available to indicate whether
the two signal to noise ratios are available.
}

0 comments on commit d0c4d6d

Please sign in to comment.