EVOLUTION-MANAGER
Edit File: download_file.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Try various methods to download a file</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for download_file {xfun}"><tr><td>download_file {xfun}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Try various methods to download a file</h2> <h3>Description</h3> <p>Try all possible methods in <code><a href="../../utils/html/download.file.html">download.file</a>()</code> (e.g., <code>libcurl</code>, <code>curl</code>, <code>wget</code>, and <code>wininet</code>) and see if any method can succeed. The reason to enumerate all methods is that sometimes the default method does not work, e.g., <a href="https://stat.ethz.ch/pipermail/r-devel/2016-June/072852.html">https://stat.ethz.ch/pipermail/r-devel/2016-June/072852.html</a>. </p> <h3>Usage</h3> <pre> download_file(url, output = basename(url), ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>url</code></td> <td> <p>The URL of the file.</p> </td></tr> <tr valign="top"><td><code>output</code></td> <td> <p>Path to the output file. If not provided, the base name of the URL will be used (query parameters and hash in the URL will be removed).</p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>Other arguments to be passed to <code><a href="../../utils/html/download.file.html">download.file</a>()</code> (except <code>method</code>).</p> </td></tr> </table> <h3>Value</h3> <p>The integer code <code>0</code> for success, or an error if none of the methods work. </p> <hr /><div style="text-align: center;">[Package <em>xfun</em> version 0.16 <a href="00Index.html">Index</a>]</div> </body></html>