Skip to content
This repository was archived by the owner on Aug 4, 2020. It is now read-only.

small edits for 03-data-frames.rmd #80

Open
wants to merge 1 commit into
base: gh-pages
Choose a base branch
from
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
6 changes: 3 additions & 3 deletions 03-data-frames.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ seq(20, 4, by = -3)
> ten_letters[____________]
>
> > ## Solution
> > ten_letters[seq(2, 10, by = 2)]
> > ten_letters[seq(2, 10, by = 2)]
> {: .solution}
{: .challenge}

Expand All @@ -111,11 +111,11 @@ metadata[, 7] # Entire 7th column

> ## Challenge
>
> The function `nrow()` on a `data.frame` returns the number of rows. For example, try typing nrow(metadata)`.
> The function `nrow()` on a `data.frame` returns the number of rows. For example, try typing `nrow(metadata)`.
> Use `nrow()` and `seq()` to create a new data frame called `meta_by_2` that includes all even numbered rows of `metadata`.
>
> ## Solution
> > meta_data[seq(2, nrow(metadata), by = 2, ]
> > meta_by_2 <- metadata[seq(2, nrow(metadata), by = 2), ]
> >
> >
> {: .solution}
Expand Down