Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting up to date with Sage - Bionetworks Develop #24

Merged
merged 7 commits into from
Jan 29, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
105 changes: 104 additions & 1 deletion R/data.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,109 @@
#' @source \url{https://www.synapse.org/#!Synapse:syn10146135/wiki/448409}
"guanlab_nn_weights"

#' Accelerometer sensor measurements
#'
#' @format An 990 x 4 data frame with column names \code{t}, \code{x},
#' \code{y}, \code{z} containing accelerometer measurements. \code{t} is
#' the timestamp of each measurement, and \code{x}, \code{y} and \code{z}
#' are linear acceleration measurements along the respective axis.
"accelerometer_data"

#' Gyroscope sensor measurements
#'
#' @format An 990 x 4 data frame with column names \code{t}, \code{x},
#' \code{y}, \code{z} containing accelerometer measurements. \code{t} is
#' the timestamp of each measurement, and \code{x}, \code{y} and \code{z}
#' are linear velocity measurements along the respective axis.
"gyroscope_data"

#' Gravity sensor measurements
#'
#' @format An 990 x 4 data frame with column names \code{t}, \code{x},
#' \code{y}, \code{z} containing acceleration measurements due to gravity.
#' \code{t} is the timestamp of each measurement, and \code{x}, \code{y}
#' and \code{z} are linear gravity measurements along the respective axis.
"gravity_data"

#' Device-Motion data from a performed balance assay
#'
#' The balance assay entails participants standing still for 30 seconds
#' with the mobile device in their pocket or in a bag.
#'
#' @format A 3002 x 6 data frame with column names \code{attitude},
#' \code{timestamp}, \code{rotationRate}, \code{userAcceleration},
#' \code{gravity}, and \code{magneticField}. The column names correspond
#' to the measurements returned by a
#' [CMDeviceMotion](https://developer.apple.com/documentation/coremotion/cmdevicemotion)
#' object as described in Apple's developer documentation. \code{rotationRate},
#' \code{userAcceleration},\code{gravity} are each 3002 x 3 data frames with column names
#' \code{x}, \code{y}, \code{z} containing axial measurements for their respective sensor.
#' \code{magneticField} has an additional column \code{accuracy} specifying
#' the calibration accuracy of the magnetic field estimate. \code{attitude}
#' columns are quaternion coefficients.
"balance_data"

#' Device-Motion data from a performed walk assay
#'
#' The walk assay entails participants walking in a straight line for
#' approximately 20 steps with the mobile device in their pocket or in a bag.
#'
#' @format A 3002 x 6 data frame with column names \code{attitude},
#' \code{timestamp}, \code{rotationRate}, \code{userAcceleration},
#' \code{gravity}, and \code{magneticField}. The column names correspond
#' to the measurements returned by a
#' [CMDeviceMotion](https://developer.apple.com/documentation/coremotion/cmdevicemotion)
#' object as described in Apple's developer documentation. \code{rotationRate},
#' \code{userAcceleration},\code{gravity} are each 3002 x 3 data frames with column names
#' \code{x}, \code{y}, \code{z} containing axial measurements for their respective sensor.
#' \code{magneticField} has an additional column \code{accuracy} specifying
#' the calibration accuracy of the magnetic field estimate. \code{attitude}
#' columns are quaternion coefficients.
"walk_data"

#' Device-Motion data from a performed resting tremor assay
#'
#' The resting tremor assay entails participants holding the mobile device
#' in their hand (either right or left) while resting that hand in their lap
#' for approximately 10 seconds.
#'
#' @format A 3002 x 6 data frame with column names \code{attitude},
#' \code{timestamp}, \code{rotationRate}, \code{userAcceleration},
#' \code{gravity}, and \code{magneticField}. The column names correspond
#' to the measurements returned by a
#' [CMDeviceMotion](https://developer.apple.com/documentation/coremotion/cmdevicemotion)
#' object as described in Apple's developer documentation. \code{rotationRate},
#' \code{userAcceleration},\code{gravity} are each 3002 x 3 data frames with column names
#' \code{x}, \code{y}, \code{z} containing axial measurements for their respective sensor.
#' \code{magneticField} has an additional column \code{accuracy} specifying
#' the calibration accuracy of the magnetic field estimate. \code{attitude}
#' columns are quaternion coefficients.
"rest_tremor_data"

