From 714c0180fb44df47c48ccf9033b172708425b238 Mon Sep 17 00:00:00 2001 From: DavisVaughan Date: Mon, 17 Jul 2023 13:03:29 +0000 Subject: [PATCH] =?UTF-8?q?Deploying=20to=20gh-pages=20from=20@=20tidyvers?= =?UTF-8?q?e/dplyr@31256972b912a63138dbc564a4ba412ac0b35e99=20=F0=9F=9A=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dev/articles/base.html | 54 ++++++++--------- dev/pkgdown.yml | 2 +- dev/reference/between.html | 27 ++++----- dev/reference/c_across.html | 12 ++-- dev/reference/coalesce.html | 2 +- dev/reference/context.html | 36 ++++++------ dev/reference/distinct.html | 98 +++++++++++++++---------------- dev/reference/filter_all.html | 4 +- dev/reference/funs.html | 8 +-- dev/reference/if_else.html | 4 +- dev/reference/lead-lag.html | 8 +-- dev/reference/new_grouped_df.html | 10 ++-- dev/reference/order_by.html | 12 ++-- dev/reference/recode.html | 16 ++--- dev/reference/rowwise.html | 76 ++++++++++++------------ dev/reference/sample_n.html | 94 ++++++++++++++--------------- dev/reference/slice.html | 58 +++++++++--------- dev/reference/with_groups.html | 28 ++++----- dev/search.json | 2 +- 19 files changed, 275 insertions(+), 276 deletions(-) diff --git a/dev/articles/base.html b/dev/articles/base.html index d073d651b8..d5ac830d96 100644 --- a/dev/articles/base.html +++ b/dev/articles/base.html @@ -302,19 +302,19 @@

#> # A tibble: 10 × 1 #> x #> <int> -#> 1 2 -#> 2 7 -#> 3 6 -#> 4 9 +#> 1 4 +#> 2 10 +#> 3 5 +#> 4 2 #> # ℹ 6 more rows df %>% distinct(x, .keep_all = TRUE) # whole data frame #> # A tibble: 10 × 2 #> x y #> <int> <int> -#> 1 2 4 -#> 2 7 1 -#> 3 6 2 -#> 4 9 5 +#> 1 4 10 +#> 2 10 1 +#> 3 5 7 +#> 4 2 7 #> # ℹ 6 more rows

There are two equivalents in base R, depending on whether you want the whole data frame, or just selected variables:

@@ -323,19 +323,19 @@

#> # A tibble: 10 × 1 #> x #> <int> -#> 1 2 -#> 2 7 -#> 3 6 -#> 4 9 +#> 1 4 +#> 2 10 +#> 3 5 +#> 4 2 #> # ℹ 6 more rows df[!duplicated(df$x), , drop = FALSE] # whole data frame #> # A tibble: 10 × 2 #> x y #> <int> <int> -#> 1 2 4 -#> 2 7 1 -#> 3 6 2 -#> 4 9 5 +#> 1 4 10 +#> 2 10 1 +#> 3 5 7 +#> 4 2 7 #> # ℹ 6 more rows
@@ -450,22 +450,22 @@

#> # A tibble: 100 × 4 #> x y z z2 #> <int> <int> <int> <dbl> -#> 1 2 4 6 36 -#> 2 2 5 7 49 -#> 3 7 1 8 64 -#> 4 6 2 8 64 +#> 1 4 10 14 196 +#> 2 10 1 11 121 +#> 3 4 7 11 121 +#> 4 5 7 12 144 #> # ℹ 96 more rows

The closest base equivalent is transform(), but note that it cannot use freshly created variables:

 head(transform(df, z = x + y, z2 = (x + y) ^ 2))
-#>   x y  z  z2
-#> 1 2 4  6  36
-#> 2 2 5  7  49
-#> 3 7 1  8  64
-#> 4 6 2  8  64
-#> 5 9 5 14 196
-#> 6 1 3  4  16
+#> x y z z2 +#> 1 4 10 14 196 +#> 2 10 1 11 121 +#> 3 4 7 11 121 +#> 4 5 7 12 144 +#> 5 2 7 9 81 +#> 6 4 1 5 25

Alternatively, you can use $<-:

 mtcars$cyl2 <- mtcars$cyl * 2
diff --git a/dev/pkgdown.yml b/dev/pkgdown.yml
index 50786aa07e..b792bb759b 100644
--- a/dev/pkgdown.yml
+++ b/dev/pkgdown.yml
@@ -11,7 +11,7 @@ articles:
   rowwise: rowwise.html
   two-table: two-table.html
   window-functions: window-functions.html
