Arguments
- db
db A database connection, as created by
create_db().- sensor
A character vector of one or multiple vectors. Use
sensor = NULLfor all sensors. See sensors for a list of all available sensors.- participant_id
A character string identifying a single participant. Use
get_participants()to retrieve all participants from the database. Leave empty to get data for all participants.- start_date
Optional search window specifying date where to begin search. Must be convertible to date using
base::as.Date(). Usefirst_date()to find the date of the first entry for a participant.- end_date
Optional search window specifying date where to end search. Must be convertible to date using
base::as.Date(). Uselast_date()to find the date of the last entry for a participant.
Examples
if (FALSE) { # \dontrun{
# Open a database connection
db <- open_db("path/to/db")
# Get the number of rows for all sensors
get_nrows(db, sensor = NULL)
# Get the number of rows for the Accelerometer and Gyroscope sensors
get_nrows(db, c("Accelerometer", "Gyroscope"))
# Remember to close the connection
close_db(db)
} # }
