I'm getting the above error when trying to run my R code with metabin, here's my code and error library
aa<-read.csv("C:/Users/Lizzie/Desktop/aa.csv")
aa1<-metabin(Tevent,Ttotal,Cevent,Ctotal,data=aa,sm="RR", studlab = paste(study,year), label.e = "Intervention",label.c = "Control", subgroup = "Type" )
summary(aa1)
When I run the second line of my codes, I got this error:
Error: Arguments 'event.e' and 'subgroup' must have the same length.
I really don't understand what's going on, because I'm new in R
"event.e" is number like 1, 2, 3, while "subgroup" is text like a, b, c,
Hope you guys could help me with this, thanks a lot!!