[R] Integration problem: error in invoking an outside function

2010-06-15 Thread Frankvb
Dear all, Currently I am trying to integrate a function which depends on four variables, two of which are given, one is given in the integrate function, so there is one variable to integrate on. The code is as follows: Pmatrix = function(th) { P = matrix(nrow=6, ncol=6, data=0)

[R] Extract rows with non-zero elements

2010-05-04 Thread Frankvb
Dear all, In my dataset I have 12 columns and 5824 rows. The second column contains information about the height of a claim: it might be zero or positive. I would like to do an analysis on the positive part of this matrix, but I do need the other colums with this. So if there are like 1000 rows