搜索
人大经济论坛 附件下载

附件下载

所在主题:
文件名:  DATA0403MODIGRAF4.pdf
资料下载链接地址: https://bbs.pinggu.org/a-1623488.html
附件大小:
113.03 KB   举报本内容

with the below dataset, the variables are CONCentration, DOSE and TIME. I would like to display dosing information in the gap plots (see attachment).

Dosing records are the records with the variable of DOSE > 0 and variable of CONCentration = NA; concentration records are the records with the variable of CONCentration > 0 and variable of DOSE ='.'

The only problem on the right panel of the attached gap plot is the first dosing information should be 2.4mg at 167.833hr (see in data), but looks like third dosing record which is 2mg at 23.8333hr in the data to show on the right panel of the gap plot with text() and arrow(). I really don't know how to deal with this with gap.plot. When using gap.plot() to separate the DoseTime, pch only pick single character. Looking forward to your instructions.



  1. [code]
  2. library(plotrix)
  3. gap.plot(data$TIME[data$DOSE=='.'],data$CONC[data$DOSE=='.'], type='b',lty=1,lwd=2, col=2,
  4. gap.axis='x',gap=c(17,163),
  5. xtics=c( 0,10, 160, 165, 170, 175),
  6. ytics=c(0,5, 10, 15, 20, 25, 30, 35),
  7. xlab='Time(hr)',
  8. ylab='Concentration(ng/ml)',cex=0.9)
  9. Mg <- as.numeric(data$DOSE[data$DOSE > 0])
  10. DoseTime <- as.numeric(data$TIME[data$DOSE > 0])
  11. text(DoseTime, max(data$CONC[!is.na(data$CONC)]),paste(Mg,'mg',sep=''),cex=1,col=2)
  12. arrows(DoseTime, 0.95 * max(data$CONC[!is.na(data$CONC)]),DoseTime, 0.85* max(data$CONC[!is.na(data$CONC)]),col=2,lwd=2,length=0.1,cex=0.2)
复制代码
[/code]

#### data

  1. [/font][/align][align=left][font=Consolas]data = structure(list(CONC = c(NA, 23.9, 30.1, 20.5, 14.3, 6.53, 4.95,
  2. NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, NA, 10.8, NA,
  3. 25.2, 24.5, 21.6, 13.5, 8.19, 6.1, NA, NA, NA, NA, NA, NA, NA,
  4. NA, NA, NA, NA, NA), DOSE = c("2", ".", ".", ".", ".", ".", ".",
  5. "1.8", "2", "1.8", "2", "2.4", "2.4", "2.4", "2.4", "2.4", "2.4",
  6. "2.4", "2.4", "2.4", ".", "2.4", ".", ".", ".", ".", ".", ".",
  7. "2.4", "2.4", "2.4", "2.4", "2.4", "2.4", "2.4", "2.4", "2.4",
  8. "2.4", "2.4", "2.4"), TIME = c(0, 0.5, 1, 2, 4.083, 8.167, 12,
  9. 13, 23.833, 37, 49.583, 59.833, 73.667, 83.333, 96.333, 108,
  10. 120.333, 132.333, 144.583, 155.833, 167.75, 167.833, 168.333,
  11. 168.833, 169.833, 171.833, 175.833, 179.833, 179.833, 192.417,
  12. 203.333, 216.333, 228.333, 240.583, 252.833, 263.833, 275.833,
  13. 288.583, 300.583, 336.333)), .Names = c("CONC", "DOSE", "TIME"
  14. ), class = "data.frame", row.names = c("557", "1", "2", "4",
  15. "5", "6", "3", "1109", "558", "11101", "559", "11111", "560",
  16. "1112", "5611", "1113", "547", "1099", "548", "11001", "710",
  17. "549", "1100", "2100", "410", "510", "610", "310", "11011", "550",
  18. "1102", "5511", "1103", "552", "1104", "553", "1105", "554",
  19. "1106", "556"))[/font][/align][align=left][font=Consolas]
复制代码



    熟悉论坛请点击新手指南
下载说明
1、论坛支持迅雷和网际快车等p2p多线程软件下载,请在上面选择下载通道单击右健下载即可。
2、论坛会定期自动批量更新下载地址,所以请不要浪费时间盗链论坛资源,盗链地址会很快失效。
3、本站为非盈利性质的学术交流网站,鼓励和保护原创作品,拒绝未经版权人许可的上传行为。本站如接到版权人发出的合格侵权通知,将积极的采取必要措施;同时,本站也将在技术手段和能力范围内,履行版权保护的注意义务。
(如有侵权,欢迎举报)
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

GMT+8, 2026-1-2 07:53