Learn R Programming

⚠️There's a newer version (3.2-0) of this package.Take me there.

The code in this repository is the development version for the code in R-package GGIR on CRAN

Getting started:

The package vignette and this short tutorial video provide an introduction to GGIR, including: How it can be installed, Key software features, and where to get help.

Contribution guidelines:

We always welcome contributions to the package.

When you are familiar with GitHub:

We work with GitHub Flow branching model.

Key steps:

  1. Create a GitHub issue in this repository with description of the work that you plan to do.
  2. Assign yourself to the GitHub issue you are working on, to inform other developers that you are working on it.
  3. Create your own working branch or fork.
  4. Make your changes in that branch or fork.
  5. Commit your changes to your working branch/fork as long as you are not finished with your development.
  6. Make sure the release notes in NEWS.Rd are updated.
  7. Add your name to the contributors list in the DESCRIPTION file.
  8. Run the tests and checks as CRAN, make sure they pass.
  9. Once your work is finished, make a pull request, such that another developer can review your changes before merging them with the master branch.

When you are unfamiliar with GitHub:

If you would like to propose additional functionalities or report an issue. Go to issues and create a new issue.

If you would like to propose changes to the text of the manual this is possible.

  1. Please go to the man folder which holds all the parts of the manual.
  2. Go to the part of the manual you want to edit and click on edit button (little pencil symbol) and make your changes.
  3. Once you are finished, scroll down and describe you update and select the radio button "Create a new branch for this commit and start a pull request". One of the developers will then be able to review your changes and merge them in the master version of the code.
  4. Click the green button "Propose file changes"

Copy Link

Version

Install

install.packages('GGIR')

Monthly Downloads

1,775

Version

1.8-1

License

LGPL (>= 2.0, < 3) | file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Vincent T van Hees

Last Published

January 11th, 2019

Functions in GGIR (1.8-1)

g.analyse

create_test_acc_csv

Creates csv data file for testing purposes
g.binread

function to read binary files as produced by the accelerometer named 'Genea', not to be confused with the 'GENEActiv' (see package GENEAread for this)
g.calibrate

function to estimate calibration error and make recommendation for addressing it
getFirstTimestamp

Extract first timestamp from GENEActiv file
g.getmeta

function to extract meta-data (features) from data in accelerometer file
g.plot

function to generate a plot for quality check purposes
g.getstarttime

Extract start time of a measurement
g.plot5

Generate user-friendly visual report
g.dotorcomma

Assesses whether decimals in fileheader are stored with comma or dot separated decimals
g.downsample

Downsample a vector of numeric values at three time resolutions
g.intensitygradient

Intensity gradient calculation
g.wavread

function to read .wav files as produced by the accelerometer named 'Axivity'
g.metric

Extract metrics from acceleration signals
g.loadlog

Load and clean sleeplog information
g.weardec

Detects whether accelerometer is worn
g.getbout

function to calculate bouts from vector of binary classes
g.part1

function to load and pre-process acceleration files
g.applymetrics

Extract metrics from acceleration signals
g.cwaread

Function to read .cwa-format files as produced by the accelerometer named 'Axivity'
g.report.part4

g.getidfromheaderobject

Extracts participant identifier from header object
g.impute

function to identify invalid periods in the meta-data as generated by g.getmeta and to impute these invalid periods with the average of similar timepoints on other days of the measurement
g.inspectfile

function to inspect accelerometer file for brand, sample frequency and header
g.detecmidnight

Detect all midnights in a time series
g.part2

g.part4

Labels detected sustained inactivity periods by g.part3 as either nocturnal sleep or daytime sustained inactivity
getStartEnd

Generate start and end time of a day
g.report.part5

g.part3

Detection of sustained inactivity periods as needed for sleep detection in g.part4.
identify_levels

Identifies levels of behaviour for g.part5 function.
is.ISO8601

Check whether character timestamp is in iso8601 format.
g.part5

Merge output from physical activity and sleep analysis into one report
numUnpack

Simple function using Rcpp
iso8601chartime2POSIX

Convert iso8601 timestamps to POSIX timestamp
g.sib.plot

Create plot of sustained inactivity bouts
g.sib.sum

sustiained inactivty bouts detection
g.create.sp.mat

Converts sleep period information. Not intended for direct use
g.createcoordinates

g.shell.GGIR

Shell function for analysing an accelerometer dataset.
is_this_a_dst_night

Check whether the night starting on a calendar date has DST.
g.sib.det

sustiained inactivty bouts detection
isfilelist

Checks whether datadir is a directory or a vector with filenames
getStartEndNumeric

Generate start and end page of a day
getfolderstructure

Extracts folderstructure based on data directory.
g.extractheadervars

Extracts header variables from header object
g.getM5L5

Extract M5 and L5 from time series
g.readaccfile

Generic functiont to read large blocks of accelerometer data
updateBlocksize

Update blocksize of data to be read depending on available memory.
g.report.part2

resample

Simple function using Rcpp
GGIR-package

A package to process multi-day raw accelerometer data
datadir2fnames

Generates vector of file names out of datadir input argument
g.abr.day.names

POSIXtime2iso8601

Convert POSIX to iso8601 timestamp
create_test_sleeplog_csv

Creates csv sleeplog file for testing purposes
data.calibrate

Example output from g.calibrate
data.getmeta

Example output from g.getmeta
data.inspectfile

Example output from g.inspectfile
chartime2iso8601

Convert character timestamps to iso8601 timestamp