Skip to content

Commit

Permalink
Delete some time-consuming examples to meet cran requirements.
Browse files Browse the repository at this point in the history
  • Loading branch information
mingzehuang committed Aug 9, 2022
1 parent bc36c9a commit 6f1bc11
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 41 deletions.
19 changes: 0 additions & 19 deletions R/evaluation.R
Original file line number Diff line number Diff line change
Expand Up @@ -37,25 +37,6 @@
#' @importFrom stats median
#' @importFrom microbenchmark microbenchmark
#' @export
#' @examples
#' library(latentcor)
#' grid_list = list(LatentR = seq(-0.5, 0.5, by = 0.5), TruncRate = seq(0.1, 0.9, by = 0.4))
#' genfun = function (grid_input, ...) {
#' out = gen_data(rhos = grid_input[1], XP = list(grid_input[2], NA), ...)$X
#' return(out)
#' }
#' estfun_1 = function(X, ...) {
#' out = latentcor(X = X, method = "original", ...)$R[1, 2]
#' return(out)
#' }
#' estfun_2 = function(X, ...) {
#' out = latentcor(X = X, method = "approx", ...)$R[1, 2]
#' return(out)
#' }
#'evaluation_BC = evaluation(genfun = genfun, estfun_1 = estfun_1, estfun_2 = estfun_2,
#' grid_list = grid_list, nrep = 2, showplot = FALSE, types = c("bin", "con"))
#'evaluation_BC$meanAE_diff
#'evaluation_BC$plot_meanAE_diff

evaluation = function(genfun, estfun_1, estfun_2, grid_list, nrep = 100, showplot = FALSE, cores = detectCores(), ...) {
grid_all = expand.grid(grid_list)
Expand Down
2 changes: 1 addition & 1 deletion R/interpolation.R
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#' @importFrom parallel detectCores
#' @export
#' @examples
#' grid_list = list(seq(-0.9, 0.9, by = 0.1), seq(0.1, 0.9, by = 0.1))
#' grid_list = list(seq(-0.5, 0.5, by = 0.5), seq(-0.5, 0.5, by = 0.5))
#' objfun = function(x, y) {x^2 + sqrt(y)}
#' evalfun = function(X) {objfun(X[1], X[2])}
#' value = interpolation(evalfun = evalfun, grid_list = grid_list)$value
Expand Down
20 changes: 0 additions & 20 deletions man/evaluation.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/interpolation.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Binary file modified src/latentcor.dll
Binary file not shown.

0 comments on commit 6f1bc11

Please sign in to comment.