Hi
I'm new to R, so I need to get this process ( below ) to load data and produce to run a proof of concept.
The output should be a listing of the text file contents but re-arranged.
patient_data <- read_csv("//<server1>/<share1>/User4/Data/input_case.txt")
patient_data %>%
# recode lifecycle variable appropriately
dplyr::mutate(registration_type = forcats::fct_recode("start_time" = "started",
"end_time" = "completed")) %>%
convert_timestamps(columns = "time", format = ymd_hms) %>%
eventlog(case_id = "who",
activity_id = "what",
activity_instance_id = "handling")
Error in `dplyr::mutate()`:
! Problem while computing `registration_type = forcats::fct_recode(start_time =
"started", end_time = "completed")`.
Caused by error in `check_factor()`:
! argument ".f" is missing, with no default
Run `rlang::last_error()` to see where the error occurred.
> rlang::last_error()
<error/dplyr:::mutate_error>
Error in `dplyr::mutate()`:
! Problem while computing `registration_type = forcats::fct_recode(start_time =
"started", end_time = "completed")`.
Caused by error in `check_factor()`:
! argument ".f" is missing, with no default
---
Backtrace:
1. ... %>% ...
11. forcats::fct_recode(start_time = "started", end_time = "completed")
12. forcats:::check_factor(.f)
Run `rlang::last_trace()` to see the full context.
> rland::last_trace()
Error in loadNamespace(name) : there is no package called ‘rland’
> rlang::last_trace()
<error/dplyr:::mutate_error>
Error in `dplyr::mutate()`:
! Problem while computing `registration_type = forcats::fct_recode(start_time =
"started", end_time = "completed")`.
Caused by error in `check_factor()`:
! argument ".f" is missing, with no default
---
Backtrace:
x
1. +-... %>% ...
2. +-bupaR::eventlog(., case_id = "who", activity_id = "what", activity_instance_id = "handling")
3. +-bupaR::convert_timestamps(., columns = "time", format = ymd_hms)
4. | +-base::stopifnot("data.frame" %in% class(x))
5. | \-"data.frame" %in% class(x)
6. +-dplyr::mutate(...)
7. +-dplyr:::mutate.data.frame(...)
8. | \-dplyr:::mutate_cols(.data, dplyr_quosures(...), caller_env = caller_env())
9. | +-base::withCallingHandlers(...)
10. | \-mask$eval_all_mutate(quo)
11. +-forcats::fct_recode(start_time = "started", end_time = "completed")
12. | \-forcats:::check_factor(.f)
13. \-base::.handleSimpleError(...)
14. \-dplyr h(simpleError(msg, call))
15. \-rlang::abort(...)