Object Not Found keeps happening even though it works sometimes

I've been having this problem with multiple datasets: Palmer Penguins, Anscombe’s Quartet, and my own csv I created and imported.
I'm careful to load my packages in this order before I start work: tidyverse, here, skimr, janitor.

I'll run a basic line of code and get an error object not found, then I'll run a different line with the same object and it'll work fine. Then, I'll re-run the original line of code and sometimes it works the second time but sometimes it still gets the same error.

Any ideas? Thanks!

In your example, the first command is group_by(set) since set is not a dataframe but a column of quartet the error you get is the expected result

In your second and last chunks of code you get no error message because you are using correct syntax.

Thanks, Andres, do you mean that when I use the summarize function I must preface it with the quartet %>%?

Not exactly, what I'm saying is that you need to use proper syntax, the pipe operator (%>%) passes anything on its left side as the first argument for the function on its right side. For example, these two lines of code are equivalent:

quartet %>% group_by(set)

group_by(quartet, set)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.