Open mjharris95 opened 11 months ago
I kept getting this error when running the microsynth function:
Error in value[3L] : promise already under evaluation: recursive default argument reference or earlier problems?
I was able to resolve by converting my timevar, which was formatted as an R date variable to a numeric variable before feeding it to the function.
For example, if I start out with a column called year_month where entries look like "201905"
df %<>% mutate(time = ym(year_month)) synth <- microsynth(df, idvar="id", timevar="time", intvar="int", match.out = c("var"))
will not work but
df %<>% mutate(time = ym(year_month)) %>% mutate(time = as.numeric(time)) synth <- microsynth(df, idvar="id", timevar="time", intvar="int", match.out = c("var"))
will work.
Thought I'd share in case others run into something similar!
I kept getting this error when running the microsynth function:
Error in value[3L] : promise already under evaluation: recursive default argument reference or earlier problems?
I was able to resolve by converting my timevar, which was formatted as an R date variable to a numeric variable before feeding it to the function.
For example, if I start out with a column called year_month where entries look like "201905"
will not work but
will work.
Thought I'd share in case others run into something similar!