Repository for the second edition of 'Data Science in Education Using R' by Emily A. Bovee, Ryan A. Estrellado, Joshua M. Rosenberg, and Isabella C. Velásquez
Hi, I'm new to GitHub and pull requests etc. so sorry if this is the wrong place for this!
I am working through Walkthrough 1 and noticed that the output for the below code does not match the output below it.
Should the last line of code be modified so that it is:
Proposed code:
# Dataset of students
df <- tibble(
male = 5,
female = 5
)
# Use mutate to create a new column called "total_students"
# populate that column with the sum of the "male" and "female" variables
df <- df %>%
mutate(total_students = male + female)
Existing code:
# Dataset of students
df <- tibble(
male = 5,
female = 5
)
# Use mutate to create a new column called "total_students"
# populate that column with the sum of the "male" and "female" variables
df %>% mutate(total_students = male + female)
Intended output:
## # A tibble: 1 x 3
## male female total_students
## <dbl> <dbl> <dbl>
## 1 5 5 10
Hi, I'm new to GitHub and pull requests etc. so sorry if this is the wrong place for this!
I am working through Walkthrough 1 and noticed that the output for the below code does not match the output below it. Should the last line of code be modified so that it is: Proposed code:
Existing code:
Intended output:
Actual output: