Closed RobertoTCo closed 7 months ago
Hi @RobertoTCo
Thanks for notifying. We are currently releasing a new version on CRAN, and these errors will probably still be present, but we will fix them for the next release, and perhaps sooner on GitHub
Both problems solved in bupaR 0.5.4
Hi, I have found some errors trying to apply functions from the tutorial docs of bupaR, comparing the synthetic datasets 'patients' and 'patients_act'. The following functions,
act_collapse()
andfilter_flow_time()
work perfectly with event logs, but they seem to fail with activity logs.The rdocumentation for the function
act_collapse()
tells this function should support activitylogs but it looks like it doesn't. Howeveract_unite()
, a similar function, works well.For example, you can compare using the event log and the activity log for patients.
patients %>% act_collapse(Examination = c("Blood test","MRI SCAN","X-Ray"))
patients_act %>% act_collapse(Examination = c("Blood test","MRI SCAN","X-Ray"))
orpatients %>% to_activitylog() %>% act_collapse(Examination = c("Blood test","MRI SCAN","X-Ray"))
The second one returns:
Error in
bind_rows(): ! Can't combine
..1$activity_instance_id_by_bupar<integer> and
..2$activity_instance_id_by_bupar<character>.
Backtrace: ` ▆
For
filter_flow_time()
, you can compare:patients %>% filter_flow_time(from = "Blood test", to = "MRI SCAN", interval = c(0,1), units = "days") %>% cases()
patients_act %>% filter_flow_time(from = "Blood test", to = "MRI SCAN", interval = c(0,1), units = "days") %>% cases()
orpatients_act %>% to_activitylog() %>% filter_flow_time(from = "Blood test", to = "MRI SCAN", interval = c(0,1), units = "days") %>% cases()
Applying the function in the activity log returns:
There might be some other functions that return errors with activity log, I have been working for a while with the package and I haven't found any other. These are the version of the bupaverse packages I was working with:
[1] processcheckR_0.1.4 processmapR_0.5.2 eventdataR_0.3.1 edeaR_0.9.3 bupaR_0.5.3
[6] bupaverse_0.1.0