0

For the dataset shown in the screenshot, I want to create a bar plot showing the count of papers published with (1) no female authors and (2) at least 1 female author

enter image description here

I tried this code below but it doesn't classify it correctly into 0 Females and not 0 Females. Instead I am just stuck at Males and Females

` authors_tbl %>%

  filter(gender %in% c('F','M')) %>%

  group_by(gender) %>%

  summarise(count = n_distinct(k))%>%

  collect() %>%

  ggplot() +

  geom_col(aes(x=gender, y=count))

`

Sankalp
  • 21
  • 3
  • 2
    Please don't use an image to show data, either copy-paste `head(my_data)` or use `dput()`. Also show any current code you have to solve this problem. Does the `k` column identify papers? – Marius Oct 15 '18 at 00:20
  • What have you tried? As is stands this question makes it appear you think SO is a code writing service. Instead we're her to helf fellow coders with specific problems. Show us some code and don't submit pictures that make it further appear that you think we are aslo a data input service. Do read help pages and [edit] lyour question to bring it up to expectations. – IRTFM Oct 15 '18 at 00:21
  • @Sankalp, check out [Example of using dput()](https://stackoverflow.com/questions/49994249/example-of-using-dput) for help on dput. – Russ Thomas Oct 15 '18 at 00:38

0 Answers0