Displaying 1 result from an estimated 1 matches for "tg_name3".
Did you mean:
tg_name1
2012 Jan 25
1
Converting strings into data frame column names
...9;ph2007','ph2006') #Name of original
data frames
for (i in phList) {
x<-c(paste(i,"$ID",sep=""),paste(i,"$DATE_DISPENSED",sep=""),paste(i,"$TG_NAME1",sep=""),
paste(i,"$TG_NAME2",sep=""),paste(i,"$TG_NAME3",sep="")) # I may be over
complicating things here!?
phNew<-rbind(phNew,(data.frame(ID=get(x[1]), DATE_DISPENSED=get(x[2]),
TG_NAME1= get(x[3]), TG_NAME2=get(x[4]), TG_NAME3=get(x[5]))))
}
The error i get is that the columns for extration are not recognised as
objects which i...