[R] cannot open gplots libray
hi all i'm trying to open gplots library but i keep on getting this error: /Loading required package: gdata Error in readRDS(mapfile) : embedded nul in string: 'ref\0\0\002\0\0\0\0' Error : unable to load R code in package ‘gdata’ Error: package ‘gdata’ could not be loaded/ if i run session info the results are: /> print(sessionInfo()) R version 2.15.1 (2012-06-22) Platform: x86_64-pc-mingw32/x64 (64-bit) locale: [1] LC_COLLATE=English_United States.1252 [2] LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 [4] LC_NUMERIC=C [5] LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base other attached packages: [1] gtools_2.7.0 loaded via a namespace (and not attached): [1] tools_2.15.1 / any idea how to fix this? i updated the packages but it didn't help i run R on Windows 7! thanks! -- View this message in context: http://r.789695.n4.nabble.com/cannot-open-gplots-libray-tp4646352.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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.
[R] GSEA package error
Dear R gurus I’m trying to use the GSCA package to a series of microarray data (prostate cancer normal vs tumor (29 vs 29 paired)) but I’m running into some problems. I have a matrix (named /data_final/) with 11k rows(genes) and 60 cols (58 samples (29N vs 29T), GO IDs, KEGG IDs). I also have a separate vector GS with the GO IDs mapped to genes (no duplicate genes but multiple IDs per gene like in col 59) However when I try to run: /singleDC(data_final, group=c(1:29,30,58), GSdefList = GS, nperm = 3, permDI=TRUE)/ I get an error/ “unused argument(s) (permDI=TRUE)”/ When I run it without that argument it runs indefinitely even if I use only 100 rows data_final[1:100,]. Furthermore when I block the computation I get the error: /Error in `[.data.frame`(fixed.gs.data, , (csum.group[i-1] + 1):csum.group[i]) : Undefined colums selected/ If you could give me some ideas on how to have it working that would be extremely useful! Seb -- View this message in context: http://r.789695.n4.nabble.com/GSEA-package-error-tp4651223.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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.
Re: [R] GSCA package error
it's the GSCA packagei made a typo in the subject, my apologies the package is available from here http://www.biostat.wisc.edu/~kendzior/GSCA/ i am now trying to do co-expression analysis using EBcoexpress but looks like i have a similar problem due to the sample size! thanks! -- View this message in context: http://r.789695.n4.nabble.com/GSEA-package-error-tp4651223p4651310.html Sent from the R help mailing list archive at Nabble.com. __ R-help@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.
[R] FOR loop with statistical analysis for microarray data
hi all i started recently using R and i found myself stuck when i try to analyze microarray data. i use the "affy" package to obtain the intensities of the probes, i have two CTRs and two treated. HG.U133A.Experiment1.CEL HG.U133A.Experiment2.CEL HG.U133A_Control1.CEL HG.U133A_Control2.CEL 1007_s_at 2156.23115467.75615 364.60615 362.11865 1053_at 88.76368 93.58436 438.49365 357.75615 117_at 144.00743101.26120 95.7 107.01623 121_at 551.36865639.45615 456.66865 435.95615 1255_g_at 65.33164 18.39570 14.22565 20.74632 1294_at 106.19083169.69369 78.15722 81.14689 i divided the first two columns in two data.frames to divide Experim and CTRs then, i created a FOR loop to create a vector per each row containing a vector with two values per each gene and i wanted to do a Wilcox.test to obtain the significant genes..BUT i get a list of NULL like you can see here ..the first row works but then i get NULL down till the end of the array... fcpv [1,] "1007_s_at" -20.248 0.4664612 [2,] "1053_at" -344.7132 NULL [3,] "117_at"NULL NULL [4,] "121_at"NULL NULL [5,] "1255_g_at" NULL NULL [6,] "1294_at" NULL NULL the script i used is: === fc=0 pv=0 for (i in 1:nrow(data)) { v1= c(y1[i,1], y1[i,2]) v2= c(y2[i,1], y2[1,2]) fc=v1-v2 w=t.test(v1,v2) pv=w$p.value fc[i]= w[1] pv[i]= w[2] } results = cbind(row.names(y1), fc, pv) head(results) what did i do wrong? i can't find a way around this!!! thanks so much!!! Seb __ R-help@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.
Re: [R] FOR loop with statistical analysis for microarray data
y1,y2 were designed as follow,from the original data file : y1=data[,1:2] y2=data[,3:4] ...I am a bit confused with what "redesign the whole vector again" and "specify indices twice " actually mean?...could u point it out in the script? Thanks so much I really appreciate it!! Sent from my -DROID- On Oct 26, 2011 6:56 PM, "Weidong Gu" wrote: > > If you provide an example data (y1 and y2 in the loop), you might have > got specific helps already. A few things in your loop seem suspicious. > fc and pv are vectors, and in each loop you redesigned the whole > vectors and specific indices twice. That may cause your problems. > > Weidong Gu > > > > On Wed, Oct 26, 2011 at 4:56 PM, Seb wrote: > > hi all > > > > i started recently using R and i found myself stuck when i try to > > analyze microarray data. > > > > i use the "affy" package to obtain the intensities of the probes, i > > have two CTRs and two treated. > > > > HG.U133A.Experiment1.CEL HG.U133A.Experiment2.CEL > > HG.U133A_Control1.CEL HG.U133A_Control2.CEL > > 1007_s_at 2156.23115467.75615 > > 364.60615 362.11865 > > 1053_at 88.76368 93.58436 > > 438.49365 357.75615 > > 117_at 144.00743101.26120 > > 95.7 107.01623 > > 121_at 551.36865639.45615 > > 456.66865 435.95615 > > 1255_g_at 65.33164 18.39570 > > 14.22565 20.74632 > > 1294_at 106.19083169.69369 > > 78.15722 81.14689 > > > > i divided the first two columns in two data.frames to divide Experim and CTRs > > > > then, i created a FOR loop to create a vector per each row containing > > a vector with two values per each gene and i wanted to do a > > Wilcox.test to obtain the significant genes..BUT i get a list of NULL > > like you can see here > > ..the first row works but then i get NULL down till the end of the array... > > > >fcpv > > [1,] "1007_s_at" -20.248 0.4664612 > > [2,] "1053_at" -344.7132 NULL > > [3,] "117_at"NULL NULL > > [4,] "121_at"NULL NULL > > [5,] "1255_g_at" NULL NULL > > [6,] "1294_at" NULL NULL > > > > the script i used is: > > === > > fc=0 > > pv=0 > > for (i in 1:nrow(data)) > > { > >v1= c(y1[i,1], y1[i,2]) > >v2= c(y2[i,1], y2[1,2]) > >fc=v1-v2 > >w=t.test(v1,v2) > >pv=w$p.value > >fc[i]= w[1] > >pv[i]= w[2] > > } > > > > results = cbind(row.names(y1), fc, pv) > > > > head(results) > > > > > > > > what did i do wrong? i can't find a way around this!!! > > > > thanks so much!!! > > > > Seb > > > > __ > > R-help@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. > > [[alternative HTML version deleted]] __ R-help@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.
Re: [R] FOR loop with statistical analysis for microarray data
thanks for the replies so, i remove the indices pv[i] and fc[i]..but when i run it like this: === fc=0 pv=0 for (i in 1:nrow(data)) { v1= c(y1[i,1], y1[i,2]) v2= c(y2[i,1], y2[1,2]) fc=v1-v2 w=t.test(v1,v2) pv=w$p.value } results = cbind(row.names(y1), fc, pv) head(results) = i get === Warning message: In cbind(row.names(y1), fc, pv) : number of rows of result is not a multiple of vector length (arg 2) = and the "fc" values are repeated over until the end of the rows and the "pv" is the same all across the samples...how can i fix it?! ...i apologize if it's a silly situation but i'm new to this and can't get my head around it! thanks so much!! On Thu, Oct 27, 2011 at 9:02 AM, Weidong Gu wrote: > In your loop, you assign, for example, pv twice > pv=w$p.value # pv is scalar > pv[i]= w[2] # pv is a vector > > give an example for the point > > pv=1 > pv[5]=2 > pv > [1] 1 NA NA NA 2 > > This may not be what you want. > > Weidong > > On Thu, Oct 27, 2011 at 7:40 AM, Seb wrote: >> y1,y2 were designed as follow,from the original data file : >> y1=data[,1:2] >> y2=data[,3:4] >> >> ...I am a bit confused with what "redesign the whole vector again" and >> "specify indices twice " actually mean?...could u point it out in the >> script? >> >> Thanks so much I really appreciate it!! >> >> Sent from my -DROID- >> >> On Oct 26, 2011 6:56 PM, "Weidong Gu" wrote: >>> >>> If you provide an example data (y1 and y2 in the loop), you might have >>> got specific helps already. A few things in your loop seem suspicious. >>> fc and pv are vectors, and in each loop you redesigned the whole >>> vectors and specific indices twice. That may cause your problems. >>> >>> Weidong Gu >>> >>> >>> >>> On Wed, Oct 26, 2011 at 4:56 PM, Seb wrote: >>> > hi all >>> > >>> > i started recently using R and i found myself stuck when i try to >>> > analyze microarray data. >>> > >>> > i use the "affy" package to obtain the intensities of the probes, i >>> > have two CTRs and two treated. >>> > >>> > HG.U133A.Experiment1.CEL HG.U133A.Experiment2.CEL >>> > HG.U133A_Control1.CEL HG.U133A_Control2.CEL >>> > 1007_s_at 2156.23115 467.75615 >>> > 364.60615 362.11865 >>> > 1053_at 88.76368 93.58436 >>> > 438.49365 357.75615 >>> > 117_at 144.00743 101.26120 >>> > 95.7 107.01623 >>> > 121_at 551.36865 639.45615 >>> > 456.66865 435.95615 >>> > 1255_g_at 65.33164 18.39570 >>> > 14.22565 20.74632 >>> > 1294_at 106.19083 169.69369 >>> > 78.15722 81.14689 >>> > >>> > i divided the first two columns in two data.frames to divide Experim and >> CTRs >>> > >>> > then, i created a FOR loop to create a vector per each row containing >>> > a vector with two values per each gene and i wanted to do a >>> > Wilcox.test to obtain the significant genes..BUT i get a list of NULL >>> > like you can see here >>> > ..the first row works but then i get NULL down till the end of the >> array... >>> > >>> > fc pv >>> > [1,] "1007_s_at" -20.248 0.4664612 >>> > [2,] "1053_at" -344.7132 NULL >>> > [3,] "117_at" NULL NULL >>> > [4,] "121_at" NULL NULL >>> > [5,] "1255_g_at" NULL NULL >>> > [6,] "1294_at" NULL NULL >>> > >>> > the script i used is: >>> > === >>> > fc=0 >>> > pv=0 >>> > for (i in 1:nrow(data)) >>> > { >>> > v1= c(y1[i,1], y1[i,2]) >>> > v2= c(y2[i,1], y2[1,2]) >>> > fc=v1-v2 >>> > w=t.test(v1,v2) >>> > pv=w$p.value >>> > fc[i]= w[1] >>> > pv[i]= w[2] >>> > } >>> > >>> > results = cbind(row.names(y1), fc, pv) >>> > >>> >
Re: [R] creating vector os zeros for simulations (beginner's question)
you could try this: u2=matrix(rnorm(150), nrow=5, ncol=30); u2 Seb On Thu, Oct 27, 2011 at 1:44 PM, Iara Faria wrote: > Dear R helpers, > > I know this is a simple task, but I'm new to R and I'm still havind > difficulties with the language. > I want to create 30 vectors to be used in a simulation, each with 1 columm > and 5 lines, of random numbers N(0,1). > What I tried was this: > > N=150 > u2<-rep(1:150,0) > u2<-list(matrix(0,5)) > u2 > for(i in 1:N) > { > u2[i]<-rnorm(5) > } > u2 > > ### also tried this: > > N=150 > u2<-rep((matrix(0,5)),30) > u2 > for(i in 1:N) > { > u2[i]<-rnorm(5) > } > u2 > > > The problem is none of this gives me the random numbers arranged in vectors. > I've tried other variations too, but haven't managed to get it through. > > Any help is very welcome. > Kind regards, > Iara > [[alternative HTML version deleted]] > > > __ > R-help@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. > > __ R-help@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.