how to make the plot with R and data the below SAS code created

COS论坛 | 统计之都 讨论区 统计学世界 特别兴趣小组 统计图形与数据可视化 how to make the plot with R and data the below SAS code created

该主题包含 0 条回复,1个帖子,最后由  verbatim6 天, 1 小时 之前 更新。

查看 1 个帖子(总计 1 个)
  • 作者
    帖子
  • 1 楼

    verbatim
    Participant
    
    conmed = structure(list(id = c(2L, 2L), cmstdate = structure(c(2L, 1L), .Label = c("1/1/2014", 
    "1/3/2014"), class = "factor"), cmmed = structure(c(2L, 1L), .Label = c("Inducers", 
    "Inhibitors"), class = "factor"), cmstdy = c(2L, 0L), cmendy = c(4L, 
    1L), cmlocap = c(NA, NA), cmhicap = c(NA, NA), cmseq = 0:1), .Names = c("id", 
    "cmstdate", "cmmed", "cmstdy", "cmendy", "cmlocap", "cmhicap", 
    "cmseq"), class = "data.frame", row.names = c(NA, -2L))
    
    
    proc sgplot data=conmed noautolegend nocycleattrs;
     refline 0 / axis=x lineattrs=(thickness=1 color=black);
     
     highlow y=cmseq low=cmstdy high=cmendy / type=bar barwidth=0.8 lowlabel=cmmed
     lowcap=cmlocap highcap=cmhicap fillattrs=(color=cx9BDCF2);
     scatter y=cmseq x=cmstdate / markerattrs=(size=0) x2axis;
    
    yaxis display=(nolabel noticks novalues) min=0;
     xaxis grid label='Study Days' offsetmax=0.02;
     x2axis notimesplit display=(nolabel) offsetmax=0.02 tickvalueformat=date7.;
     run;
    
查看 1 个帖子(总计 1 个)

您必须先登录才能回复该主题。