Skip to contents

anystyle_path() returns the path of the anystyle command-line tool used by the package; check_anystyle() checks that it runs and returns its version.

Usage

anystyle_path()

check_anystyle()

Value

anystyle_path(): the path of the executable, or NA if it is not found. check_anystyle(): invisibly, the version string (e.g. "anystyle version 1.6.0 (cli 1.5.0, data 1.3.0)"); it fails with an informative error if anystyle cannot be run.

Details

The executable is searched, in order:

  1. in the option anystyleR.anystyle (e.g. options(anystyleR.anystyle = "~/.local/share/gem/ruby/bin/anystyle") in your .Rprofile);

  2. in the environment variable ANYSTYLE_PATH;

  3. on the PATH (Sys.which("anystyle"));

  4. in the user gem directories of RubyGems (where gem install --user-install puts it, often not on the PATH).

Examples

anystyle_path()
#> [1] "/home/agoutsmedt/bin/anystyle"
if (FALSE) { # \dontrun{
check_anystyle()
} # }