this is my data set:
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)
df
the number of embryos change when I'm trying to form my dataframe:
alcoholpercentage embryograding numberofembryos
1 0 gradeone 5
2 0 gradetwo 3
3 0 gradethree 11
4 0 gradefour 1
5 1 gradeone 10
6 1 gradetwo 0
7 1 gradethree 2
8 1 gradefour 9
9 2 gradeone 8
10 2 gradetwo 4
11 2 gradethree 6
12 2 gradefour 7
the '=sample' bit is probably wrong as I'm not completely sure how to use that.