When I run tibble(*filenamehere*), I get a 5000x100 grid. When I run summarize(*filenamehere*), it says "data frame with 0 columns and 1 row"?

This is what it looks like in my console:

Is this supposed to happen? What I wanted to do was get more information on all the responses to Q1, and see if there was any response other than "1", so I tried:


but kept getting this message:

Error in UseMethod("summarise_") :   no applicable method for 'summarise_' 
applied to an object of class "c('integer', 'numeric')" 

So I tried using the summarize(nonvoters) to see if I would get the same problem, and instead I get this unexpected message that appears to say there is no data in nonvoters?? But when I run the tibble, it clearly shows the same data.

I'm struggling with understanding how R works and what exactly certain commands do, so please assume I know absolutely nothing - something I've struggled with when trying to self-teach myself some R is that I just don't understand the self-help guides I see online, or there appears to be a big gap between what most intro guides teach and what you're expected to know once you've finished the intro guides. If anyone has any comprehensive R learning resources outside of the "let's start with R being a basic calculator"-esque videos, I would MUCH appreciate it.

Perhaps you mean to use summary(nonvoters)
You can also summary(nonvoters$Q1)
and table(nonvoters$Q1)


Well, now I feel silly. Thank you, you're absolutely right.

This topic was automatically closed 7 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.