1 Dec 01:01 2005

### [R] Row wise function call.

Vasundhara Akkineni <vasu.akkineni <at> gmail.com>

2005-12-01 00:01:09 GMT

2005-12-01 00:01:09 GMT

I have another issue.i have a function which calculates the log2(col i /col2) value, where i stands for columns 3,4,...etc. data<-read.table("table.txt", header=TRUE) iratio<-function(x){ for(n in 3:ncol(data)){ z<-log2(data[x,n]/data[x,2]) } } Where x- the row number of the data frame(data). i want to store the ratios for each row in a object z, which can be accessed outside the function. How can i do this? Thanks, Vasu. [[alternative HTML version deleted]] ______________________________________________ R-help <at> stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html