Download the appropriate Megadepth executable for your platform from Github and try to copy it to a system directory so megadepth can run the megadepth command.

install_megadepth(version = "latest", force = FALSE)

Arguments

version

A character()` specifying the Megadepth version number, e.g., 1.0.4; the special value latest means the latest version (fetched from Github releases).

force

A logical(1) specifying whether to install megadepth even if it has already been installed.

Value

Returns NULL. The main use is to install Megadepth.

Details

If this function is run in an non-interactive session such as R CMD Check, it will install Megadepth to tempdir(). If this function is run interactively, the user will be prompted to agree to allow Megadepth to be installed at Sys.getenv('APPDATA') on Windows, ~/Library/Application Support on macOS, and ~/bin/ on other platforms (such as Linux). If these directories are not writable, the package directory Megadepth of megadepth will be used. If it still fails, you have to install Megadepth by yourself and make sure it can be found via the environment variable PATH.

If you want to install Megadepth to a custom path, you can set the global option megadepth.dir to a directory to store the Megadepth executable before you call install_megadepth(), e.g., options(megadepth.hugo.dir = '~/Downloads/Megadepth_1.0.4/'). This may be useful for you to use a specific version of Megadepth for a specific project. You can set this option per project, similar to how blogdown.hugo.dir is used for specifying the directory for Hugo in the blogdown package.. See Section 1.4 Global options for details, or store a copy of Megadepth on a USB Flash drive along with your project code.

References

This function is based on blogdown::install_hugo() which is available from https://github.com/rstudio/blogdown/blob/master/R/install.R.

Examples


## Install megadepth
install_megadepth()
#> The latest megadepth version is 1.2.0
#> This is not an interactive session, therefore megadepth has been installed temporarily to 
#> /tmp/RtmpK16vxZ/megadepth