Skip to content

Commit 543094e

Browse files
authored
Merge pull request #82 from topepo/move-dots
Move dots leftward in model functions
2 parents 0de05c4 + 9f76423 commit 543094e

30 files changed

+133
-133
lines changed

R/boost_tree.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,12 +114,12 @@
114114

115115
boost_tree <-
116116
function(mode = "unknown",
117+
...,
117118
mtry = NULL, trees = NULL, min_n = NULL,
118119
tree_depth = NULL, learn_rate = NULL,
119120
loss_reduction = NULL,
120121
sample_size = NULL,
121-
others = list(),
122-
...) {
122+
others = list()) {
123123
check_empty_ellipse(...)
124124

125125
if (!(mode %in% boost_tree_modes))

R/linear_reg.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,10 @@
105105
#' @importFrom purrr map_lgl
106106
linear_reg <-
107107
function(mode = "regression",
108+
...,
108109
penalty = NULL,
109110
mixture = NULL,
110-
others = list(),
111-
...) {
111+
others = list()) {
112112
check_empty_ellipse(...)
113113
if (!(mode %in% linear_reg_modes))
114114
stop(

R/logistic_reg.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,10 @@
103103
#' @importFrom purrr map_lgl
104104
logistic_reg <-
105105
function(mode = "classification",
106+
...,
106107
penalty = NULL,
107108
mixture = NULL,
108-
others = list(),
109-
...) {
109+
others = list()) {
110110
check_empty_ellipse(...)
111111
if (!(mode %in% logistic_reg_modes))
112112
stop(

R/mars.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@
7171

7272
mars <-
7373
function(mode = "unknown",
74+
...,
7475
num_terms = NULL, prod_degree = NULL, prune_method = NULL,
75-
others = list(),
76-
...) {
76+
others = list()) {
7777
check_empty_ellipse(...)
7878

7979
if (!(mode %in% mars_modes))

R/mlp.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@
9393

9494
mlp <-
9595
function(mode = "unknown",
96+
...,
9697
hidden_units = NULL, penalty = NULL, dropout = NULL, epochs = NULL,
9798
activation = NULL,
98-
others = list(),
99-
...) {
99+
others = list()) {
100100
check_empty_ellipse(...)
101101

102102
act_funs <- c("linear", "softmax", "relu", "elu")

R/multinom_reg.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,10 +85,10 @@
8585
#' @importFrom purrr map_lgl
8686
multinom_reg <-
8787
function(mode = "classification",
88+
...,
8889
penalty = NULL,
8990
mixture = NULL,
90-
others = list(),
91-
...) {
91+
others = list()) {
9292
check_empty_ellipse(...)
9393
if (!(mode %in% multinom_reg_modes))
9494
stop(

R/nearest_neighbor.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,11 @@
7777
#'
7878
#' @export
7979
nearest_neighbor <- function(mode = "unknown",
80+
...,
8081
neighbors = NULL,
8182
weight_func = NULL,
8283
dist_power = NULL,
83-
others = list(),
84-
...) {
84+
others = list()) {
8585

8686
check_empty_ellipse(...)
8787

R/rand_forest.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@
103103

104104
rand_forest <-
105105
function(mode = "unknown",
106+
...,
106107
mtry = NULL, trees = NULL, min_n = NULL,
107-
others = list(),
108-
...) {
108+
others = list()) {
109109
check_empty_ellipse(...)
110110

111111
## TODO: make a utility function here

R/surv_reg.R

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#' Since survival models typically involve censoring (and require the use of
2121
#' [survival::Surv()] objects), the [fit()] function will require that the
2222
#' survival model be specified via the formula interface.
23-
#'
23+
#'
2424
#' Also, for the `flexsurv::flexsurvfit` engine, the typical
2525
#' `strata` function cannot be used. To achieve the same effect,
2626
#' the extra parameter roles can be used (as described above).
@@ -51,9 +51,9 @@
5151
#' @export
5252
surv_reg <-
5353
function(mode = "regression",
54+
...,
5455
dist = NULL,
55-
others = list(),
56-
...) {
56+
others = list()) {
5757
check_empty_ellipse(...)
5858
if (!(mode %in% surv_reg_modes))
5959
stop(

docs/articles/articles/Classification.html

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

0 commit comments

Comments
 (0)