search for: trialnum

Displaying 2 results from an estimated 2 matches for "trialnum".

Did you mean: dialnum
2010 Apr 30
0
RMySQL and dates
I am trying to read and write database tables that have a date field in them. I am constructing a data.frame, then using dbWriteTable to create the table and dbReadTable to read it. >datatbl<-data.frame( dates, trialnum, fooddel, ethdel, trialtime, trialtype, deliveries, food, ethanol, fcumrec, dcumrec, rrf, rrd) >ifelse(startdate==filelist, filetbl<-datatbl,filetbl<-rbind(filetbl, datatbl)) >dbWriteTable(con, subj, as.data.frame(filetbl), overwrite=T) This creates the table named for the conten...
2009 May 23
1
Clean up a complex variable
...5(a=1) >5.32(a=1) what i need to do is to remove the text (a=1) and (b=1) and the ">" in the V1, and then convert to a numeric variable, and als I am aslo requested that when the value has a=1, the value needs to be divided by 5. what I did is: trialchara<-as.character(trial$V1) trialnum<-gsub("(a=1)|(b=1)|>","",trialchara) the result is [1] "0 ()" "0 ()" "0.133 ()" "0.555 ()" "5.32 ()" How can I get rid of the () symbol? How can I do this part "when the value has a=1, the value needs to be divided by...