There are a few cases in the textbook where you are adding columns with other functions. For example, in chapter 2 is this code snippet:
jane_austen_sentiment <- tidy_books %>%
inner_join(get_sentiments("bing")) %>%
count(book, index = linenumber %/% 80, sentiment) %>%
spread(sentiment, n, fill = 0) %>%
mutate(sentiment = positive - negative)
I'd prefer that a separate mutate command be used to create the index column. While what you are doing is fully correct, I suspect this book is used by beginners, so it would help to have the dplyr concepts separated into their own lines.
If you agree, I'd be happy to create a pull request to address this.
There are a few cases in the textbook where you are adding columns with other functions. For example, in chapter 2 is this code snippet:
I'd prefer that a separate
mutate
command be used to create theindex
column. While what you are doing is fully correct, I suspect this book is used by beginners, so it would help to have the dplyr concepts separated into their own lines.If you agree, I'd be happy to create a pull request to address this.