stuart-lab / signac

R toolkit for the analysis of single-cell chromatin data
https://stuartlab.org/signac/
Other
330 stars 88 forks source link

What does this error mean and how can I fi x it in R studio on a mac? #1812

Closed zunny-d closed 2 weeks ago

zunny-d commented 2 weeks ago

I am working on this assignment for school, and I cannot figure out why this code is coming back with an error Code: dev.new() #Mac users use dev.new() justin.counts %>% filter(Basketball == "Spalding Basketball") %>% filter(n > 5) %>% #words should occur more than 5 times, you can change this number group_by(Rating) %>% ungroup() %>% mutate(word = reorder(word, n)) %>% head(50) %>% #limits total number of words to the top 60 words, you can change this number ggplot(aes(word, n, fill=sentiment))+ #remove x and y geom_col(show.legend = F)+ facet_wrap(~Rating, scales= "free_y")+ scale_fill_manual(values = alpha(c("#CDC8B1", "#ADD8E6"))) + #Important change the colors. labs(y = "Spalding Basketball Contribution to Sentiment by Number of Stars", x = NULL)+

**add text size code

**Important: Make sure you changed the labels

coord_flip() #Bing sentiment by number of stars

Error message: Error in combine_vars(): ! Faceting variables must have at least one value.

What does this error mean and how can I resolve it?

Thank you

# insert reproducible example here