bedatadriven / activityinfo-R

ActivityInfo R Language Client
https://www.activityinfo.org/support/docs/R/
17 stars 12 forks source link

`getRecordHistory()` output in data.frame format #57

Closed Ryo-N7 closed 1 year ago

Ryo-N7 commented 1 year ago

fairly simple, see example below:

rechist <- getRecordHistory(formId = "c8301e4022c", recordId = "cman42dl4qztru2d")

rechist_df <- tidyr::as_tibble(rechist) %>% 
  tidyr::unnest_wider("entries") %>% 
  tidyr::unnest_wider("user")

gethist-df

would like to expand out the 'values' list-field into their own columns but need to account for the fact that the first row when the record is added has a NULL in it compared to the other values for that column

nickdickinson commented 1 year ago

Add as.data.frame() S3 function

Ryo-N7 commented 1 year ago

done by me in latest PR for v4.33