#' Device-Motion data from a performed kinetic tremor assay
#'
#' The kinetic tremor assay (also known as the finger/hand to nose test)
#' entails participants holding the mobile device
#' in their hand (either right or left) with both the mobile device and the
#' participants elbow at nose level. The participant then moves the mobile device
#' away from the nose, with both mobile device and elbow parallel to the ground
#' and the elbow joint acting as an axis of rotation. When the arm is fully extended,
#' the participant moves the mobile device back to the nose. This happens in a
#' continuous motion and the motion is repeated for approximately 10 seconds.
#'
#' @format A 3002 x 6 data frame with column names \code{attitude},
#' \code{timestamp}, \code{rotationRate}, \code{userAcceleration},
#' \code{gravity}, and \code{magneticField}. The column names correspond
#' to the measurements returned by a
#' [CMDeviceMotion](https://developer.apple.com/documentation/coremotion/cmdevicemotion)
#' object as described in Apple's developer documentation. \code{rotationRate},
#' \code{userAcceleration},\code{gravity} are each 3002 x 3 data frames with column names
#' \code{x}, \code{y}, \code{z} containing axial measurements for their respective sensor.
#' \code{magneticField} has an additional column \code{accuracy} specifying
#' the calibration accuracy of the magnetic field estimate. \code{attitude}
#' columns are quaternion coefficients.
"kinetic_tremor_data"

#' Sample heartrate data from a smartphone camera
#'
#' A dataframe containing sample JSON output format of the heartrate data,
Expand Down Expand Up @@ -50,4 +153,4 @@
#' 'TappedButtonNone' indicating that at that time the left, right or No
#' button was tapped respectively}
#' }
"tap_data"
"tap_data"
7 changes: 4 additions & 3 deletions R/get_balance_features.R
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
#' Preprocess and extract interpretable features from balance assay.
#'
#' A convenience wrapper for extracting
#' interpretable features from the balance assay measured using smartphone raw
#' accelerometer and gyroscope sensors.
#' A convenience wrapper for extracting interpretable features from the
#' balance assay measured using smartphone raw accelerometer and gyroscope
#' sensors.The balance assay entails participants standing still for 30 seconds
#' with the mobile device in their pocket or in a bag.
#'
#' @param accelerometer_data An \code{n} x 4 data frame with columns \code{t}, \code{x},
#' \code{y}, \code{z} containing accelerometer measurements. Here \code{n} is the
Expand Down
9 changes: 9 additions & 0 deletions R/get_kinetic_tremor_features.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@
#' kinetic tremor assay measured using smartphone raw accelerometer
#' and gyroscope sensors.
#'
#' The kinetic tremor assay (also known as the finger/hand to nose test)
#' entails participants holding the mobile device
#' in their hand (either right or left) with both the mobile device and the
#' participants elbow at nose level. The participant then moves the mobile device
#' away from the nose, with both mobile device and elbow parallel to the ground
#' and the elbow joint acting as an axis of rotation. When the arm is fully extended,
#' the participant moves the mobile device back to the nose. This happens in a
#' continuous motion and the motion is repeated for approximately 10 seconds.
#'
#' @param accelerometer_data An \code{n} x 4 data frame with columns \code{t}, \code{x},
#' \code{y}, \code{z} containing accelerometer measurements. Here \code{n} is the
#' total number of measurements, \code{t} is the timestamp of each measurement, and
Expand Down
9 changes: 9 additions & 0 deletions R/get_tremor_features.R
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,15 @@
#' and postural tremor assays measured using smartphone raw accelerometer
#' and gyroscope sensors.
#'
#' The resting tremor assay entails participants holding the mobile device
#' in their hand (either right or left) while resting that hand in their lap
#' for approximately 10 seconds.
#'
#' The postural tremor assay entails participants holding the mobile device
#' in their hand (either right or left) while keeping their arm extended --
#' the arm parallel to the ground and perpindicular to the front of the body --
#' for approximately 10 seconds.
#'
#' @param accelerometer_data An \code{n} x 4 data frame with columns \code{t}, \code{x},
#' \code{y}, \code{z} containing accelerometer measurements. Here \code{n} is the
#' total number of measurements, \code{t} is the timestamp of each measurement, and
Expand Down
2 changes: 2 additions & 0 deletions R/get_walk_features.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#'
#' A convenience wrapper for extracting interpretable features from the
#' walk assay measured using smartphone raw accelerometer and gyroscope sensors.
#' The walk assay entails participants walking in a straight line for
#' approximately 20 steps with the mobile device in their pocket or in a bag.
#'
#' @param accelerometer_data An \code{n} x 4 data frame with columns \code{t}, \code{x},
#' \code{y}, \code{z} containing accelerometer measurements. Here \code{n} is the
Expand Down
17 changes: 17 additions & 0 deletions man/accelerometer_data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions man/balance_data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 4 additions & 3 deletions man/get_balance_features.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions man/get_kinetic_tremor_features.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 10 additions & 0 deletions man/get_tremor_features.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions man/get_walk_features.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions man/gravity_data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 17 additions & 0 deletions man/gyroscope_data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

31 changes: 31 additions & 0 deletions man/kinetic_tremor_data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

26 changes: 26 additions & 0 deletions man/rest_tremor_data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions man/walk_data.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading