Skip to content

Commit 1ef6656

Browse files
authored
Pre 0.0.2 release work (#161)
* version bump for dependencies * ignore revdeps in build * predict_ no longer exported * changes for sparklyr 1.0.0 * updated tests to avoid using the predict_* functions * multi_predict no longer internal * added an event time data set based on R CMD check times * typp
1 parent 1b69520 commit 1ef6656

31 files changed

+482
-267
lines changed

.Rbuildignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,4 +9,5 @@
99
^R/README\.md$
1010
derby.log
1111
^logs$
12-
^tests/testthat/logs$
12+
^tests/testthat/logs$
13+
^revdep$

DESCRIPTION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ VignetteBuilder: knitr
1717
Depends:
1818
R (>= 2.10)
1919
Imports:
20-
dplyr,
20+
dplyr (>= 0.8.0.1),
2121
rlang (>= 0.3.1),
2222
purrr,
2323
utils,
24-
tibble,
24+
tibble (>= 2.1.1),
2525
generics,
2626
glue,
2727
magrittr,
@@ -39,7 +39,7 @@ Suggests:
3939
xgboost,
4040
covr,
4141
C50,
42-
sparklyr,
42+
sparklyr (>= 1.0.0),
4343
earth,
4444
glmnet,
4545
kernlab,

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ that are actually varying).
2121

2222
* The prediction modules (e.g. `predict_class`, `predict_numeric`, etc) were de-exported. These were internal functions that were not to be used by the users and the users were using them.
2323

24+
* An event time data set (`check_times`) was included that is the time (in seconds) to run `R CMD check` using the "r-devel-windows-ix86+x86_64` flavor. Packages that errored are censored.
2425

2526
## Bug Fixes
2627

R/aaa_spark_helpers.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
format_spark_probs <- function(results, object) {
55
results <- dplyr::select(results, starts_with("probability_"))
66
p <- ncol(results)
7-
lvl <- paste0("probability_", 0:(p - 1))
8-
names(lvl) <- paste0("pred_", object$fit$.index_labels)
9-
results %>% rename(!!!syms(lvl))
7+
lvl <- colnames(results)
8+
names(lvl) <- paste0("pred_", object$fit$index_labels)
9+
results %>% dplyr::rename(!!!syms(lvl))
1010
}
1111

1212
format_spark_class <- function(results, object) {

R/data.R

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,62 @@ NULL
4444
#' data(wa_churn)
4545
#' str(wa_churn)
4646
NULL
47+
48+
#' Execution Time Data
49+
#'
50+
#' These data were collected from the CRAN web page for 13,626 R
51+
#' packages. The time to complete the standard package checking
52+
#' routine was collected In some cases, the package checking
53+
#' process is stopped due to errors and these data are treated as
54+
#' censored. It is less than 1 percent.
55+
#'
56+
#' As predictors, the associated package source code were
57+
#' downloaded and parsed to create predictors, including
58+
#'
59+
#' * `authors`: The number of authors in the author field.
60+
#' * `imports`: The number of imported packages.
61+
#' * `suggests`: The number of packages suggested.
62+
#' * `depends`: The number of hard dependencies.
63+
#' * `Roxygen`: a binary indicator for whether Roxygen was used
64+
#' for documentation.
65+
#' * `gh`: a binary indicator for whether the URL field contained
66+
#' a GitHub link.
67+
#' * `rforge`: a binary indicator for whether the URL field
68+
#' contained a link to R-forge.
69+
#' * `descr`: The number of characters (or, in some cases, bytes)
70+
#' in the description field.
71+
#' * `r_count`: The number of R files in the R directory.
72+
#' * `r_size`: The total disk size of the R files.
73+
#' * `ns_import`: Estimated number of imported functions or methods.
74+
#' * `ns_export`: Estimated number of exported functions or methods.
75+
#' * `s3_methods`: Estimated number of S3 methods.
76+
#' * `s4_methods`: Estimated number of S4 methods.
77+
#' * `doc_count`: How many Rmd or Rnw files in the vignettes
78+
#' directory.
79+
#' * `doc_size`: The disk size of the Rmd or Rnw files.
80+
#' * `src_count`: The number of files in the `src` directory.
81+
#' * `src_size`: The size on disk of files in the `src` directory.
82+
#' * `data_count` The number of files in the `data` directory.
83+
#' * `data_size`: The size on disk of files in the `data` directory.
84+
#' * `testthat_count`: The number of files in the `testthat`
85+
#' directory.
86+
#' * `testthat_size`: The size on disk of files in the `testthat`
87+
#' directory.
88+
#' * `check_time`: The time (in seconds) to run `R CMD check`
89+
#' using the "r-devel-windows-ix86+x86_64` flavor.
90+
#' * `status`: An indicator for whether the tests completed.
91+
#'
92+
#' Data were collected on 2019-01-20.
93+
#' @name check_times
94+
#' @aliases check_times
95+
#' @docType data
96+
#' @return \item{check_times}{a data frame}
97+
#'
98+
#' @source CRAN
99+
#'
100+
#' @keywords datasets
101+
#' @examples
102+
#' data(check_times)
103+
#' str(check_times)
104+
NULL
105+

R/predict.R

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,6 @@ prepare_data <- function(object, new_data) {
245245
#' @return A tibble with the same number of rows as the data being predicted.
246246
#' Mostly likely, there is a list-column named `.pred` that is a tibble with
247247
#' multiple rows per sub-model.
248-
#' @keywords internal
249248
#' @export
250249
multi_predict <- function(object, ...) {
251250
if (inherits(object$fit, "try-error")) {
@@ -255,7 +254,6 @@ multi_predict <- function(object, ...) {
255254
UseMethod("multi_predict")
256255
}
257256

258-
#' @keywords internal
259257
#' @export
260258
#' @rdname multi_predict
261259
multi_predict.default <- function(object, ...)

data/check_times.rda

355 KB
Binary file not shown.

data/datalist

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
lending_club: lending_club
22
wa_churn: wa_churn
3+
check_times: check_times

man/check_times.Rd

Lines changed: 64 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

man/multi_predict.Rd

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)