Skip to content

Commit 20a3c9c

Browse files
committed
fixed link and refreshed calls
1 parent 19eac45 commit 20a3c9c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

vignettes/parsnip_Intro.Rmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ rf_with_seed %>%
109109
#> Ranger result
110110
#>
111111
#> Call:
112-
#> ranger::ranger(formula = formula, data = data, mtry = ~4, num.trees = ~2000, seed = sample.int(10^5, 1), num.threads = 1, verbose = FALSE)
112+
#> ranger::ranger(x = maybe_data_frame(x), y = y, mtry = min_cols(~4, x), num.trees = ~2000, num.threads = 1, verbose = FALSE, seed = sample.int(10^5, 1))
113113
#>
114114
#> Type: Regression
115115
#> Number of trees: 2000
@@ -138,7 +138,7 @@ rf_with_seed %>%
138138
#>
139139
#>
140140
#> Call:
141-
#> randomForest(x = as.data.frame(x), y = y, ntree = ~2000, mtry = ~4)
141+
#> randomForest(x = maybe_data_frame(x), y = y, ntree = ~2000, mtry = min_cols(~4, x))
142142
#> Type of random forest: regression
143143
#> Number of trees: 2000
144144
#> No. of variables tried at each split: 4
@@ -149,7 +149,7 @@ rf_with_seed %>%
149149

150150
Note that the call objects show `num.trees = ~2000`. The tilde is the consequence of `parsnip` using [quosures](https://adv-r.hadley.nz/evaluation.html#quosures) to process the model specification's arguments.
151151

152-
Normally, when a function is executed, the function's arguments are immediately evaluated. In the case of `parsnip`, the model specification's arguments are _not_; the [expression is captured](https://www.tidyverse.org/articles/2019/04/parsnip-internals/) along with the environment where it should be evaluated. That is what a quosure does.
152+
Normally, when a function is executed, the function's arguments are immediately evaluated. In the case of `parsnip`, the model specification's arguments are _not_; the [expression is captured](https://www.tidyverse.org/blog/2019/04/parsnip-internals/) along with the environment where it should be evaluated. That is what a quosure does.
153153

154154
`parsnip` uses these expressions to make a model fit call that is evaluated. The tilde in the call above reflects that the argument was captured using a quosure.
155155

0 commit comments

Comments
 (0)