Skip to content

Commit ab91732

Browse files
committed
2nd Release candidate V1.1.4
Clean up S3 methods Remove tests from CRAN release (until I can reduce the run times)
1 parent 58967b1 commit ab91732

File tree

96 files changed

+3228
-203
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+3228
-203
lines changed

.Rbuildignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ cran-comments.md
88
^\.Rprofile$
99
Sweave.sty
1010
useR2014.pdf
11-
vignettes/figure/
1211
jss.cls
1312
jss.bst
1413
jsslogo.jpg
1514
framed.sty
15+
^vignettes/fig-rf/*
16+
^vignettes/fig-rfs/*
17+
^tests/*
1618

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
# https://github.com/craigcitro/r-travis/wiki
66

77
language: r
8-
8+
sudo: required
99
os:
1010
- linux
1111
- osx

NAMESPACE

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,35 @@
11
# Generated by roxygen2 (4.1.0): do not edit by hand
22

3+
S3method(gg_error,rfsrc)
4+
S3method(gg_interaction,default)
5+
S3method(gg_interaction,rfsrc)
6+
S3method(gg_minimal_depth,default)
7+
S3method(gg_minimal_depth,rfsrc)
8+
S3method(gg_minimal_vimp,default)
9+
S3method(gg_minimal_vimp,rfsrc)
10+
S3method(gg_partial,rfsrc)
11+
S3method(plot,gg_error)
12+
S3method(plot,gg_interaction)
13+
S3method(plot,gg_minimal_depth)
14+
S3method(plot,gg_minimal_vimp)
15+
S3method(plot,gg_partial)
16+
S3method(plot,gg_partial_list)
17+
S3method(plot,gg_rfsrc)
18+
S3method(plot,gg_roc)
19+
S3method(plot,gg_survival)
20+
S3method(plot,gg_variable)
21+
S3method(plot,gg_vimp)
22+
S3method(print,gg_minimal_depth)
323
export(calc_auc)
4-
export(calc_roc)
524
export(calc_roc.rfsrc)
625
export(combine.gg_partial)
7-
export(combine.gg_partial_list)
826
export(gg_error)
9-
export(gg_error.rfsrc)
1027
export(gg_interaction)
11-
export(gg_interaction.rfsrc)
1228
export(gg_minimal_depth)
13-
export(gg_minimal_depth.rfsrc)
1429
export(gg_minimal_vimp)
15-
export(gg_minimal_vimp.rfsrc)
1630
export(gg_partial)
17-
export(gg_partial.rfsrc)
1831
export(gg_partial_coplot)
19-
export(gg_partial_coplot.ggRandomForests)
32+
export(gg_partial_coplot.rfsrc)
2033
export(gg_rfsrc)
2134
export(gg_rfsrc.rfsrc)
2235
export(gg_roc)
@@ -29,22 +42,9 @@ export(gg_vimp.rfsrc)
2942
export(kaplan)
3043
export(nelson)
3144
export(partial.rfsrc)
32-
export(plot.gg_error)
33-
export(plot.gg_interaction)
34-
export(plot.gg_minimal_depth)
35-
export(plot.gg_minimal_vimp)
36-
export(plot.gg_partial)
37-
export(plot.gg_partial_list)
38-
export(plot.gg_rfsrc)
39-
export(plot.gg_roc)
40-
export(plot.gg_survival)
41-
export(plot.gg_variable)
42-
export(plot.gg_vimp)
43-
export(print.gg_minimal_depth)
4445
export(quantile_pts)
4546
export(rfsrc_cache_datasets)
4647
export(surface_matrix)
47-
export(surface_matrix.gg_partial_coplot)
4848
importFrom(ggplot2,aes)
4949
importFrom(ggplot2,aes_string)
5050
importFrom(ggplot2,annotate)

NEWS

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
Package: ggRandomForests
22
Version: 1.1.4
33

4-
54
ggRandomForests v1.1.4
65
===================
76
* `combine.gg_partial` bug when giving a single variable plot.variable object.
@@ -15,9 +14,11 @@ ggRandomForests v1.1.4
1514
* Vignette updates for JSS submission of "ggRandomForests: Exploring Random Forest Survival".
1615
* Vignette updates for arXiv submission of ggRandomForests: Random Forests for Regression
1716

18-
* Setup continuous code testing with Travis-CI and Coveralls.
19-
* Improved unit tests to implemnt code test coverage using `covr` package.
2017
* Some optimizations to reduce package size.
18+
* Remove all tests from CRAN build to optimise R CMD CHECK times.
19+
* Remove pdf vignette figure from CRAN build.
20+
* Return S3method calls to NAMESPACE for "S3 methods exported but not registered" for R V3.2+.
21+
2122
* Misc Bug Fixes.
2223

2324
ggRandomForests v1.1.3

R/calc_roc.R

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,13 @@
3838
#'
3939
#' @importFrom parallel mclapply
4040
#'
41-
#' @export calc_roc calc_roc.rfsrc
4241
#' @examples
4342
#' ## Taken from the gg_roc example
4443
#' # rfsrc_iris <- rfsrc(Species ~ ., data = iris)
4544
#' data(rfsrc_iris)
4645
#' gg_dta <- calc_roc.rfsrc(rfsrc_iris, rfsrc_iris$yvar, which.outcome=1, oob=TRUE)
4746
#' gg_dta <- calc_roc.rfsrc(rfsrc_iris, rfsrc_iris$yvar, which.outcome=1, oob=FALSE)
48-
#'
47+
#' @export
4948

5049
calc_roc.rfsrc <- function(object, yvar, which.outcome="all", oob=TRUE){
5150
if(!is.factor(yvar)) yvar <- factor(yvar)
@@ -134,9 +133,8 @@ calc_roc <- calc_roc.rfsrc
134133
#'
135134
#' calc_auc(gg_dta)
136135
#'
137-
#' @export calc_auc
138136
#' @aliases calc_auc calc_auc.gg_roc
139-
#'
137+
#' @export
140138
calc_auc <- function(x){
141139
## Use the trapeziod rule, basically calc
142140
##

R/combine.gg_partial.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
#'
2222
#' @return \code{\link{gg_partial}} or \code{gg_partial_list} based on class of x and y.
2323
#'
24-
#' @export combine.gg_partial_list combine.gg_partial
2524
#' @aliases combine.gg_partial combine.gg_partial_list
2625
#'
2726
#' @importFrom parallel mclapply
@@ -64,7 +63,7 @@
6463
#'
6564
#
6665
# Tested in the gg_partial testthat file.
67-
66+
#' @export
6867
combine.gg_partial <- function(x, y, lbls, ...){
6968
return(combine.gg_partial_list(x, y, lbls, ...))
7069
}

R/gg_error.R

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131
#' @return \code{gg_error} \code{data.frame} with one column indicating the tree number,
3232
#' and the remaining columns from the \code{randomForestSRC::rfsrc$err.rate} return value.
3333
#'
34-
#' @export gg_error.rfsrc gg_error
35-
#'
3634
#' @seealso \code{\link{plot.gg_error}} \code{rfsrc} \code{plot.rfsrc}
3735
#'
3836
#' @references
@@ -115,10 +113,11 @@
115113
#' gg_dta <- gg_error(rfsrc_pbc)
116114
#' plot(gg_dta)
117115
#'
116+
#' @export
118117
gg_error <- function (object, ...) {
119118
UseMethod("gg_error", object)
120119
}
121-
120+
#' @export
122121
gg_error.rfsrc <- function(object, ...) {
123122
## Check that the input obect is of the correct type.
124123
if (!inherits(object, "rfsrc")){

R/gg_interaction.R

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,6 @@
3636
#' \code{randomForestSRC::vimp}
3737
#' \code{\link{plot.gg_interaction}}
3838
#'
39-
#' @export gg_interaction gg_interaction.rfsrc
4039
#' @aliases gg_interaction
4140
#'
4241
#' @importFrom randomForestSRC find.interaction
@@ -122,11 +121,11 @@
122121
#' plot(gg_dta, panel=TRUE)
123122
#' }
124123
#'
125-
126-
# gg_interaction <- function (object, ...) {
127-
# UseMethod("gg_interaction", object)
128-
# }
129-
124+
#' @export
125+
gg_interaction <- function (object, ...) {
126+
UseMethod("gg_interaction", object)
127+
}
128+
#' @export
130129
gg_interaction.rfsrc <- function(object, ...){
131130
if (inherits(object, "rfsrc")) {
132131
# If we called this with a rfsrc object, we need to run find.interaction.
@@ -151,4 +150,6 @@ gg_interaction.rfsrc <- function(object, ...){
151150

152151
invisible(gg_dta)
153152
}
154-
gg_interaction <- gg_interaction.rfsrc
153+
#
154+
#' @export
155+
gg_interaction.default <- gg_interaction.rfsrc

R/gg_minimal_depth.R

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
#' @return \code{gg_minimal_depth} object, A modified list of variables from the
3232
#' \code{randomForestSRC::var.select} function, ordered by minimal depth rank.
3333
#'
34-
#' @export gg_minimal_depth gg_minimal_depth.rfsrc
3534
#' @aliases gg_minimal_depth gg_minimal_depth.rfsrc
3635
#'
3736
#' @seealso \code{randomForestSRC::var.select} \code{\link{plot.gg_minimal_depth}}
@@ -110,7 +109,12 @@
110109
#' gg_dta <- gg_minimal_depth(varsel_pbc)
111110
#' plot(gg_dta)
112111
#'
112+
#' @export
113+
gg_minimal_depth <- function (object, ...) {
114+
UseMethod("gg_minimal_depth", object)
115+
}
113116

117+
#' @export
114118
gg_minimal_depth.rfsrc <- function (object, ...){
115119

116120
if (inherits(object, "rfsrc") == TRUE){
@@ -139,4 +143,6 @@ gg_minimal_depth.rfsrc <- function (object, ...){
139143
invisible(vsel)
140144
}
141145

142-
gg_minimal_depth <- gg_minimal_depth.rfsrc
146+
#' @export
147+
gg_minimal_depth.default <-
148+
gg_minimal_depth.rfsrc

R/gg_minimal_vimp.R

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,16 +19,13 @@
1919
#'
2020
#' @param object A \code{randomForestSRC::rfsrc} object, \code{randomForestSRC::predict}
2121
#' object or the list from the \code{randomForestSRC::var.select.rfsrc} function.
22-
#' @param event an optional vector of logical values (event indicator) for
23-
#' shaping the points in when plotting.
2422
#' @param ... optional arguments passed to the \code{randomForestSRC::var.select} function
2523
#' if operating on an \code{randomForestSRC::rfsrc} object.
26-
#'
24+
#'
2725
#' @return \code{gg_minimal_vimp} comparison object.
2826
#'
2927
#' @seealso \code{\link{plot.gg_minimal_vimp}} \code{randomForestSRC::var.select}
3028
#'
31-
#' @export gg_minimal_vimp gg_minimal_vimp.rfsrc
3229
#' @aliases gg_minimal_vimp
3330
#'
3431
#' @examples
@@ -105,8 +102,12 @@
105102
#'
106103
#' gg_dta <- gg_minimal_vimp(varsel_pbc)
107104
#' plot(gg_dta)
108-
109-
gg_minimal_vimp.rfsrc <- function(object, event, ...){
105+
#' @export
106+
gg_minimal_vimp <- function (object, ...) {
107+
UseMethod("gg_minimal_vimp", object)
108+
}
109+
#' @export
110+
gg_minimal_vimp.rfsrc <- function(object, ...){
110111

111112
if (inherits(object, "rfsrc") == TRUE){
112113
vsel <- var.select(object, ...)
@@ -138,4 +139,6 @@ gg_minimal_vimp.rfsrc <- function(object, event, ...){
138139
class(gg_dta) <- c("gg_minimal_vimp", class(gg_dta))
139140
invisible(gg_dta)
140141
}
141-
gg_minimal_vimp <- gg_minimal_vimp.rfsrc
142+
143+
#' @export
144+
gg_minimal_vimp.default <- gg_minimal_vimp.rfsrc

0 commit comments

Comments
 (0)