REDCapCAST/data-raw/data-upload-examples.R

10 lines
332 B
R
Raw Normal View History

2024-02-27 12:43:54 +01:00
mtcars_redcap <- mtcars |> dplyr::mutate(record_id=seq_len(dplyr::n()),
name=rownames(mtcars)
) |>
2024-02-27 12:43:54 +01:00
dplyr::select(record_id,dplyr::everything())
mtcars_redcap |>
write.csv(here::here("data/mtcars_redcap.csv"),row.names = FALSE)
2024-02-27 12:43:54 +01:00
usethis::use_data(mtcars_redcap, overwrite = TRUE)