Re: [R] Reading dataset in R

2013-03-25 Thread Zjoanna
0L cterm1_P0H c11 c12 c1 c2 alpha beta > T_error N > #1 4 4 10 8 0.8145062 0.6634204 0.03 0.05 0.15 0.2 0.1 0.4 > 0.6918138 18 > #2 5 4 9 8 0.7737809 0.6302494 0.03 0.05 0.15 0.2 0.1 0.4 > 0.6643599 17 > # ENBHBL AH

Re: [R] Reading dataset in R

2013-03-22 Thread Zjoanna
Hi, I also need to read this format of file in R, it is a Wordpad file. On Thu, Mar 21, 2013 at 5:07 PM, arun wrote: > > > Hi, > con<-file("Rout1112.text") > Lines1<- readLines(con) > close(con) > indx<-rep(rep(c(TRUE,FALSE),each=2),2) > Lines2<-Lines1[!grepl("[A-Za-z]",Lines1)] > > > res<

Re: [R] cumulative sum by group and under some criteria

2013-02-27 Thread Zjoanna
Hi, I need to change one or several parameters and run the same code several times, how to create a macro with parameters in R? On Wed, Feb 27, 2013 at 7:45 AM, arun kirshna [via R] < ml-node+s789695n4659801...@n4.nabble.com> wrote: > dat1<- read.table(text=" > m1 n1 m nA BC D > 2

Re: [R] cumulative sum by group and under some criteria

2013-02-26 Thread Zjoanna
gt; what I wanted. So for the 4th observation x=1, m=4, y=0, n =4 the Fmm2, > Fnn2 should be consistent with the values of Fmm2, Fnn2 from the following > code. > Pm2<-rbeta(1000, 0.2+1, 0.8+3) #obs4 Pn2<-rbeta(1000, 0.2, 0.8+4) Fm2<- ecdf(Pm2) Fn2<- ecdf(Pn2) Fmm2<-Fm2(1/4)

Re: [R] cumulative sum by group and under some criteria

2013-02-26 Thread Zjoanna
AM, arun <[hidden > >email]<http://user/SendEmail.jtp?type=node&node=4659514&i=5>> > wrote: > > > >If you can provide me the output that you expect with all the rows of the > combination in the res2, I can take a look. > >> > >> > >

Re: [R] cumulative sum by group and under some criteria

2013-02-24 Thread Zjoanna
25 0.64 0.9025 0.64 > >>>#3 2 2 0 0 4 4 0 2 0.9025 0.64 0.9025 0.64 > >>>#4 2 2 0 0 4 4 1 0 0.9025 0.64 0.9025 0.64 > >>>#5 2 2 0 0 4 4 1 1 0.9025 0.64 0.9025 0.64 > >>>#6 2 2 0 0 4 4 1 2 0.9025 0.64 0.9025 0.64 > >>> > >>

Re: [R] cumulative sum by group and under some criteria

2013-02-19 Thread Zjoanna
t; datnew<-expand.grid(5,4,4:6,2:4) > >> colnames(datnew)<- c("m","n","x","y") > >>datnew<-within(datnew,{p1<- x/m;p2<-y/n}) > >>res<-cbind(datnew,d2[rep(1:nrow(d2),nrow(datnew)),]) > >> row.names(res)<- 1:nrow(res) > >>

Re: [R] cumulative sum by group and under some criteria

2013-02-18 Thread Zjoanna
4 0 > 2 2 0 0 4 4 1 > 2 2 0 0 4 4 2 > 2 2 0 0 4 5 0 > 2 2 0 0 4 5 1 > 2 2 0 0 4 5 2 > > On Tue, Feb 12, 2013 at 8:19 PM, arun <[hidden > email]<http://user/SendEmail.jtp?type=node&node=4658895&i=5>> &g

Re: [R] cumulative sum by group and under some criteria

2013-02-10 Thread Zjoanna
uot;), row.names = c(NA, > >>>33L), class = "data.frame") > >>> > >>>library(zoo) > >>>lst1<- split(d,list(d$m1,d$n1)) > >>>res2<-do.call(rbind,lapply(lst1[lapply(lst1,nrow)!=0],function(x){ > >>>x[,11:14]<

Re: [R] cumulative sum by group and under some criteria

2013-02-05 Thread Zjoanna
0.500 0.0001128125 0.00512 0.00 > > > 0.0 0.00249968750.03968 > >#20 3 2 3 1 1.00 0.58 0.210 0.210 0.118750 0.00256 0.00 > > > 0.0 0.00249968750.03968 > >#21 3 2 3 2 1.00 1.00 0.000 0.000 0.003125 0.00032 0.003

Re: [R] cumulative sum by group and under some criteria

2013-02-01 Thread Zjoanna
I am new to this mailing list. Is everything I posted seen for everyone in the mailing list? or just you can see the post? On Fri, Feb 1, 2013 at 11:33 AM, arun kirshna [via R] < ml-node+s789695n465731...@n4.nabble.com> wrote: > HI, > Could you show the modified code and also str(dataset)? > A.K.