Displaying 3 results from an estimated 3 matches for "bygroup".
Did you mean:
mygroup
2010 Aug 04
1
SQLDF from Variable Matrix
...art of commands I use routinely with several dataset
so I would like to make it into function. The simplified examples are
Test<-data.frame(A=c('a','b','c','a','b','c'),B=c(1,2,3,4,5,6))
#Create function (This one work)
GetAvg<-function(Input,Bygroup){
AVG<-fn$sqldf("select A, avg(B) as Average, median(B) as Median
from Test
group by $Bygroup")
return(AVG)
}
Result<-GetAvg(Test,'A')
#Create function (This one does not work)
GetAvg<-function(Input,Bygroup){
AVG<-fn$sqldf("select A, avg(B) as Average, m...
2008 Mar 02
1
Problem plotting curve on survival curve (something silly?)
...ssion
However for now I've borrowed a dataset from the BMJ (CSV tabs seperated
version here:
http://www.wittongilbert.free-online.co.uk/HepatitisData.csv ) and am
trying to plot some curves.
I've succeeded in plotting a Kaplan-Meier Survival Curve by using the
following:
> my_var.bygroup <- survfit(Surv (Survival, Censored==0) ~
TreatmentGroup, data=TestData)
> plot(my_var.bygroup, conf.int=FALSE, col=c("black","grey"), lty=1:2,
legend.text=c("Placebo","Prednisolone"), main="dKaplan-Meier Survival
Curve", xlab="Time...
2007 Sep 28
2
plot graph with error bars trouble
Hi,
I have a data set like this:
Mutant Rep Time OD
02H02 1 0 0.029
02H02 2 0 0.029
02H02 3 0 0.023
02H02 1 8 0.655
02H02 2 8 0.615
02H02 3 8 0.557
02H02 1 12 1.776
02H02 2 12 1.859
02H02 3 12 1.668
02H02 1 16 3.379
02H02 2 16 3.726
02H02 3 16 3.367
306 1 0 0.033
306 2