简体   繁体   中英

How do I qqplot values from different treatment groups?

enter image description here I apologize for the simple question, I just started using R for my school assignment. I am trying to make 3 qq plots for each treatment group (ie control, QA-PBS,QA-iPSC), but I dont know how to describe it to find the function online. Here is the image of the data. Thank you very much.

Experimental

Data<-structure(list(group = c("Control", "Control", "Control", "Control","Control","Control","QA-PBS","QA-PBS","QA-PBS","QA-PBS","QA-PBS","QA-PBS","QA-PBS","QA-iPSC","QA-iPSC","QA-iPSC","QA-iPSC","QA-iPSC","QA-iPSC","QA-iPSC"),crossovers = c(9L,6L,10L,10L,8L,9L,0L,1L,0L,4L,4L,2L,4L,6L,8L,5L,8L,5L,7L,4L)),.Names=c("group","crossovers"),row.names=c(NA,-20L),class=c("tbl_df","tbl","data.frame"),spec= structure(list(cols=structure(list(group=structure(list(),class=c("collector_character","collector")),crossovers=structure(list(),class=c("collector_integer","collector"))),.Names=c("group","crossover)),default=structure(list(),class =c("collector_guess","collector"))),.Names=c("cols","default"),class="col_spec"))

If you will accept a ggplot2 solution, then you can do the following:

df %>%
  ggplot(aes(sample = crossovers)) +
  geom_qq() + geom_qq_line() +
  facet_wrap(~group, scales = "free_y")

在此处输入图片说明

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM