save_archive.Rd
save_archive
saves archives in a formatted way, to help retrieve
those archives for a use in a typical 'floodam.data' perspective.
save_archive(x, path, scope = NULL, extension = NULL, origin = "floodam.data")
data.frame, data to be archived.
character, the path from wich the archive's path is constructed. See details.
character or factor. If factor or long character, how x will be sliced. If character of length 1, may be the name of a variable of x. See details.
character, the extension and so the format to be used for saving. See details.
character, default value to "floodam.data". See details.
Nothin useful.
TO BE COMPLETED
x = data.frame(scope = 0:2)
temp_dir = tempdir()
scope = "scope"
# No scope, no extension, only basename
save_archive(x, file.path(temp_dir, "x"))
#> Warning: Unmanaged extension. Nothing is saved.
# Adding a scope
save_archive(x, file.path(temp_dir, "x"), scope = "scope")
#> Warning: Some levels of scope ar NA. Corresponding data will not be saved.
#> Warning: Unmanaged extension. Nothing is saved.
#> Warning: Unmanaged extension. Nothing is saved.
# Using a path with extension, but also parameter extension
save_archive(x, file.path(temp_dir, "x.7z"), extension = "rds", scope = "scope")
#> Warning: Some levels of scope ar NA. Corresponding data will not be saved.