-
Notifications
You must be signed in to change notification settings - Fork 1
/
parabar-package.R
51 lines (42 loc) · 1.58 KB
/
parabar-package.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# # # # # # # # # # # # # # # # # # # # # # # # # # # #
# _ #
# | | #
# _ __ __ _ _ __ __ _ | |__ __ _ _ __ #
# | '_ \ / _` || '__| / _` || '_ \ / _` || '__| #
# | |_) || (_| || | | (_| || |_) || (_| || | #
# | .__/ \____||_| \____||____/ \____||_| #
# | | #
# |_| #
# #
# # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Author: Mihai A. Constantin #
# Documentation: https://parabar.mihaiconstantin.com #
# Contact: mihai@mihaiconstantin.com #
# # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Imports.
#' @importFrom parallel detectCores makeCluster stopCluster clusterExport
#' @importFrom parallel clusterEvalQ parSapply parLapply parApply clusterCall
#' @importFrom R6 R6Class
#' @importFrom progress progress_bar
#' @importFrom callr r_session
#' @importFrom filelock lock unlock
#' @template parabar
"_PACKAGE"
# On package load.
.onLoad <- function(libname, pkgname) {
# Set package options.
set_default_options()
}
# On package attach.
.onAttach <- function(libname, pkgname) {
# If there this is an interactive session.
if (interactive()) {
# Print package information.
packageStartupMessage(LOGO)
}
}
# On package unload.
.onUnload <- function(libpath) {
# Remove package options.
options(parabar = NULL)
}