-last_built: 2023-07-17T12:51Z
+last_built: 2023-07-17T13:00Z
 urls:
   reference: https://dplyr.tidyverse.org/reference
   article: https://dplyr.tidyverse.org/articles
diff --git a/dev/reference/between.html b/dev/reference/between.html
index 237862f258..3f6a175a0b 100644
--- a/dev/reference/between.html
+++ b/dev/reference/between.html
@@ -123,20 +123,19 @@ 

Examples x <- rnorm(1e2) x[between(x, -1, 1)] -#> [1] -0.997901858 0.151963233 -0.613119779 -0.233243460 0.010437230 -#> [6] -0.147162161 0.483088506 0.672757420 0.938598662 -0.232987814 -#> [11] 0.883566131 -0.884747852 -0.295142437 0.077568159 0.519344753 -#> [16] 0.586771019 0.981746283 -0.802555768 0.752585223 0.057521369 -#> [21] 0.312333565 -0.304058183 0.773742716 0.757750635 -0.765292484 -#> [26] -0.619308319 -0.771447323 -0.917010017 0.333128524 0.070294252 -#> [31] 0.390099416 0.018777499 0.341366274 0.494122898 0.800388745 -#> [36] -0.617577183 0.724156934 0.056901328 -0.234051896 -0.533314082 -#> [41] -0.011067522 -0.237537524 -0.520161662 -0.249783242 -0.359393787 -#> [46] -0.046181520 0.476105627 -0.700975880 -0.699405567 -0.088816795 -#> [51] -0.052372116 0.471076920 -0.922302164 -0.199187010 0.601520784 -#> [56] -0.259475300 -0.004321027 -0.938120838 -0.289731998 -0.792202557 -#> [61] -0.845411682 0.137943746 0.343317458 -0.725513082 0.866465925 -#> [66] -0.509374659 0.057096125 +#> [1] -0.60808547 -0.16975288 0.93539126 0.23290799 0.89357926 +#> [6] 0.36572974 0.47915326 -0.88983093 0.92462736 -0.75844814 +#> [11] -0.52449415 0.40610725 -0.55895398 0.77763768 -0.29656653 +#> [16] 0.41928729 0.78068678 -0.53089506 -0.58587413 -0.68030891 +#> [21] 0.13750964 -0.62538775 -0.20204705 0.75136501 0.32610201 +#> [26] -0.30158219 -0.28806047 -0.04343567 0.18599776 0.44665437 +#> [31] 0.75107301 -0.77167461 -0.28240844 0.23812269 0.41701085 +#> [36] 0.26621692 -0.71607772 0.74570842 -0.02541174 -0.36182084 +#> [41] -0.59653210 0.72588736 -0.46775228 0.22018887 -0.16892473 +#> [46] 0.27912378 0.10153643 -0.97818406 -0.91138838 -0.10228255 +#> [51] -0.30728561 0.48293380 -0.58362545 0.13658472 0.28885586 +#> [56] 0.59015841 0.26430617 0.68648918 -0.03878521 -0.32660243 +#> [61] 0.06325003 -0.70755327 0.67537073 0.31450245 # On a tibble using `filter()` filter(starwars, between(height, 100, 150)) diff --git a/dev/reference/c_across.html b/dev/reference/c_across.html index 070fca89bf..0765525648 100644 --- a/dev/reference/c_across.html +++ b/dev/reference/c_across.html @@ -123,12 +123,12 @@

Examples ) #> # A tibble: 4 × 7 #> # Rowwise: -#> id w x y z sum sd -#> <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> -#> 1 1 0.778 0.0754 0.409 0.731 1.99 0.326 -#> 2 2 0.335 0.504 0.342 0.725 1.91 0.183 -#> 3 3 0.494 0.217 0.442 0.893 2.05 0.281 -#> 4 4 0.302 0.922 0.275 0.419 1.92 0.301 +#> id w x y z sum sd +#> <int> <dbl> <dbl> <dbl> <dbl> <dbl> <dbl> +#> 1 1 0.333 0.953 0.535 0.787 2.61 0.273 +#> 2 2 0.542 0.415 0.292 0.994 2.24 0.306 +#> 3 3 0.988 0.124 0.992 0.243 2.35 0.468 +#> 4 4 0.797 0.829 0.587 0.336 2.55 0.228