Use system.file() to obtain package installation path (#1435)

This commit is contained in:
Mitchell O'Hara-Wild 2020-04-24 06:06:36 +10:00 committed by GitHub
parent 6cd14438c6
commit 578b78a8f3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -249,9 +249,9 @@ compile_stan_model <- function() {
)
if (.Platform$OS.type == "windows") {
dest <- file.path(path.package("prophet"), 'libs', .Platform$r_arch)
dest <- file.path(system.file(package="prophet"), 'libs', .Platform$r_arch)
} else {
dest <- file.path(path.package("prophet"), 'libs')
dest <- file.path(system.file(package="prophet"), 'libs')
}
dir.create(dest, recursive = TRUE, showWarnings = FALSE)