View source: R/split_and_save.R
split_and_save | R Documentation |
A simpler alternative to cohort_processing
. Will split a data frame
and save as a csv
split_and_save(df, Split_by, path, prefix = NULL)
df |
A 'dataFrame' or 'tibble' ie PopHealthData. |
Split_by |
A column within df that will be used to split the patients and will also appear in the file name. Ideally should be a health organisation code such as GP Practice Code or Hospital Trust Code. Should only have alpha-numeric values |
path |
A file path to which the CSV files will be written |
prefix |
File name prefix |
n number of CSV files written to the location specified by path argument.
## Not run:
split_and_save(
df = pseudo_data,
Split_by = "Locality",
file_path = "Inputs/",
prefix = NULL
)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.