In your function, you have

 temp <- read.table(fnames,header=T,sep="\t",stringsAsFactors=F,quote="\"")

I think you mean:

 temp <- read.table(i,header=T,sep="\t",stringsAsFactors=F,quote="\"")

Also 'files' is a parameter, but you are using 'fnames' in the 'for' loop;
shouldn't that be 'files'?

On Thu, Dec 17, 2009 at 3:51 PM, Harikrishnadhar <hari.bom...@gmail.com>wrote:

> Dear all,
>
> Here is my code which am using to combine 5th column from different data
> sets.
>
> Here is the function  to do my job
>
>
> genesymbol.append.file <-NULL
> gene.column <- NULL
> readGeneSymbol <- function(files,genesymbol.column=5){
> for(i in fnames){
>  temp <- read.table(fnames,header=T,sep="\t",stringsAsFactors=F,quote="\"")
>  gene.column<-cbind(gene.column,temp[,genesymbol.column])
>  genesymbol.append.file$genecolumns <- gene.column
>  genesymbol.append.file
>  }
> }
>
>
>
>
> test <- readGeneSymbol(fnames,genesymbol.column=5)
>
> Here is the warning message  am getting only the 5th column from the first
> column is taken
>
>
> Warning messages:
> 1: In file(file, "r") : only first element of 'description' argument used
> 2: In file(file, "r") : only first element of 'description' argument used
> >
>
> Please help me to solve this
>
>
>
>
>
>
>
> --
> Thanks
> Hari
> 215-385-4122
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> "If there is anyone out there who still doubts that America is a place
> where
> all things are possible"
>
>        [[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<http://www.r-project.org/posting-guide.html>
> and provide commented, minimal, self-contained, reproducible code.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem that you are trying to solve?

        [[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.

Reply via email to