this is my dataset:
this is my coding:
library(ggplot2)
alcoholpercentage=rep(0:2, each=4)
embryograding=rep(c("gradeone","gradetwo","gradethree","gradefour"), times=3)
numberofembryos=sample(0:11, 12)
df=data.frame(alcoholpercentage,embryograding,numberofembryos)
however, this dataframe completely changes the number of embryos from my original dataset. I think the '=sample' bit is wrong but I'm not completely sure how this works.
thanks!