downloadSpataObject | R Documentation |
Downloads a single SPATA2
object and returns it.
downloadSpataObject(
sample_name,
overwrite = FALSE,
file = FALSE,
adjust_link = TRUE,
timeout = 600,
verbose = TRUE,
...
)
sample_name |
Character value. The name of the sample you want to
download. Use |
overwrite |
Logical. Must be set to |
file |
If you want to save the object on disc:
The filename of the |
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.) |
folder |
Character value. If character, specifies the output
folder in which the |
If file
is not FALSE
. The downloaded SPATA2
object is immediately saved after the download before
it is returned by the function. Note that the file directory is assembled by combining
folder
and file
!
The downloaded SPATA2
object.
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_
For convenient downloads of multiple SPATA2
objects
check out downloadSpataObjects()
.
# download & assign (no saving on the disk)
object <- downloadSpataObject(sample_name = "UKF275T")
# download, assign and save on disk
# -> stores the file under ~/UKF275T.RDS (where '~' is your working directory)
object <- downloadSpataObject(sample_name = "UKF275T", file = TRUE)
# download, assign and save on disk in a specified directory
object <- downloadSpataObject(sample_name = "UKF275T", file = "my/path/to/spata_object.RDS")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.