I want my code to only execute if software exists on my machine external to R. Let's say the external executable is called foo. One way I am thinking about is:
if (nchar(Sys.which("foo")) > 0) {
# my code
}
Is there a better way?
I want my code to only execute if software exists on my machine external to R. Let's say the external executable is called foo. One way I am thinking about is:
if (nchar(Sys.which("foo")) > 0) {
# my code
}
Is there a better way?