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

get_file

Downloads a file from a URL if it not already in the cache.


Description

Passing the MD5 hash will verify the file after download as well as if it is already present in the cache.

Usage

get_file(
  fname,
  origin,
  file_hash = NULL,
  cache_subdir = "datasets",
  hash_algorithm = "auto",
  extract = FALSE,
  archive_format = "auto",
  cache_dir = NULL,
  untar = FALSE
)

Arguments

fname

Name of the file. If an absolute path /path/to/file.txt is specified the file will be saved at that location.

origin

Original URL of the file.

file_hash

The expected hash string of the file after download. The sha256 and md5 hash algorithms are both supported.

cache_subdir

Subdirectory under the Keras cache dir where the file is saved. If an absolute path /path/to/folder is specified the file will be saved at that location.

hash_algorithm

Select the hash algorithm to verify the file. options are 'md5', 'sha256', and 'auto'. The default 'auto' detects the hash algorithm in use.

extract

True tries extracting the file as an Archive, like tar or zip.

archive_format

Archive format to try for extracting the file. Options are 'auto', 'tar', 'zip', and None. 'tar' includes tar, tar.gz, and tar.bz files. The default 'auto' is ('tar', 'zip'). None or an empty list will return no matches found.

cache_dir

Location to store cached files, when NULL it defaults to the Keras configuration directory.

untar

Deprecated in favor of 'extract'. boolean, whether the file should be decompressed

Value

Path to the downloaded file


keras

R Interface to 'Keras'

v2.4.0
MIT + file LICENSE
Authors
Daniel Falbel [ctb, cph, cre], JJ Allaire [aut, cph], François Chollet [aut, cph], RStudio [ctb, cph, fnd], Google [ctb, cph, fnd], Yuan Tang [ctb, cph] (<https://orcid.org/0000-0001-5243-233X>), Wouter Van Der Bijl [ctb, cph], Martin Studer [ctb, cph], Sigrid Keydana [ctb]
Initial release

We don't support your browser anymore

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