Dear All,

I am looking for a code in dosing sequence for multiple dosing, pop PK. The
problem with my data is some of the subjects are upto 240 days some dropped
down at 60 days and some have data from 50 day.
I have the following code, however I facing error problem
#Error in rbind(deparse.level, ...) :
  numbers of columns of arguments do not match

#DOSING SEQUENCE
setwd("C:/Documents and Settings/slanke/Desktop/Efavirenz/EFV Data Sets")
getwd()
data<-read.csv("S240.csv")
attach(data)
dat<- read.table(file = "S240.CSV", sep = ",", header = T)
nrow(dat)
ncol(dat)
head(dat)
tail(dat)
length(dat)
nrow(dat)
ncol(dat)
DOSING<-expand.grid(ID=unique(dat$ID),DAY=1:TRUE)
DOSING<-24*(DOSING$DAY-1)
DOSING<-expand.grid(ID=unique(dat$ID),DAY=1:TRUE)
DOSING$TIME<-24*(DOSING$DAY-1)
DOSING$MDV<-DOSING$EVID<-rep(1,nrow(DOSING))
DOSING$DV<-rep(".",nrow(DOSING))
doseData<-unique(dat[,c("ID","AMT")])
names(doseData)[2]<-"AMT"
DOSING<-merge(DOSING,doseData)
DOSING$AMT<-as.character(DOSING$AMT)
dat$MDV<-dat$EVID<-rep(0,nrow(dat))
dat$DV<-format(dat$DV,trim=T,digits=4,nsmall=1)
dat$TIME<-dat$TIME+24*(dat$DAY-1)
dat$AMT<-rep(".",nrow(dat))
allData<-rbind(dat[,-2],DOSING)

-- 
Regards,
Shankar Lanke Ph.D.
University at Buffalo
Office # 716-645-4853
Fax # 716-645-2886
Cell # 678-232-3567

	[[alternative HTML version deleted]]


