[R] arithmetic comparison over corresponding values from two vectors

2009-02-10 Thread T Joshi
Hi, I have scenario in which I wish to check whether numeric values in one array falls within the range of numbers defined over corresponding values in two other vectors: starts = c(12,45,67,110) ends=c(24, 58,102,150) trgroup=c(18,87) The result should be 1,3 , indices of vector starts/ends.

[R] error using heatmap :evaluation nested too deeply.....

2009-01-22 Thread T Joshi
Hi, I get following error when trying to plot a heatmap on a very large matrix (808 x5000). heatmap(ctab) Error: evaluation nested too deeply: infinite recursion / options(expressions=)? Call to heatmap function is not contained within any other function or so. Upon searching the R mailing

[R] intersection of two matrices

2008-12-03 Thread T Joshi
Hi, I have two matrices as follow: matrix A = a=matrix(c(c(abc,abc,bcd,bcd,bce,bce),c(a1,d2,d1,d2,a1,a2)),6,2) and matrix B which contains pair of values : b=matrix(c(c(a1,a2),c(a1,d2)),2,2) In short, I wish to find out pairs of values in matrix a[,2] having same value in a[,1], which occur

[R] intersection of two matrices(updated)

2008-12-03 Thread T Joshi
Hi, I have two matrices as follow: matrix A = a=matrix(c(c(abc,abc,bcd,bcd,bce,bce),c(a1,d2,d1,d2,a1,a2)),6,2) and matrix B which contains pair of values : b=matrix(c(c(a1,a1),c(a2,d2)),2,2) In short, I wish to find out pairs of values in matrix a[,2] having same value in a[,1], which occur

[R] grouping similar column values into a single row

2008-11-30 Thread T Joshi
Hi, I have a following situation with data: col1 col2 mir-1 aaa mir-1 abc mir-1 aac mir-2 abb mir-2 aaa mir-3 cag mir-3 ccc mir-3 aaa I want to have output in this format: col1 col2 mir-1 aaa, abc, aac mir-2 abb, aaa mir-3 cag,ccc,aaa I have sorted column 1 so that the grouping could be