Skip to content

Commit

Permalink
use non-nested label
Browse files Browse the repository at this point in the history
  • Loading branch information
emitanaka committed Oct 14, 2023
1 parent 7665f56 commit 213b5a8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/simulate.R
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,10 @@ get_rcrd_values <- function(rname, prov, aggfn, .data, y, censor) {
get_record_type(vrcrds, rname),
class(y))
# TODO: this is a problem when we have nested_labels
vals <- aggregate_values(y, .data[[uname]], agg_fn)
if(is_null(attr(.data[[uname]], "non-nested")))
vals <- .data[[uname]]
else vals <- attr(.data[[uname]], "non-nested")
vals <- aggregate_values(y, vals, agg_fn)
if(rname %in% names(vrcrds)) {
if(is.list(censor) && rname %in% names(censor)) {
get_censored_value(vals, vrcrds[[rname]], censor[[rname]])
Expand Down

0 comments on commit 213b5a8

Please sign in to comment.