-
Notifications
You must be signed in to change notification settings - Fork 76
/
zzz.R
36 lines (36 loc) · 1.21 KB
/
zzz.R
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
# On load
.onAttach <- function(lib, pkg) {
packageStartupMessage("SITS - satellite image time series analysis.")
packageStartupMessage(
sprintf(
"Loaded sits v%s.
See ?sits for help, citation(\"sits\") for use in publication.
Documentation avaliable in %s.",
utils::packageDescription("sits")[["Version"]],
"https://e-sensing.github.io/sitsbook/"
)
)
}
.onLoad <- function(lib, pkg) {
Sys.setenv(R_CONFIG_FILE = "config.yml")
sits_config()
}
# Creates a package environment to store global variables
sits_env <- new.env()
# Uses "log" as the default model formula
sits_env[["model_formula"]] <- "log"
# Include the following global variables in the sits package
utils::globalVariables(c(
".x", ".y", ":=", # dplyr
"self", "ctx", "super", "private", # torch
"uniform", "choice", "randint",
"normal", "lognormal", "loguniform", # sits_tuning_random
"sar:frequency_band", "sar:instrument_mode", "sat:orbit_state" # S1 stac
))
#' @importFrom lubridate %within% %m+%
#' @importFrom Rcpp sourceCpp
#' @importFrom dplyr .data
#' @importFrom utils read.csv
#' @importFrom utils download.file
#' @useDynLib sits, .registration = TRUE
NULL