Skip to content

Commit

Permalink
Very basic version of function adding column with observation time
Browse files Browse the repository at this point in the history
  • Loading branch information
athowes committed May 20, 2024
1 parent 69c3f32 commit ed050fc
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions R/observe.R
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,20 @@ observe_process <- function(linelist) {
return(clinelist)
}

#' Add a column to linelist data specifying the date of observation.
#'
#' @param linelist A `data.table` containing line list data.
#' @param obs_time The observation time.
#'
#' @family observe
#' @export
include_obs_at <- function(linelist, obs_time) {
clinelist <- data.table::copy(linelist)
clinelist[, obs_at := obs_time]

return(clinelist)
}

#' Filter observations based on the observation time of secondary events
#'
#' @param linelist A `data.table` containing line list data.
Expand Down

0 comments on commit ed050fc

Please sign in to comment.