search for: lastcol

Displaying 4 results from an estimated 4 matches for "lastcol".

Did you mean: lastccl
2017 Aug 23
0
splitting a dataframe in R based on multiple gene names in a specific column
...G exonic BCDF5,CDFG6", header=TRUE,stringsAsFactors=FALSE) multgenes<-grep(",",df.sample.gene$Gene.refGene) rep_genes<-strsplit(df.sample.gene$Gene.refGene[multgenes],",") ngenes<-unlist(lapply(rep_genes,length)) dup_row<-function(x) { newrows<-x lastcol<-dim(x)[2] rep_genes<-unlist(strsplit(x[,lastcol],",")) for(i in 2:length(rep_genes)) newrows<-rbind(newrows,x) newrows$Gene.refGene<-rep_genes return(newrows) } for(multgene in multgenes) df.sample.gene<-rbind(df.sample.gene,dup_row(df.sample.gene[multgene,])) df.samp...
2017 Aug 22
2
splitting a dataframe in R based on multiple gene names in a specific column
I would appreciate please a suggestion on how to do the following : i'm working with a dataframe in R that contains in a specific column multiple gene names, eg : > df.sample.gene[15:20,2:8] Chr Start End Ref Alt Func.refGene Gene.refGene284 chr2 16080996 16080996 C T ncRNA_exonic GACAT3448 chr2 113979920 113979920 C T ncRNA_exonic LINC01191,LOC100499194465
2017 Aug 25
1
splitting a dataframe in R based on multiple gene names in a specific column
...> header=TRUE,stringsAsFactors=FALSE) > > multgenes<-grep(",",df.sample.gene$Gene.refGene) > rep_genes<-strsplit(df.sample.gene$Gene.refGene[multgenes],",") > ngenes<-unlist(lapply(rep_genes,length)) > dup_row<-function(x) { > newrows<-x > lastcol<-dim(x)[2] > rep_genes<-unlist(strsplit(x[,lastcol],",")) > for(i in 2:length(rep_genes)) newrows<-rbind(newrows,x) > newrows$Gene.refGene<-rep_genes > return(newrows) > } > for(multgene in multgenes) > df.sample.gene<-rbind(df.sample.gene,dup_row(df.sa...
2010 Aug 04
1
Carriage return character issue
Hi all, I imported a file (in CSV format) into R for processing, then imported the result into MySQL. However, there are *carriage return* characters (hexadecimal: *0D*) that are appended to the characters in the last field of the table. i.e *\r* appended to the character values (as shown below) Before importing into MySQL: asdf After importing into MySQL: asdf*\r* ** ** Are there any options