Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 08-matricesdataframes.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -612,7 +612,7 @@ As you can see, we have to retype the name of the dataframe for each column. How

```{r}
# Save typing by using with()
with(health, height / weight ^ 2)
with(health, weight / height ^ 2)
```

As you can see, the results are identical. In this case, we didn't save so much typing. But if you are doing many calculations, then `with()` can save you a lot of typing. For example, contrast these two lines of code that perform identical calculations:
Expand Down