Skip to content

Commit

Permalink
if_all
Browse files Browse the repository at this point in the history
  • Loading branch information
perlatex committed Feb 5, 2021
1 parent 4655e77 commit 6faf8ee
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions beauty_of_across2.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,13 @@ penguins %>%
```


当然可以弄成更骚一点喔
```{r beauty-of-across2-71}
penguins %>%
filter(if_all(contains("bill"), `>`, 21))
```


- 筛选企鹅嘴峰(长度或者厚度)大于21mm的行
```{r beauty-of-across2-8}
penguins %>%
Expand All @@ -100,6 +107,7 @@ penguins %>%




- 在指定的列(嘴峰长度和厚度)中检查每行的元素,如果这些元素都大于各自所在列的均值,就保留下来
```{r beauty-of-across2-9}
bigger_than_mean <- function(x) {
Expand Down

0 comments on commit 6faf8ee

Please sign in to comment.