Description Usage Arguments Value libreoffice See Also Examples
Searches for an executable in a some places and use the highest version found (unless a specific version is requested).
The function mimic the behavior of the rmarkdown::find_pandoc()
function in order to locate programs.
Some methods work differently depending on the OS or the program:
Under Windows, the search
for 'Google Chrome', 'Mozilla Firefox', 'Microsoft Word', 'Microsoft PowerPoint'
and 'Microsoft Excel' is done in the registry, which means that only one version
can be chosen, the one referenced in the registry. (you still can force another path
with argument dir
).
'Microsoft Word', 'Microsoft PowerPoint' and 'Microsoft Excel' can not be located on linux OS.
the search for 'pip' is using the result of the search of 'python' to find the corresponding 'pip' executable.
1 |
exec |
executable identifier, a single character. Use one of these values:
|
cache |
if |
dir |
A character vector of directory paths under which the executable may be found. |
version |
The version of the executable to look for (e.g., |
A list containing the path of the executable and its version if found. If not found,
the version will be 0
and the exec_file
will be NULL
.
On some Ubuntu platforms, 'LibreOffice' require to add in
the environment variable LD_LIBRARY_PATH
the following path:
/usr/lib/libreoffice/program
(you should see the message
"libreglo.so cannot open shared object file" if it is the case). This
can be done with R
command Sys.setenv(LD_LIBRARY_PATH = "/usr/lib/libreoffice/program/")
exec_available()
will check if an executable is available
and exec_version()
will return the version of a located executable.
1 2 3 4 5 6 7 8 9 10 11 | exec_locate("firefox")
exec_locate("chrome")
exec_locate("chrome", version = "88.0.4324.150")
exec_locate("libreoffice")
exec_locate("node")
exec_locate("npm")
exec_locate("python")
exec_locate("pip")
exec_locate("excel")
exec_locate("word")
exec_locate("powerpoint")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.