0
votes

Hello I was wondering how to select a group within a group and plot the results.

For example I have a group called "type" and within the type I have:

photo, video, text

I want to take out only photo and plot the likes the photo got. I hope this made sense. I need it in R. I know in python i would use pandas.

With library(tidyverse) you can filter to a single category with filter(). For example data %>% filter(type == "photo") - Mako212
A working example: library(tidyverse); iris %>% filter(Species == "setosa") - Mako212
A group of what? Are you trying to subset a data frame? Take a look again at How to Ask and see how to make a minimal reproducible example, but questions on subsetting data (if that's what you're trying to do) have been covered pretty extensively on SO already, so you should be able to search around the r tag and find something - camille