Skip to content

Commit

Permalink
Fix namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
jkennel committed Sep 19, 2023
1 parent 200a518 commit 9c74fee
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ Depends:
R (>= 3.4.0)
Imports:
Rcpp (>= 1.0.0),
R6 (>= 2.3.0)
R6 (>= 2.3.0),
RcppThread
LinkingTo:
Rcpp (>= 1.0.0),
RcppThread,
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export(get_iers)
export(get_main_frequency)
importFrom(R6,R6Class)
importFrom(Rcpp,evalCpp)
importFrom(RcppThread,detectCores)
importFrom(stats,approx)
importFrom(utils,data)
importFrom(utils,download.file)
Expand Down
7 changes: 4 additions & 3 deletions R/earthtide_class.R
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
#' @docType class
#' @aliases Earthtide-class
#' @importFrom R6 R6Class
#' @importFrom RcppThread detectCores
#' @importFrom stats approx
#' @importFrom utils read.table
#' @importFrom utils read.fwf
Expand Down Expand Up @@ -490,11 +491,11 @@ Earthtide <- R6Class(
}
},
calculate = function(predict = TRUE, scale = TRUE, n_thread = 1) {

if(n_thread > RcppThread::detectCores()) {
n_cores <- detectCores()
if(n_thread > n_cores) {
warning("number of threads is more than the number of cores, setting
n_thread equal to the maximum number of cores.")
n_thread <- RcppThread::detectCores()
n_thread <- n_cores
}

et_calculate(
Expand Down

0 comments on commit 9c74fee

Please sign in to comment.