Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

try_query

Query from URL


Description

Downloads data table from URL. If an error occurs during the query (for example due to no connection) the function waits 3 seconds and tries again. If no result could be obtained after the given number of tries a message indicating the problem is returned.

Usage

try_query(
  url,
  max_tries = 5,
  silent = TRUE,
  header = TRUE,
  sep = "tab-separated-values"
)

Arguments

url

a character vector of an URL to the website that contains the table that should be downloaded.

max_tries

a numeric vector specifying the number of times the function tries to download the data in case an error occurs.

silent

a logical, if TRUE no individual messages are printed after each try that failed.

header

a logical, indicates if the first row of the data frame contains variable names.

sep

a character vector, specifying the separator of the table at the target URL. Options are "tab-separated-values" or "csv". Default is "tab-separated-values".

Value

A data frame that contains the table from the url.


protti

Bottom-Up Proteomics and LiP-MS Quality Control and Data Analysis Tools

v0.1.1
MIT + file LICENSE
Authors
Jan-Philipp Quast [aut, cre], Dina Schuster [aut], ETH Zurich [cph, fnd]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.