There is one hospitalflow function - plot_ed_4hourperf_timeseries - that is integrated with autospc package on enhance-integrate_autospc-130 branch.
hospitalflow::plot_ed_4hourperf_timeseries(ed_data, startDate = "2019-01-01", endDate = "2019-06-01", returnPlot = TRUE) function call inside the branch mentioned above produces the desired autospc-like plot:
But it also throws some warnings:
Warning messages:
1: In if (xType != "Date" & all(xType != c("POSIXct", "POSIXt")) & :
the condition has length > 1 and only the first element will be used
2: In if (xType == "Date" | xType == "POSIXct" | xType == "POSIXt") { :
the condition has length > 1 and only the first element will be used
3: In if (xType == "Date" | xType == "POSIXct" | xType == "POSIXt") { :
the condition has length > 1 and only the first element will be used
These 3 warnings are printed every time when the time period limited by endDate and startDate is equal to or more than 21 day. In addition, when the 2 parameters indicate a time period shorter than 21 day, an error is thrown (regardless of minPeriod specified in autospc::plot_auto_spc, where the default value is 21). For example, hospitalflow::plot_ed_4hourperf_timeseries(ed_data, startDate = "2019-01-01", endDate = "2019-01-20", returnPlot = TRUE) returns:
Error in UseMethod("mutate") :
no applicable method for 'mutate' applied to an object of class "character"
In addition: Warning message:
In if (xType != "Date" & all(xType != c("POSIXct", "POSIXt")) &
There is one
hospitalflow
function -plot_ed_4hourperf_timeseries
- that is integrated withautospc
package onenhance-integrate_autospc-130
branch.hospitalflow::plot_ed_4hourperf_timeseries(ed_data, startDate = "2019-01-01", endDate = "2019-06-01", returnPlot = TRUE)
function call inside the branch mentioned above produces the desiredautospc
-like plot:But it also throws some warnings:
These 3 warnings are printed every time when the time period limited by
endDate
andstartDate
is equal to or more than 21 day. In addition, when the 2 parameters indicate a time period shorter than 21 day, an error is thrown (regardless ofminPeriod
specified inautospc::plot_auto_spc
, where the default value is 21). For example,hospitalflow::plot_ed_4hourperf_timeseries(ed_data, startDate = "2019-01-01", endDate = "2019-01-20", returnPlot = TRUE)
returns:Traceback:
I get the same error when running
devtools::test()
, presumably due to the insufficient number of datapoints testing data.For anyone (@HorridTom ?) who looks into this issue - please let me know if you were able to reproduce the error.