View source: R/compress_and_save_df.R
save_df | R Documentation |
Converts any character columns in the data frame to factor, then nests the
data frame (so there's one row per table_no
), then saves
using qs::qsave()
.
save_df(df, qs_file, nest = TRUE)
df |
A data frame that is presumed to contain a |
qs_file |
Path, incl. filename (with " |
nest |
TRUE by default. If TRUE, file will be nested by |
Any character columns (other than table_no
) will be saved as
factors. Loading the data frame with load_data()
converts factor columns back
to character.
TRUE
invisibly on success
## Not run:
df <- readabs::read_abs("6345.0")
save_df(df, "wpi.qs")
# Then load the data
loaded_df <- load_data("wpi.qs")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.