rvn_download: Downloads Raven

View source: R/rvn_download.R

rvn_downloadR Documentation

Downloads Raven

Description

Downloads Raven executable from the Raven webpage.

Usage

rvn_download(version = NA, NetCDF = FALSE, check = FALSE, copy_path = NULL)

Arguments

version

(optional) Character: The version of Raven to be downloaded. If not provided, the latest version will be downloaded.

NetCDF

(logical) whether to download the NetCDF-enabled version of Raven (default FALSE)

check

(logical) if TRUE, function will only check whether 'Raven.exe' has been downloaded to the RavenR folder

copy_path

(character) path to an existing 'Raven.exe' file. If provided, this file will be copied to the appropriate folder and the download will be skipped.

Details

Files are downloaded from the Raven webpage (http://raven.uwaterloo.ca/Downloads.html) and placed in a temporary directory while the executable is extracted. This helps prevent any unwanted files being saved on your system outside of temporary directories if the function is interrupted. The executable is placed in the RavenR/extdata directory, wherever RavenR is installed on your system.

Note that if you are not on a Windows operating system, you may need to compile Raven for your system rather than

Any existing Raven.exe file in your RavenR/extdata folder will be overwritten with a newly downloaded executable w with this function.

The 'copy_path' argument may be useful for non-Windows users that are not able to use the pre-compiled Raven downloads. If the path to an existing Raven.exe file (i.e. one compiled locally) is provided, this will copy the specified file to the appropriate location and skip the download, which will allow the user to use the locally compiled Raven.exe with the 'rvn_run' function.

Reinstalling the RavenR package removes the previous files in the RavenR/ folder on your system, so this command will need to be re-run if RavenR is re-installed.

Once downloaded, the Raven.exe file can be found with system.file("extdata", "Raven.exe", package="RavenR")

Value

Returns TRUE if executed successfully

See Also

rvn_run

Examples


# check if Raven.exe has previously been downloaded
rvn_download(check=TRUE)

## Not run: 
## NOT RUN (downloads executable)

# download latest without netcdf support
rvn_download()

# download specific version with netcdf support
rvn_download(version="3.0.4",NetCDF=TRUE)

# find file path to Raven.exe
system.file("extdata", "Raven.exe", package="RavenR")

## End(Not run)


rchlumsk/RavenR documentation built on April 19, 2024, 5:15 a.m.