correlationfunnel
correlationfunnel copied to clipboard
fix: Check `getThemeInfo` existence
In VS Code, loading correlationfunnel
will raise error because of rstudioapi::getThemeInfo()
r$> library(correlationfunnel)
Error: package or namespace load failed for ‘correlationfunnel’:
.onAttach failed in attachNamespace() for 'correlationfunnel', details:
call: rstudioapi::getThemeInfo()
error: This {rstudioapi} function is not currently implemented for VSCode.
While R extension in VS Code has supported some of rstudioapi
functions, getThemeInfo()
is not included. Add rstudioapi::hasFun("getThemeInfo")
besides rstudioapi::isAvailable()
will solve the error
r$> rstudioapi::isAvailable()
[1] TRUE
r$> rstudioapi::hasFun("getThemeInfo")
[1] FALSE