Dear Sir/Madam, I found your email address and your correspondence with R-users. I hope you could help me with this question about the function "ur.ers" in the package of "urca". It is an improved unit root test (Elliott et al. 1996 Econometrica). Do you know how to extract the value of the test statistic from the output? The only thing I can get is the print-out of all results including the test statistic. But I am wondering whether the value is saved somewhere, like g$coef will give you the estimated coefficient, where g is a linear model lm object. Thank you very much. Best regards, Keli Xu [[alternative HTML version deleted]]
Hi there, I am very new to R.I have to write the code for the following scenario Snp_Id Gene name score 1 a 2 b 3 a 4 b are the three columns in my table.There are many snp,s for a particular gene.I have to group all the snp to its corresponding genname. my output should be genename a should have both the gene id 1 and 3. genename b should have gene id 2 and 4 Kindly help me. Ramya Thulasingam -- View this message in context: http://www.nabble.com/R-help-tp18083552p18083552.html Sent from the R help mailing list archive at Nabble.com. [[alternative HTML version deleted]]
You can use split(x$Snp_ID,x$Gene) where x is your data.frame (see ?split). --- On Tue, 24/6/08, Rajasekaramya <ramya.victory at gmail.com> wrote:> From: Rajasekaramya <ramya.victory at gmail.com> > Subject: [R] R help > To: r-help at r-project.org > Received: Tuesday, 24 June, 2008, 2:27 PM > Hi there, > > I am very new to R.I have to write the code for the > following scenario > > Snp_Id Gene name score > 1 a > 2 b > 3 a > 4 b > are the three columns in my table.There are many snp,s for > a particular > gene.I have to group all the snp to its corresponding > genname. > > my output should be > > genename a should have both the gene id 1 and 3. > genename b should have gene id 2 and 4 > > Kindly help me. > Ramya Thulasingam > > > > > -- > View this message in context: > http://www.nabble.com/R-help-tp18083552p18083552.html > Sent from the R help mailing list archive at Nabble.com. > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, > reproducible code.
dear Xu, does:>library(urca) >example(ur.ers) >ers.gnp >str(ers.gnp) >ers.gnp at teststat,do what you want? (this reminds me that I have to learn S4 sometime) best, Gustaf Rydevik On Tue, Jun 24, 2008 at 3:52 AM, Xu, Ke-Li <keli.xu at ualberta.ca> wrote:> Dear Sir/Madam, > > I found your email address and your correspondence with R-users. I hope > you could help me with this question about the function "ur.ers" in the > package of "urca". It is an improved unit root test (Elliott et al. 1996 > Econometrica). Do you know how to extract the value of the test > statistic from the output? The only thing I can get is the print-out of > all results including the test statistic. But I am wondering whether the > value is saved somewhere, like g$coef will give you the estimated > coefficient, where g is a linear model lm object. > > Thank you very much.> > Best regards, > Keli Xu > > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. >-- Gustaf Rydevik, M.Sci. tel: +46(0)703 051 451 address:Essingetorget 40,112 66 Stockholm, SE skype:gustaf_rydevik
?subset may help. --- On Tue, 6/24/08, Rajasekaramya <ramya.victory at gmail.com> wrote:> From: Rajasekaramya <ramya.victory at gmail.com> > Subject: [R] R help > To: r-help at r-project.org > Received: Tuesday, June 24, 2008, 12:27 AM > Hi there, > > I am very new to R.I have to write the code for the > following scenario > > Snp_Id Gene name score > 1 a > 2 b > 3 a > 4 b > are the three columns in my table.There are many snp,s for > a particular > gene.I have to group all the snp to its corresponding > genname. > > my output should be > > genename a should have both the gene id 1 and 3. > genename b should have gene id 2 and 4 > > Kindly help me. > Ramya Thulasingam > > > > > -- > View this message in context: > http://www.nabble.com/R-help-tp18083552p18083552.html > Sent from the R help mailing list archive at Nabble.com. > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, > reproducible code.__________________________________________________________________ [[elided Yahoo spam]]
hi, I have a question could please help me. Geneset.ls <- list() for(i in 1: 5452) { Geneset.ls[[i]] <- read.delim("c.all.v2.5.symbols.gmt", header=T, skip=1, sep="\t") } I have a file named c.all.v2.5.symbols.gmt.it is a huge file with about 30 columns and 5452 rows. I want to write single rows in the Geneset.ls(). and then bind them again can i use rbind for it but i dont know how to use it. I am basically working DNA Microarray expression data
Hi, Thank u so much for resolving my problem Ramya -- View this message in context: http://www.nabble.com/R-help-tp18121494p18126036.html Sent from the R help mailing list archive at Nabble.com.
Hi, I have a problem in assessing the list element. i have list called geneset it contains the following elements > geneset [[1]] V1 V2 V3 .......V200 Genename gene1 gene2....gene200 [[2]] V1 V2 V3 V4...V[240] Genename gene1 gene2....gene240 : : : : : [[5431]] i want to get V1 values for all the elements(1:5431) in the geneset in a may be in a vector or in any other form Ramya Thulasingam -- View this message in context: http://www.nabble.com/R-help-tp18156475p18156475.html Sent from the R help mailing list archive at Nabble.com.
try this: firstgenes = lapply(geneset, function(x){return(x[1,1])}) firstgenes = do.call(rbind(firstgenes)) on 06/27/2008 10:33 AM Rajasekaramya said the following:> Hi, > > I have a problem in assessing the list element. > > i have list called geneset it contains the following elements > > > geneset > [[1]] > V1 V2 V3 .......V200 > Genename gene1 gene2....gene200 > > [[2]] > V1 V2 V3 V4...V[240] > Genename gene1 gene2....gene240 > : > : > : > : > : [[5431]] > > > i want to get V1 values for all the elements(1:5431) in the geneset in a > may be in a vector or in any other form > > > Ramya Thulasingam
Hi Rajasekaramya sapply(geneset[1:5431], "[[", "V1") or Bioconductor::subListExtract(geneset[1:5431], "V1") Martin Rajasekaramya wrote:> Hi, > > I have a problem in assessing the list element. > > i have list called geneset it contains the following elements > > > geneset > [[1]] > V1 V2 V3 .......V200 > Genename gene1 gene2....gene200 > > [[2]] > V1 V2 V3 V4...V[240] > Genename gene1 gene2....gene240 > : > : > : > : > : [[5431]] > > > i want to get V1 values for all the elements(1:5431) in the geneset in a > may be in a vector or in any other form > > > Ramya Thulasingam-- Martin Morgan Computational Biology / Fred Hutchinson Cancer Research Center 1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109 Location: Arnold Building M2 B169 Phone: (206) 667-2793