Skip to content

Commit 09e753c

Browse files
committed
Better documentation for read_image_data()
1 parent 4390946 commit 09e753c

File tree

2 files changed

+35
-20
lines changed

2 files changed

+35
-20
lines changed

R/image-data.R

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,23 @@
11
#' Read image data from a collection of csvs from TimeLapse
22
#'
3-
#' In addition to reading in the data, this function copies snow depth data
4-
#' from the timelapse photo for each day into the motion photos for that day,
5-
#' to facilitate analysis. It also does basic standardization of trigger mode values,
6-
#' creates numeric snow depth columns, and checks for the presence of a
7-
#' total_count_episode column, adding one if missing. If the data has separate
8-
#' Date and Time columns instead of a combined DateTime column,
9-
#' these will be reconciled into a single DateTime column. All column names are
10-
#' standardized to snake_case.
3+
#' This function reads in image data from a directory of csv files, or a
4+
#' character vector of csv file paths. It attempts to identify the appropriate
5+
#' TimeLapse template to use based on the file names, but a specific template
6+
#' can also be provided. The function does some basic standardization and
7+
#' cleaning of the data, and returns a data.frame with an "image_data" class
8+
#' and an attribute "template" with the name of the template used to read the data.
119
#'
12-
#' For wallow data, this also removes static images (both timelapse and motion activated),
13-
#' and only keeps the video records.
10+
#' In addition to reading in the data, this function also:
11+
#'
12+
#' - does basic standardization of trigger mode values,
13+
#' - creates numeric snow depth columns,
14+
#' - checks for the presence of a `total_count_episode` column, adding one if missing,
15+
#' - standardizes column names to snake_case.
16+
#' - If the data has separate `Date` and `Time` columns instead of a combined `DateTime` column,
17+
#' these will be reconciled into a single `DateTime` column.
18+
#'
19+
#' For wallow data, this also removes motion-activated static images,
20+
#' and only keeps the motion-activated video records and the time-lapse static image records.
1421
#'
1522
#' @param path path to directory of image files, a single .csv file, or a character
1623
#' vector of .csv files.

man/read_image_data.Rd

Lines changed: 18 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)