Skip to content

Commit 1626c78

Browse files
committed
starts detachment from randomfields
1 parent d17830e commit 1626c78

2 files changed

Lines changed: 26 additions & 29 deletions

File tree

DESCRIPTION

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,10 @@ Suggests:
5454
knitr,
5555
kableExtra,
5656
landscapemetrics,
57-
landscapetools,
5857
magrittr,
5958
pals,
6059
plotly,
6160
purrr,
62-
RandomFields,
63-
RandomFieldsUtils,
6461
rasterVis,
6562
rayshader,
6663
rgl,

R/zzz.R

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,43 @@
11
# Adapted from: https://github.com/geanders/hurricaneexposure/blob/master/R/zzz.R
22

3-
.pkgenv <- new.env(parent = emptyenv())
3+
# .pkgenv <- new.env(parent = emptyenv())
44

5-
.onLoad <- function(libname, pkgname) {
5+
# .onLoad <- function(libname, pkgname) {
66

7-
has_data <- all(requireNamespace("RandomFields", quietly = TRUE),
8-
requireNamespace("RandomFieldsUtils", quietly = TRUE))
7+
# has_data <- all(requireNamespace("RandomFields", quietly = TRUE),
8+
# requireNamespace("RandomFieldsUtils", quietly = TRUE))
99

10-
.pkgenv[["has_data"]] <- has_data
10+
# .pkgenv[["has_data"]] <- has_data
1111

12-
}
12+
# }
1313

14-
.onAttach <- function(libname, pkgname) {
14+
# .onAttach <- function(libname, pkgname) {
1515

16-
if (!.pkgenv$has_data) {
16+
# if (!.pkgenv$has_data) {
1717

18-
message <- paste("Some functions in this package require the 'RandomFields'",
19-
"and 'RandomFieldsUtil' packages which are not available on CRAN anymore.",
20-
"To install them, please run 'install.packages('RandomFields',",
21-
"repos = 'https://predictiveecology.r-universe.dev', type = 'source')'.")
18+
# message <- paste("Some functions in this package require the 'RandomFields'",
19+
# "and 'RandomFieldsUtil' packages which are not available on CRAN anymore.",
20+
# "To install them, please run 'install.packages('RandomFields',",
21+
# "repos = 'https://predictiveecology.r-universe.dev', type = 'source')'.")
2222

23-
message <- paste(strwrap(message), collapse = "\n")
23+
# message <- paste(strwrap(message), collapse = "\n")
2424

25-
packageStartupMessage(message)
25+
# packageStartupMessage(message)
2626

27-
}
28-
}
27+
# }
28+
# }
2929

30-
hasData <- function(has_data = .pkgenv$has_data) {
30+
# hasData <- function(has_data = .pkgenv$has_data) {
3131

32-
if (!has_data) {
32+
# if (!has_data) {
3333

34-
message <- paste("This function requires the 'RandomFields' or 'RandomFieldsUtil'",
35-
"packages which are not available on CRAN anymore. To install them,",
36-
"please run 'install.packages('RandomFields',",
37-
"repos = 'https://predictiveecology.r-universe.dev', type = 'source')'.")
34+
# message <- paste("This function requires the 'RandomFields' or 'RandomFieldsUtil'",
35+
# "packages which are not available on CRAN anymore. To install them,",
36+
# "please run 'install.packages('RandomFields',",
37+
# "repos = 'https://predictiveecology.r-universe.dev', type = 'source')'.")
3838

39-
message <- paste(strwrap(message), collapse = "\n")
39+
# message <- paste(strwrap(message), collapse = "\n")
4040

41-
stop(message, call. = FALSE)
42-
}
43-
}
41+
# stop(message, call. = FALSE)
42+
# }
43+
# }

0 commit comments

Comments
 (0)