Help with Learn R project A/B Testing for ShoeFly.com

Hi there,

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 %>%
  group_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 :confused:

This is the solution:
percentage_by_utm ← ad_clicks %>%

group_by(utm_source, ad_clicked) %>%

summarize(count = n()) %>%

mutate(percentage = count/sum(count) )

percentage_by_utm

It didn’t work for me. Still getting the same error:

Error: Problem with `mutate()` column `percentage`.
ℹ `percentage = count/sum(count)`.
✖ invalid 'type' (closure) of argument
ℹ The error occurred in group 1: utm_source = "email".

Hide

I think you rewrite count or other variable.

Actually I just copied what you said it was the solution.
But at this point I guess it is just a bug in the exercise.

Can you copy.paste all your code ([How to] Format code in posts) here OR share screenshot(s) showing your code and output? It may offer some clues as to whether there is a mistake or a bug. In malcolmcheyne’s screenshot, summerize is not correct. It should be summarize or summarise.