You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
#' Create 'steps' of dates for each object in a dataframe
2
2
#'
3
-
#' Requires a dataframe with 4 variable: one ID (ideally factor), one group (ideally factor),
4
-
#' a minimum date (int/numeric) and a maximum date (int/numeric). It's expected that dates BCE are
5
-
#' displayed as negative values while dates CE are positive. Ignoring this will cause problems when
6
-
#' crossing 0.
3
+
#' Requires a dataframe with 4 variables: ID (ideally factor), group (ideally factor),
4
+
#' minimum date (int/numeric) and maximum date (int/numeric). It's expected that dates BCE are
5
+
#' displayed as negative values while dates CE are positive values. Ignoring this will cause problems
6
+
#' in any case.
7
7
#'
8
-
#' @param df a dataframe with 4 variable: ID, group, minimum date (num) maximum date (num), _must_ be in this order, colnames are irrelevant; each objects _must_ be one row.
9
-
#' @param stepsize defaults to 5. Number of years that should be considered a timestap/datestep.
8
+
#' @param df a dataframe with 4 variable: ID, group, minimum date (int/num) maximum date (int/num), _must_ be in this order, colnames are irrelevant; each object _must_ be one row.
9
+
#' @param stepsize defaults to 5. Number of years that should be used as an interval for creating dating steps.
10
10
#'
11
11
#' @return a larger dataframe with a number of steps for each object as well as a 'weight' value, that is a quantification of how well the object is dated (lesser value means object is dated to larger timespans, i.e. with less confidence)
#' Scales the content of the weight columns according to group membership
44
50
#'
45
-
#' Requires a dataframe as produces by datsteps(). (Meaning 6 columns in the following order: ID, group, minimum/earliest date, maximum/latest date, weight, 'DAT_Steps')
51
+
#' Requires a dataframe as produced by datsteps(). (Meaning 6 columns in the following order: ID, group, minimum/earliest date, maximum/latest date, weight, 'DAT_Steps')
46
52
#'
47
53
#' @param df a dataframe as returned by datsteps
48
-
#' @param var the columns of said dataframe that should be used as the group variable
54
+
#' @param var the index of the column of said dataframe that should be used as the group variable, OR "all" (note: all non-numeric values will result in the weight being scaled accross all objects)
49
55
#'
50
-
#' @return the same dataframe, with the 'weight'-values scaled along group membership
56
+
#' @return the same dataframe, with scaled 'weight'-values
0 commit comments