downloadSpataObjects | R Documentation |
Main function that downloads several SPATA2
objects
at the same time and saves each as an .RDS file.
downloadSpataObjects(
sample_names,
files = NULL,
folder = base::getwd(),
overwrite = FALSE,
adjust_link = TRUE,
timeout = 600,
verbose = TRUE,
...
)
sample_names |
Character vector. The sample names of the |
files |
Character vector or NULL. Specifies the file names under which the
|
folder |
Character value. If character, specifies the output
folder in which the |
overwrite |
Logical. Must be set to |
adjust_link |
Logical value. Defaults to |
timeout |
Numeric value. Indicates the number of seconds the function has time to download the object before the process is aborted. Defaults to 600s (10min). |
verbose |
Logical. If set to TRUE informative messages regarding the computational progress will be printed. (Warning messages will always be printed.) |
An invisible TRUE
.
SPATA2
objects are stored in a Google Drive repository and downloaded via their weblink as
stored in the source data.frame. Often, SPATA2
objects are too
large for the automatic Google Drive virus scan. As a result, the weblink initially leads
to a webpage that asks if you are okay with skipping this virus scan.
In cases where the Google Drive link leads to this warning page, the function will automatically adjust the download link to bypass the warning and attempt the download again. If the adjusted download still fails, an error message is displayed, prompting the user to manually download the file using the provided link.
Since the virus scan cannot be performed by Google Drive regardless of whether
you download it from within R or manually, the function defaults to bypass this
warning automatically. If you prefer not to bypass the warning, you can set adjust_link = FALSE
In this case, the function will give a warning and ask you to download the object manually.
The downloaded objects do not contain viruses. The way they have been created,
uploaded as well as how the web links are added to the source data.frame
can be reconstructed with the populate_
# downloads three objects and
# saves them as "spata_objects/UKF275T.RDS", "spata_objects/UKF313t.RDS", ... etc.
downloadSpataObjects(
sample_names = c("UKF275T", "UKF313T", "UKF334T"),
folder = "spata_objects" # the folder in which to save the files
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.