Skip to contents

Function to download a text file from the web.

Usage

get_file_from_url(url, scratchdir = ".", return_data_table = FALSE)

Arguments

url

character, Google Cloud Storage URL, e.g., "https://storage.googleapis.com/motrpac-rat-training-6mo-extdata/training-da/PHOSPHO/pass1b-06_t70-white-adipose_prot-ph_training-dea-fdr.txt"

scratchdir

character, local directory in which to download data from the web. Current working directory by default. Downloaded files are deleted before returning the result.

return_data_table

bool, whether to return a data table. If FALSE, return a data frame. FALSE by default.

Value

data frame, or data table if return_data_table = TRUE

Examples

# Get phosphoproteomics training differential analysis results for white adipose 
res = get_file_from_url(paste0(c("https://storage.googleapis.com/motrpac-rat-training-6mo-extdata/",
  "training-da/PHOSPHO/pass1b-06_t70-white-adipose_prot-ph_training-dea-fdr.txt"),collapse=""))