Skip to content

Commit

Permalink
differences for PR #539
Browse files Browse the repository at this point in the history
  • Loading branch information
actions-user committed Nov 29, 2024
1 parent b5d5ddd commit cdb8964
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 5 deletions.
Empty file removed .Rhistory
Empty file.
Empty file removed .here
Empty file.
13 changes: 9 additions & 4 deletions 03-dplyr.md
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,10 @@ filter(interviews, village == "Chirodzo")
# instanceID <chr>
```

You may also have noticed that the output from these call doesn't run off the
screen anymore. It's one of the advantages of `tbl_df` (also called tibble),
the central data class in the tidyverse, compared to normal dataframes in R.

We can also specify multiple conditions within the `filter()` function. We can
combine conditions using either "and" or "or" statements. In an "and"
statement, an observation (row) must meet **every** criteria to be included
Expand Down Expand Up @@ -555,9 +559,6 @@ interviews %>%
3 Ruaca 7.57
```

You may also have noticed that the output from these calls doesn't run off the
screen anymore. It's one of the advantages of `tbl_df` over dataframe.

You can also group by multiple columns:


Expand Down Expand Up @@ -588,7 +589,9 @@ interviews %>%
9 Ruaca <NA> 6.22
```

Note that the output is a grouped tibble. To obtain an ungrouped tibble, use the
Note that the output is a grouped tibble of nine rows by three columns
which is indicated by the by two first lines with the `#`.
To obtain an ungrouped tibble, use the
`ungroup` function:


Expand Down Expand Up @@ -619,6 +622,8 @@ interviews %>%
9 Ruaca <NA> 6.22
```

Notice that the second line with the `#` that previously indicated the grouping has
disappeared and we now only have a 9x3-tibble without grouping.
When grouping both by `village` and `membr_assoc`, we see rows in our table for
respondents who did not specify whether they were a member of an irrigation
association. We can exclude those data from our table using a filter step.
Expand Down
2 changes: 1 addition & 1 deletion md5sum.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"episodes/00-intro.Rmd" "55b4f07dc0323cb819256954954ec242" "site/built/00-intro.md" "2024-11-19"
"episodes/01-intro-to-r.Rmd" "e6038b5b8156ba5036aa08878d24c370" "site/built/01-intro-to-r.md" "2024-11-19"
"episodes/02-starting-with-data.Rmd" "6217dcc0ad4be665633300c51665f35c" "site/built/02-starting-with-data.md" "2024-11-19"
"episodes/03-dplyr.Rmd" "9d624d21108a73be97259938d97f3458" "site/built/03-dplyr.md" "2024-11-19"
"episodes/03-dplyr.Rmd" "4780930e7533e5ae34ec0520f462cd38" "site/built/03-dplyr.md" "2024-11-29"
"episodes/04-tidyr.Rmd" "ac03030af6b9247b199c9bc29f2916a2" "site/built/04-tidyr.md" "2024-11-19"
"episodes/05-ggplot2.Rmd" "03ae0a2f69b9b9eb7822c1b33462bd3c" "site/built/05-ggplot2.md" "2024-11-19"
"episodes/06-rmarkdown.Rmd" "0d414fd9c037f1a3a78b1cae5e2708b6" "site/built/06-rmarkdown.md" "2024-11-19"
Expand Down

0 comments on commit cdb8964

Please sign in to comment.