[R] cbind help
hi there, I need to change a column name in a dataframe.how do i do that eg abc<- dataframe abc x y z i wanna change the colum z to w. Ramya -- View this message in context: http://www.nabble.com/cbind-help-tp18532609p18532609.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] vector help
hi I have vector test. It has 3 elements. I want to join the three into one vector. "Geneset=HSA04910_INSULIN_SIGNALING_PATHWAY-157- 20". how can i do it. > class(test) [1] "character" > test [1] "Geneset=HSA04910_INSULIN_SIGNALING_PATHWAY" "157" [3] "20" Ramya -- View this message in context: http://www.nabble.com/vector-help-tp18575055p18575055.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] writing the plots
hi there, I want to write the plots in the pdfs and the details about the graph in a seperate notepad. plot(as.numeric(lapply(resultgenes,length)), main= "Geneset.gene#.bias.test",xlab="Top.Ranked.Genesets", ylab="gene.number.per.geneset") lines(loess.smooth(c(1:1000),as.numeric(lapply(resultgenes,length)), span = 2/3, degree = 1, family = "gaussian", evaluation = 50),col=2, lwd=3) i want this graph in the pdf and some notes regarding the graph in a notepad. Kindly help me Ramya -- View this message in context: http://www.nabble.com/writing-the-plots-tp18689539p18689539.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] subscript out of bounds error.
(mean.std.s2n.loss.gain[[1]]) Probe.Set.ID rho_prime r ho_prime_sdpom Expr1 matchinggenes Mean std_dev 29 SNP_A-190846347 2.47 0.75 0 PRKCZ - 0.34560. 1344 30 SNP_A-213137044 2.61 0.58 0 PRKCZ -0.32700.1517 31 SNP_A-220300945 2.67 0.58 0 PRKCZ -0.3242.1555 32 SNP_A-209854643 2.81 0.58 1 PRKCZ -0.3212 0.155 33 SNP_A-226456542 2.90 0.58 1 PRKCZ 0.3400.1782 34 SNP_A-178872841 2.84 0.58 1 PRKCZ 0.339 .1778 1398 SNP_A-1834906 25 1.90 0.42 0 FRAP1 -0.2710 0.03668 1399 SNP_A-2146504 25 1.90 0.42 0 FRAP1 -0.2700.03627 1400 SNP_A-230730925 1.90 0.42 0 FRAP1 -0.061 0.0820 1401 SNP_A-226165827 2.07 0.42 0 FRAP1 -0.276 0.04101 1402 SNP_A-427448129 2.21 0.42 0 FRAP1 -0.277 0.0412 1403 SNP_A-205307029 2.21 0.42 0 FRAP1 - 0.285 0.0501 1404 SNP_A-427638229 2.21 0.42 0 FRAP1 -0.30060.0523 mean.std.s2n.loss.gain is a l;ist object of length 1000.for sample i have provided with 1 element in the list. I want to calculate the mean and std dev for the unique genes.I wrote a code for that.but it is throwing me an error subscript out of bounds for .unique.genes[[i]] genes.info.unique <- lapply(mean.std.s2n.loss.gain,function(.unique){ .unique.genes<-unique(.unique[,6]) .unique.genes<-as.vector(as.matrix(.unique.genes)) snpnumber<-list() mean.genes<-list() sd.genes<-list() class(.unique.genes) for(i in 1:length(.unique.genes)) { snpnumber[[i]]<- length(.unique[.unique[,6] %in% .unique.genes[[i]],1]) mean.genes[[i]]<-mean(.unique[.unique[,6] %in% .unique.genes[[i]],7]) sd.genes[[i]]<-sd(.unique[.unique[,6] %in% .unique.genes[[i]],7]) } cbind(.unique.genes,unlist(snpnumber),unlist(mean.genes),unlist(sd.genes)) }) kindly help me Ramya -- View this message in context: http://www.nabble.com/subscript-out-of-bounds-error.-tp18714563p18714563.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] subscript out of bounds help
(mean.std.s2n.loss.gain[[1]]) Probe.Set.ID rho_prime rho_prime_sd pom Expr1 matchinggenes Meanstd_dev 29 SNP_A-190846347 2.47 0.75 0 PRKCZ -0.345616170.13443676 30 SNP_A-213137044 2.61 0.58 0 PRKCZ -0.327046920.15171799 31 SNP_A-220300945 2.67 0.58 0 PRKCZ -0.324239380.15554016 32 SNP_A-209854643 2.81 0.58 1 PRKCZ -0.321298220.15939414 33 SNP_A-226456542 2.90 0.58 1 PRKCZ 0.340551500.17828152 34 SNP_A-178872841 2.84 0.58 1 PRKCZ 0.339537440.17782981 35 SNP_A-184250934 2.59 0.58 1 PRKCZ -0.297423980.14795647 36 SNP_A-425038933 2.60 0.50 1 PRKCZ -0.294941910.14550642 1398 SNP_A-183490625 1.900.42 0 FRAP1 -0.271049420.03668130 1399 SNP_A-214650425 1.900.42 0 FRAP1 -0.270215920.03623132 1400 SNP_A-230730925 1.900.42 0 FRAP1 -0.061870950.08202400 1401 SNP_A-226165827 2.070.42 0 FRAP1 -0.276791000.04101169 1402 SNP_A-427448129 2.210.42 0 FRAP1 -0.277134330.0412 1403 SNP_A-205307029 2.210.42 0 FRAP1 -0.285844830.05010136 1404 SNP_A-427638229 2.21 0.420 FRAP1 -0.300633420.05233933 mean.std.s2n.loss.gain is a list object of length 1000. I want to calculate the mean and std dev for the unique genes using the column 7 values.I wrote a code but it showing me subscript out of bounds error for .unique.genes[[i]].Could any body help me fixing the error. genes.info.unique <- lapply(mean.std.s2n.loss.gain,function(.unique){ .unique.genes<-unique(.unique[,6]) .unique.genes<-as.vector(as.matrix(.unique.genes)) snpnumber<-list() mean.genes<-list() sd.genes<-list() class(.unique.genes) for(i in 1:length(.unique.genes)) { snpnumber[[i]]<- length(.unique[.unique[,6] %in% .unique.genes[[i]],1]) mean.genes[[i]]<-mean(.unique[.unique[,6] %in% .unique.genes[[i]],7]) sd.genes[[i]]<-sd(.unique[.unique[,6] %in% .unique.genes[[i]],7]) } cbind(.unique.genes,unlist(snpnumber),unlist(mean.genes),unlist(sd.genes)) }) kindly help me Ramya -- View this message in context: http://www.nabble.com/subscript-out-of-bounds-help-tp18714594p18714594.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] List names help
hi , Is there anyways to delet the list names once created. i tried rm(names(mylist)) i didnt work kindly help me Ramya -- View this message in context: http://www.nabble.com/List-names-help-tp18717742p18717742.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] boxplot help
hi I have list of matrix of lenggth 61 containg the mean values..I want to make a boxplot for each of the matrix. I used a for loop but i cant figure out the way to save in the boxplots > all.the.mean [[1]] mean 0.5 o.6 0.8 [[2]] 0.6 0.6 0.9 now i want the boxplot for each of the matrix in a seperate window.my code for(i in 1:length(all.the.mean) { windows() boxplot(all.the.mean[[i]] } this prints in all the boxplots but it cant be saved i dont know to save those plz help me on this -- View this message in context: http://www.nabble.com/boxplot-help-tp18782749p18782749.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] PDF append help
hi there, Is there any function to append the pdf file. I want to write in a pdf file some 100 plots(in one single pdf containing 100 plots) while all the plot are created using a for loop. I can create 100 pdf one for each for each plot using a for loop but i want only one pdf with 100 plots. Ramya -- View this message in context: http://www.nabble.com/PDF-append-help-tp18835069p18835069.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] write .table
hi there Can i write two objects in one file. one is a list and another is a vector. The vector here is the names of the list.so can i write for(i in 1:60) # i have 60 list elements. { write.table(names(mylist[[i]],mylist[[i]],filename=test.txt,sep="\t",append=TRUE) } my testfile.txt should have $listname1 v1 V2 V3 abc123 lmo $listname2 V1 V2V3 abr 904 egt errr 604 gfd ext 670 rdf Kindly help me -- View this message in context: http://www.nabble.com/write-.table-tp18841055p18841055.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] PDF help
hi there Is there any way to create automatic bookmarks for the pdf while writing the plots in the pdf. Ramya -- View this message in context: http://www.nabble.com/PDF-help-tp18893669p18893669.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] saving an object
Hi there, I have a dataset stored in an object which has very huge volume of rows.I want to reuse it for comparing with other datasets.I dont want it to reload every time i run the script.Is there a way of saving a particular loaded object in the workspace and reusing it. Kindly help me. Ramya Thulasingam -- View this message in context: http://www.nabble.com/saving-an-object-tp19313276p19313276.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] List Name help
Hi There, I have a named List object.I want to access all the list elements that has the same name for example The List test <- list() $d2 v1 v2 v3 v4 1 2 3 4 5 $d2 v1 v2 v3 v4 1 2 3 4 5 $d3 v1 v2 v3 v4 8 9 19 10 $d1 v1 v2 v3 v4 12 14 15 16 so if i say test[["d2"]] or test["d2"] i should get the first two that matches the name rite but i am not getting them jus getting the first one. Any suggestions on it Ramya -- View this message in context: http://old.nabble.com/List-Name-help-tp26481873p26481873.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] R help
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 4b 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@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] R help on for loop
hi, I have a data stored in table format. The data is stored in the name map. 500545 rows and 3 columns. I want to use a for loop to scan through till the end of the row. can i use like this. for ( i in 1:row(map) { } Kindly clarify me Cheers Ramya -- View this message in context: http://www.nabble.com/R-help-on-for-loop-tp18098661p18098661.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] R help
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. __ 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] R help
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 Genenamegene1 gene2gene200 [[2]] V1V2 V3 V4...V[240] Genenamegene1 gene2gene240 : : : : : [[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. __ 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
Hi, Could you please let me know to use a list in a for loop here geneset is a loop.I am trying to match the names of the list with 1st row of the output. result<- list() for(i in 1:length(output) { result[[i]] <- geneset(which(geneset %n% output[,1])) } Kindly help me out -- View this message in context: http://www.nabble.com/For-loop-tp18163665p18163665.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] help on list comparison
hi I want to compare two list by its names and get the values of that list. can anybody let me know the syntax of comparing the list by their names using a for loop c.genes<- list() for(i in 1:100) c.genes[[1]]<- geneset(which(geneset == tobecampared[i])) } here geneset is a list and also tobecampared is a list Thank you Ramya -- View this message in context: http://www.nabble.com/help-on-list-comparison-tp18240445p18240445.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] lapply
hi Can i use a for loop with in the lapply..if so could u plz let me know the syntax. Ramya -- View this message in context: http://www.nabble.com/lapply-tp18363288p18363288.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] List help
hi, I need to remove the list that does not have any values.Do suggest me the way to do it. result<- list() > head(result) [[1]] [,1] [,2] [,3] [[2]] [,1] [,2] [,3] [[3]] [,1] [,2] [,3] [[4]] [,1] [,2] [,3] [[5]] [,1] [,2][,3] [1,] "HIGD1C" "SNP_A-2058537" "4" [2,] "HIGD1C" "SNP_A-1955347" "4" [3,] "HIGD1C" "SNP_A-1947169" "3" [4,] "HIGD1C" "SNP_A-2088027" "1" [5,] "HIGD1C" "SNP_A-2070418" "1" [6,] "HIGD1C" "SNP_A-4253870" "1" [7,] "HIGD1C" "SNP_A-2185340" "1" [8,] "HIGD1C" "SNP_A-1794461" "1" [9,] "HIGD1C" "SNP_A-1928826" "1" [10,] "HIGD1C" "SNP_A-1938145" "1" [11,] "HIGD1C" "SNP_A-1889970" "1" [[6]] [,1] [,2] [,3] I have 386 list elements I need to remove these empty martix.([[1]],[[2]],[[3]],[[4]].[[6]]) do help me Ramya -- View this message in context: http://www.nabble.com/List-help-tp18411519p18411519.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] List help
Thank u so much it did work Rajasekaramya wrote: > > hi, > > I need to remove the list that does not have any values.Do suggest me the > way to do it. > > result<- list() > >> head(result) > > [[1]] > [,1] [,2] [,3] > > [[2]] > [,1] [,2] [,3] > > [[3]] > [,1] [,2] [,3] > > [[4]] > [,1] [,2] [,3] > > [[5]] > [,1] [,2][,3] > [1,] "HIGD1C" "SNP_A-2058537" "4" > [2,] "HIGD1C" "SNP_A-1955347" "4" > [3,] "HIGD1C" "SNP_A-1947169" "3" > [4,] "HIGD1C" "SNP_A-2088027" "1" > [5,] "HIGD1C" "SNP_A-2070418" "1" > [6,] "HIGD1C" "SNP_A-4253870" "1" > [7,] "HIGD1C" "SNP_A-2185340" "1" > [8,] "HIGD1C" "SNP_A-1794461" "1" > [9,] "HIGD1C" "SNP_A-1928826" "1" > [10,] "HIGD1C" "SNP_A-1938145" "1" > [11,] "HIGD1C" "SNP_A-1889970" "1" > > [[6]] > [,1] [,2] [,3] > > > I have 386 list elements I need to remove these empty > martix.([[1]],[[2]],[[3]],[[4]].[[6]]) > > do help me > > Ramya > -- View this message in context: http://www.nabble.com/List-help-tp18411519p18412113.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] comparing two files
Hi there I have two object on is a vector T and the other is dataframe C. vector T has more no of rows when comapred with a dataframe Ccolumn[,2].I want to find the the missing rows in dataframe C.That is those values that are not matchig in dataframe C[,2] Kindly give me suggestion on how to go about it. Ramya -- View this message in context: http://www.nabble.com/comparing-two-files-tp19337486p19337486.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] comparing a list and vector and returnig the listname
hi, I have list of length 5453 and vector of length 14318.I need to compare the vector with the list and return the list name if matched.I am thinking of using an lapply but how to retrive the listname is wat i am puzzled abt. kindly let me know how to go abt it. Ramya -- View this message in context: http://www.nabble.com/comparing-a-list-and-vector-and-returnig-the-listname-tp19415038p19415038.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] Inserting new values in the place of NULL
Hi there, I have a dataframe D.F1 >dim (D.F1) 14351 9 This dataframe has values and for some 1000 rows it holds NULL values.I hace found the missing values for about 500 and have those in another dataframe D.F.sub.2 >dim(D.F.sub.2) 500 9 as dataframe is a subset of D.F1 the coulmn 1 in D.F.sub.2 is a subset of D.F1.I have to insert the values in D.F1 in other fields while the coulmn 1 in both the main table and sub table matches. Ih short i have to insert a dataframe (D.F.sub.2) into the main D.F1 using the column1 that hold similar values. Kindly help me.It is running out of my head Ramya -- View this message in context: http://www.nabble.com/Inserting-new-values-in-the-place-of-NULL-tp19534397p19534397.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] inserting values for null
I have a dataframe D.F1 >dim (D.F1) 14351 9 This dataframe has values and for some 1000 rows it holds NULL values.I hace found the missing values for about 500 and have those in another dataframe D.F.sub.2 >dim(D.F.sub.2) 500 9 as dataframe is a subset of D.F1 the coulmn 1 in D.F.sub.2 is a subset of D.F1.I have to insert the values in D.F1 in other fields while the coulmn 1 in both the main table and sub table matches. Ih short i have to insert a dataframe (D.F.sub.2) into the main D.F1 using the column1 that hold similar values. Kindly plz help me. Ramya -- View this message in context: http://www.nabble.com/inserting-values-for-null-tp19535742p19535742.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] selecting dataframe values that are not nulls
Hi, I have a dataframe with 14319rows and 9 colums. for some rows there are null values.I want a dataframe without these null values.I wanna select only those that have values !=NA. kindly let me know how to do that. Ramya -- View this message in context: http://www.nabble.com/selecting-dataframe-values-that-are-not-nulls-tp19537093p19537093.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] Cbind help
Hi there I want to cbind a vector(contains 20 values) to a dataframe containg (18 rows).The missing value in the dataframe is however a repeated values but still i want to retain the repeats in the vector and the dataframe values can even get enterd twice. how should i go about it Example: Vector(contains repeating entry) ab de dc ab be dataframe(unique entry) ab a b c d e dc e f g h i de l m n o p Result : vector D.F ab ab a b c d e dc dc e f g h i ab ab a b c d e de de l m n o p Ramya -- View this message in context: http://www.nabble.com/Cbind-help-tp19576177p19576177.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] Function for case insensitive match
Hi there, I am just wondering if there is any function that could match the vectors irrespective of the upper and lower case alphabets. Ramya -- View this message in context: http://www.nabble.com/Function-for-case-insensitive-match-tp19672969p19672969.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] re moving a vector from a list.
Hi there I have 386 list of vectors.In that i want to delete 23 vector in the 53 list element. [[1]] "abc" "dfg" "dft" "err" [[2]] "elm" "erg"" trr" "rtt" similarly i have [[386]] now i want to delete or avoid trr in the [[2]]. i just tried something like this list[-list[[53]][3]] -- View this message in context: http://www.nabble.com/removing-a-vector-from-a-list.-tp19783565p19783565.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] LIST HELP
Hi, I have a list(A1) of dataframe and a vector containing a 22 list names. list(A1) abc l m n p q r dce e g h l k m kpo a d c also i have a vector of list names. abc,dce similarly i have 22 elements. I wanna delete or want a list without the list elements whoes name match up the vector. my result should be kpo a d c. i tried lapply it is in working in the way i want. Kindly help me Ramya -- View this message in context: http://www.nabble.com/LIST-HELP-tp19905212p19905212.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] R/Parallel
Hi there, I am looking for R/parallel package or some other package that would speed up the analysis.I am working on computatioanly intensive data so any suggestions would be really helpful. Kindly let me know if any -- View this message in context: http://www.nabble.com/R-Parallel-tp1425p1425.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] Dataframe help
Hi there, I have a dataframe length.unique.info > length.unique.info abc 12 345 def 16 550 lmn 6 600 I want those names that fall under the condition (length.unique.info[,2][i] <=5 && length.unique.info[,3][i] >=500) abcder<-length.unique.info[which(length.unique.info[,2][i] <=5 && length.unique.info[,3][i] >= 500),1] will "&&" look for both the condition.It isnt returning names is there anything i am missing.Kindly suggest me the way to do it. Regards Ramya -- View this message in context: http://www.nabble.com/Dataframe-help-tp20343288p20343288.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] Sort help
Geneset_name #Chromosome #Hit_in_Biomart original_geneset_len Missing.genes [1,] "AGUIRRE_PANCREAS_CHR12" "1" "51" "59" "8" [3,] "AGUIRRE_PANCREAS_CHR9" "1" "24" "24" "0" [4,] "AGUIRRE_PANCREAS_CHR1""1" "30" "31" "1" [5,] "AGUIRRE_PANCREAS_CHR18" "1" "17" "17" "0" [6,] "AGUIRRE_PANCREAS_CHR7" "1" "35" "48" "13" [7,] "AGUIRRE_PANCREAS_CHR8" "1" "55" "61" "6" Above is a dataframe information. i need to sort the entire dataframe based on the 3rd colum. in decending order. I tried using order information[order(information[,3])] but it gives me only the ordered first coulmn that too i am not sure that it really works. Kindly let me know with any suggestions. Regards Ramya -- View this message in context: http://www.nabble.com/Sort-help-tp20346314p20346314.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] Re gular Expression help
hi there I have a vector with a set of data.I just wanna seperate them based on the first p and q values metioned within the data. [1] chr10p15.3 /// chr3q29 /// chr4q35 /// chr9q34.3 [2] chr1q22-q24 [3] chr1q22-q24 [4] chr1pter-q24 [5] chr1pter-q24 [6] chr1pter-q24 i used a regular expression [+q*] to match up the values but it matches q found anywhere i know i have written like that but i jus want it to match the first p or q values. my result should be for q and [2] chr1q22-q24 [3] chr1q22-q24 for p [1] chr10p15.3 /// chr3q29 /// chr4q35 /// chr9q34.3 [4] chr1pter-q24 [5] chr1pter-q24 [6] chr1pter-q24 -- View this message in context: http://www.nabble.com/Regular-Expression-help-tp20385971p20385971.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] Breakdown of Vector
Hi, I have a vector of Size 7420. I wanna break down in such a way that every 20 elements of it should be as elements of an list. Ex EXAM1 ABC, SDF, LMN,ERF,EGC,EFG,WER,FRE,QWE,ERT,DGW,QWE,YUR,ERT,GHJ,FHH,7420 what i want is Breakdown.list [[1]] ABC,SDF,.20 [[2]] 21.40 [[3]] 4150 i thought of using a for loop but i am wondering how to incerment test.breakdown.list<-list() for( i =0;i<=length(EXAM1);i+20) { test.breakdown.list<-Exam1[c(i:i+20)] print (paste(i)) } Ias this how we do...please correct me if am wrong. Regards Ramya -- View this message in context: http://www.nabble.com/Breakdown-of-Vector-tp20623764p20623764.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] list of list objects
hi there, I have a list of list objects i need to remove the top layer [[1]] [1].0 "ABC" "DEF""LMN" [1].1 "WER" "ERT" "TRY" [[2]] [2].0 "ASD","wer""qwe" [2].1 "wdv""ghj""ggj" I wanna avoid the top layer...that is [[1]] [[2]] shouldnt be there just a simple list is wat i need. [1].0 "ABC" "DEF""LMN" [1].1 "WER" "ERT" "TRY" [2].0 "ASD","wer""qwe" [2].1 "wdv""ghj""ggj" kindly let me know hoe to go abt it regards ramya -- View this message in context: http://www.nabble.com/list-of-list-objects-tp20628759p20628759.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] dataframe help
hi there I have a dataframe abc 123 345 abc 345 456 lmn 567 345 hkl 568 535 lmn 096 456 lmn 768 094 i want the uniques of column 1 and there corresponsing column 2 and 3 output abc 123 345 lmn 567 345 hkl 568 535 cbind(DF1[,1],DF1[which(unique(DF1[,1]),c(2,3)]) but didnt work kindly let me know how to go abt it ramya -- View this message in context: http://www.nabble.com/dataframe-help-tp20671461p20671461.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] Data frame help
hi there I have a dataframe abc 123 234 abc 234 456 def 567 234 elm 123 456 klm 234 678 klm 465 678 I want the unique of first colum along with the values in colum 2 and 3.I By default it will select the first element for the unique so my out put should be abc 123 234 def 567 234 elm 123 456 klm 234 678 I tried something like cbind(unique(DF1[,1],DF1[unique(DF1[,1],c(2,3)] I didnt work kindly give me some suggestions Regards Ramya -- View this message in context: http://www.nabble.com/Data-frame-help-tp20668919p20668919.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] dataframe
hi there I have a dataframe abc 123 345 abc 345 456 lmn 567 345 hkl 568 535 lmn 096 456 lmn 768 094 i want the uniques of column 1 and there corresponsing column 2 and 3 output abc 123 345 lmn 567 345 hkl 568 535 cbind(DF1[,1],DF1[which(unique(DF1[,1]),c(2,3)]) but didnt work kindly let me know how to go abt it ramya -- View this message in context: http://www.nabble.com/dataframe-tp20675022p20675022.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] Writing a list help
hi there, I have a list called MyList. MyList[[1]] [1] "SRY" [2] "RPS4Y1" [3] "ZFY" [4] "ZFX /// ZFY" [5] "LOC728137" [6] "LOC100101116 /// TTTY1" [7] "AMELY" [8] "TBL1Y" [9] "PRKY" [[2]] . . . [[24]] I have list.I wanna write it to file. for(i in 1:24) { write.table(as.vector(as.matrix(MyLIST[[i]] file="geneset.txt",sep="\t",append=T) } I used a for loop to write my list.It worked but i have two concerns with it. First while writing in a txt file it writing in the names verticaly as it appears above but i want it to in row it should look like SRY" RPS4Y1" ZFY" ZFX /// ZFY" AMELY" TBL1Y" PRKY" second is i want the list name as my row name. I tried some thing like row.names=names(mylist[[i]]) but it didnit work. kindly let me know ur suggestions as how to go about it. Regards Ramya -- View this message in context: http://www.nabble.com/Writing-a-list-help-tp20837411p20837411.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.