0

I'm in the swirl() course, Getting and Cleaning Data: swirl Lesson 2: Grouping and Chaining with dplyr, I receive an error when submitting the summarize1.R script. The script I'm submitting is identical to here:

pack_sum <- summarize(by_package,
                      count = n(),
                      unique = n_distinct(ip_id),
                      countries = n_distinct(country),
                      avg_bytes = mean(size))

The resulting error is: "Error : object '' not found"

I'm using R version 3.6.1, on Windows 10, with {dplyr} version 0.8.4, and {swirl} version 2.4.5.

Thank you! Natya

1 Answers1

0

faced the same problem a while ago, the problem is in count=n(), try the following:

pack_sum <- summarize(by_package,
                  count = sum(n()),
                  unique = n_distinct(ip_id),
                  countries = n_distinct(country),
                  avg_bytes = mean(size))
Rahim
  • 21
  • 7