Skip to content

Commit

Permalink
Remove unwanted R code
Browse files Browse the repository at this point in the history
In the episode exploring data frames (https://swcarpentry.github.io/r-novice-gapminder/05-data-structures-part2.html), renaming row names is unnecessary as R re-names them sequentially. So, in the section 'Append to a data frame', the following code snippet can be removed.
  • Loading branch information
SarithaKodikara authored Nov 21, 2023
1 parent 9dd055c commit 03ec9eb
Showing 1 changed file with 0 additions and 8 deletions.
8 changes: 0 additions & 8 deletions episodes/05-data-structures-part2.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -138,14 +138,6 @@ cats <- rbind(cats, cats)
cats
```

But now the row names are unnecessarily complicated. We can remove the rownames,
and R will automatically re-name them sequentially:

```{r}
rownames(cats) <- NULL
cats
```

::::::::::::::::::::::::::::::::::::::: challenge

## Challenge 1
Expand Down

0 comments on commit 03ec9eb

Please sign in to comment.