Trying the project A/B Testing for ShoeFly.com from Learn R.
Can’t get part 10 & 11 to work.
Have tried it myself and even copied and pasted from the hint tab. Still have the same error each time.
# define b_percentage_by_day here:
b_percentage_by_day <- b_clicks_by_day %>%
mutate(percentage = count/sum(count))
Error: Problem with `mutate()` column `percentage`.
ℹ `percentage = count/sum(count)`.
✖ invalid 'type' (closure) of argument
ℹ The error occurred in group 1: day = "1 - Monday".
I am having the same issue.
I am also having this issue, although my error says that they can’t find the column ‘day’. I think there’s a bug or something wrong with the lesson (my theory is that since we’ve filtered the data set by column and are now calling on the filtered data set instead of the original var tied to the .csv, it’s skipping over the ‘day’ column entirely which leads to the error)
I’ve reported the potential bug twice now, still nothing
This is the solution:
percentage_by_utm ← ad_clicks %>%
group_by(utm_source, ad_clicked) %>%
summarize(count = n()) %>%
mutate(percentage = count/sum(count) )