diff --git a/.ci/r_tests.sh b/.ci/r_tests.sh index cd547545..33902226 100755 --- a/.ci/r_tests.sh +++ b/.ci/r_tests.sh @@ -13,7 +13,10 @@ if [[ $OS_NAME == "macos-latest" ]]; then echo 'options(pkgType = "mac.binary")' > .Rprofile echo 'options(install.packages.check.source = "no")' >> .Rprofile else - tlmgr --verify-repo=none --self --all update + tlmgr --verify-repo=none update --self + tlmgr --verify-repo=none install ec + + echo "Sys.setenv(RETICULATE_PYTHON = '$CONDA_PREFIX/bin/python')" >> .Rprofile fi R_LIB_PATH=$HOME/R diff --git a/R-package/DESCRIPTION b/R-package/DESCRIPTION index 2da7012c..764a89a4 100644 --- a/R-package/DESCRIPTION +++ b/R-package/DESCRIPTION @@ -21,5 +21,5 @@ Suggests: rmarkdown Encoding: UTF-8 LazyData: true -RoxygenNote: 7.1.1 +RoxygenNote: 7.0.2 VignetteBuilder: knitr diff --git a/R-package/R/FastRGF_Classifier.R b/R-package/R/FastRGF_Classifier.R index 97f969ed..ea4d375d 100644 --- a/R-package/R/FastRGF_Classifier.R +++ b/R-package/R/FastRGF_Classifier.R @@ -51,7 +51,7 @@ #' min_child_weight = 5.0, data_l2 = 2.0, #' sparse_max_features = 80000, #' sparse_min_occurences = 5, -#' calc_prob="sigmoid", n_jobs = 1, +#' calc_prob = "sigmoid", n_jobs = 1, #' verbose = 0)}}{} #' #' \item{\code{--------------}}{} @@ -89,7 +89,7 @@ #' # min_child_weight = 5.0, data_l2 = 2.0, #' # sparse_max_features = 80000, #' # sparse_min_occurences = 5, -#' # calc_prob="sigmoid", n_jobs = 1, +#' # calc_prob = "sigmoid", n_jobs = 1, #' # verbose = 0) #' @examples #' @@ -111,7 +111,7 @@ #' preds = fast_RGF_class$predict_proba(x) #' } #' } -#' }, silent=TRUE) +#' }, silent = TRUE) FastRGF_Classifier <- R6::R6Class( "FastRGF_Classifier", diff --git a/R-package/R/FastRGF_Regressor.R b/R-package/R/FastRGF_Regressor.R index 13ad64a9..c72a0182 100644 --- a/R-package/R/FastRGF_Regressor.R +++ b/R-package/R/FastRGF_Regressor.R @@ -101,7 +101,7 @@ #' preds = fast_RGF_regr$predict(x) #' } #' } -#' }, silent=TRUE) +#' }, silent = TRUE) FastRGF_Regressor <- R6::R6Class( "FastRGF_Regressor", diff --git a/R-package/R/RGF_Classifier.R b/R-package/R/RGF_Classifier.R index 88b784df..abc28789 100644 --- a/R-package/R/RGF_Classifier.R +++ b/R-package/R/RGF_Classifier.R @@ -127,7 +127,7 @@ #' preds = RGF_class$predict_proba(x) #' } #' } -#' }, silent=TRUE) +#' }, silent = TRUE) RGF_Classifier <- R6::R6Class( "RGF_Classifier", diff --git a/R-package/R/RGF_Regressor.R b/R-package/R/RGF_Regressor.R index c30cca8d..edcaa62e 100644 --- a/R-package/R/RGF_Regressor.R +++ b/R-package/R/RGF_Regressor.R @@ -117,7 +117,7 @@ #' preds = RGF_regr$predict(x) #' } #' } -#' }, silent=TRUE) +#' }, silent = TRUE) RGF_Regressor <- R6::R6Class( "RGF_Regressor", diff --git a/R-package/R/TO_scipy_sparse.R b/R-package/R/TO_scipy_sparse.R index d90c19b0..ce055e92 100644 --- a/R-package/R/TO_scipy_sparse.R +++ b/R-package/R/TO_scipy_sparse.R @@ -55,7 +55,7 @@ #' } #' } #' } -#' }, silent=TRUE) +#' }, silent = TRUE) TO_scipy_sparse = function(R_sparse_matrix) { diff --git a/R-package/R/mat_2scipy_sparse.R b/R-package/R/mat_2scipy_sparse.R index 15b5e270..afa56437 100644 --- a/R-package/R/mat_2scipy_sparse.R +++ b/R-package/R/mat_2scipy_sparse.R @@ -26,7 +26,7 @@ #' print(res$shape) #' } #' } -#' }, silent=TRUE) +#' }, silent = TRUE) mat_2scipy_sparse = function(x, format = 'sparse_row_matrix') { diff --git a/R-package/R/package.R b/R-package/R/package.R index 60624c25..05ed72f8 100644 --- a/R-package/R/package.R +++ b/R-package/R/package.R @@ -29,15 +29,15 @@ RGF_mod <- NULL; RGF_utils <- NULL; SCP <- NULL; try({ # I added the try() functions in version 1.0.7 because I received a similar warning as mentioned in: [ https://github.com/rstudio/reticulate/issues/730#issuecomment-594365528 ] and [ https://github.com/rstudio/reticulate/issues/814 ] RGF_mod <<- reticulate::import("rgf.sklearn", delay_load = TRUE) - }, silent=TRUE) + }, silent = TRUE) try({ RGF_utils <<- reticulate::import("rgf.utils", delay_load = TRUE) - }, silent=TRUE) + }, silent = TRUE) try({ SCP <<- reticulate::import("scipy", delay_load = TRUE, convert = FALSE) - }, silent=TRUE) + }, silent = TRUE) # #................................................................................. keep this as a reference, however it gives a warning on CRAN because it tries to initialize python # try({ @@ -59,6 +59,6 @@ RGF_mod <- NULL; RGF_utils <- NULL; SCP <- NULL; # # else { # # packageStartupMessage("The 'scipy' package is not available!") # # } - # }, silent=TRUE) + # }, silent = TRUE) # #................................................................................. } diff --git a/R-package/man/FastRGF_Classifier.Rd b/R-package/man/FastRGF_Classifier.Rd index 1ec2c269..177c6194 100644 --- a/R-package/man/FastRGF_Classifier.Rd +++ b/R-package/man/FastRGF_Classifier.Rd @@ -13,7 +13,7 @@ # min_child_weight = 5.0, data_l2 = 2.0, # sparse_max_features = 80000, # sparse_min_occurences = 5, -# calc_prob="sigmoid", n_jobs = 1, +# calc_prob = "sigmoid", n_jobs = 1, # verbose = 0) } \description{ @@ -46,7 +46,7 @@ the \emph{score} function returns the mean accuracy on the given test data and l min_child_weight = 5.0, data_l2 = 2.0, sparse_max_features = 80000, sparse_min_occurences = 5, - calc_prob="sigmoid", n_jobs = 1, + calc_prob = "sigmoid", n_jobs = 1, verbose = 0)}}{} \item{\code{--------------}}{} @@ -97,7 +97,7 @@ try({ preds = fast_RGF_class$predict_proba(x) } } -}, silent=TRUE) +}, silent = TRUE) } \references{ \emph{https://github.com/RGF-team/rgf/tree/master/python-package}, \emph{Tong Zhang, FastRGF: Multi-core Implementation of Regularized Greedy Forest (https://github.com/RGF-team/rgf/tree/master/FastRGF)} @@ -129,7 +129,6 @@ try({ } \if{html}{\out{