Project: A/B Testing for Shoefly.com

Hi there! Does somebody know how to solve task number 7 in the following project: https://www.codecademy.com/courses/learn-r/projects/r-aggregates-shoefly

How do you count the number of rows in each ad_clicked / experimental_group combination? I only get Error-Messages…

Thank you for your help!

Can you share your code so we can give you a hint rather than just providing the answer? Use the </> to post your code.

Can you summarize (U.S. spelling) the information you’re looking for?

Hi harrjt!
Here is my code:

# define clicks_by_experiment here:
clicks_by_experiment <- ad_clicks %>%
    group_by(experimental_group, ad_clicked) %>%
    summarize(count = n(ad_clicked, experimental_group))
    print(clicks_by_experiment)

It gives me two different error-messages:
1.

Error in n(ad_clicked, experimental_group): unused arguments (ad_clicked, experimental_group)
  1. It says that it can’t find the argument ‘clicks_by_experiment’.

I’m trying to find out if more users clicked on add A or B. Did I unterstand the task?

You correctly grouped the data, now you only need to use the count function

summarize(count=n())

Well it’s strange, I tried this out before but it didn’t work. I probably had to close everything and restart. Anyway now it works and I can continue. Thank you for your help @harrjt!