我按照R的help里面做forest plot with subgrouping of studies and summaries per subgroup,森林图的程序如下:
forest(hivres,slab=paste(hiv$author),xlim=c(-0.014,0.024),
       ilab=cbind(hiv$sample,hiv$event),ilab.xpos=c(-0.0085,-0.007),
       at=c(-0.006,-0.003,0.00,0.003,0.006,0.009,0.012,0.015,0.018),
       xlab=NA,order=order(dat$year),rows=c(3:10,13:20),
       mlab="RE Model for All Studies",
       annotate=TRUE,addfit=TRUE,addcred=TRUE,showweight=TRUE,
       digits=4,pch=15,cex=0.85,psize=NULL,cex.lab=1)
但是运行的结果却提示“Error in order(dat$year) : argument 1 is not a vector”。我不明白是什么原因,请教各位高手帮帮忙!