Skip to content

Commit 362ba21

Browse files
data prep tools
1 parent b7bd905 commit 362ba21

File tree

4 files changed

+49
-1
lines changed

4 files changed

+49
-1
lines changed

R/iidda/DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,4 @@ Imports:
2929
readr
3030
Encoding: UTF-8
3131
LazyData: true
32-
RoxygenNote: 7.3.2
32+
RoxygenNote: 7.3.2.9000

R/iidda/R/data_prep_tools.R

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -927,6 +927,13 @@ cell_block = function(cells_data) {
927927
matrix(NA_character_, nr, nc) |> as.data.frame()
928928
}
929929

930+
#' Sum Timescales
931+
#'
932+
#' @param data Data frame to aggregate to different time scales.
933+
#' @param filter_out_bad_time_scales Should time scales be filtered out
934+
#' if they do not have a reasonable number of periods (e.g., 600 weeks
935+
#' in a year would be filtered out).
936+
#'
930937
#' @export
931938
sum_timescales = function(data, filter_out_bad_time_scales = TRUE) {
932939
r = (data
@@ -958,6 +965,13 @@ sum_timescales = function(data, filter_out_bad_time_scales = TRUE) {
958965
select(r, -n_periods)
959966
}
960967

968+
#' Time Scale Cross Check
969+
#'
970+
#' Function used to produce the time-scale cross-check for the CANMOD
971+
#' digitization project.
972+
#'
973+
#' @param sum_of_timescales Dataframe with aggregations to different time
974+
#' scales (TODO: describe)
961975
#' @export
962976
do_time_scale_cross_check = function(sum_of_timescales) {
963977
grouped_data = (sum_of_timescales

R/iidda/man/do_time_scale_cross_check.Rd

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

R/iidda/man/sum_timescales.Rd

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

0 commit comments

Comments
 (0)