-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
f0ce6ea
commit ce54117
Showing
2 changed files
with
14 additions
and
15 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#' Save data to CSV. | ||
#' | ||
#' @param data Survey data. | ||
#' @param path Path where data should be saved to. | ||
#' | ||
#' @return Save a CSV file, returns tibble invisibly. | ||
#' @export | ||
#' | ||
save_as_csv <- function(data, path) { | ||
fs::dir_create(fs::path_dir(path)) | ||
data |> | ||
readr::write_csv(here::here(path)) | ||
path | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters