pathing | R Documentation |
These are helper functions that deal with pathing to bertini and asking if it is present. When the bertini package is loaded it attempts to find the bertini executable by looking for an environment variable indicating where it is, i.e. its path as specified in your .Renviron file.
set_bertini_path(path) get_bertini_path() has_bertini() missing_bertini_stop()
path |
A character string, the path to theh bertini executable |
For easiest use, you'll want to specify the path the bertini executable in your ~/.Renviron file. It should look something like
BERTINI=/Applications/latte/bin
You can set this permanently with edit_r_environ()
. Note that absolute
paths should be specified, not relative paths, e.g. don't use ~/path/to/exe.
You can change this for the current session using set_bertini_path()
, which
accepts a character string or, if missing, uses file.choose()
to let you
interactively; you just select an arbitrary executable.
A logical(1) or character(1) containing the path.
David Kahle david@kahle.io
has_bertini() if (has_bertini()) get_bertini_path() # you can set this permanently with the following. note that you'll # need to re-start the R session afterwards or simply pass the path into # set_bertini_path(). see below for more details on that. if (interactive()) edit_r_environ() # you can change this in your current session with set_bertini_path() and if (interactive()) set_bertini_path() if (had_bertini <- has_bertini()) old_bertini_path <- get_bertini_path() set_bertini_path("/path/to/bertini") get_bertini_path() if (had_bertini) set_bertini_path(old_bertini_path) get_bertini_path()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.