Displaying 3 results from an estimated 3 matches for "yourmat".
Did you mean:
yourmac
2008 Nov 09
2
Delete rows from matrix having at least one zero value
Hi,
I have a further question about matrix manipulation.
Imagine the following two matrices:
> test
[,1] [,2] [,3] [,4]
[1,] 1 0 6 4
[2,] 2 5 7 5
[3,] 3 6 8 6
[4,] 4 0 0 0
> matrix(is.element(test,0), ncol=4)
[,1] [,2] [,3] [,4]
[1,] FALSE TRUE FALSE FALSE
[2,] FALSE FALSE FALSE FALSE
[3,] FALSE FALSE FALSE FALSE
[4,] FALSE
2005 Oct 07
6
Applying a function to each element of an array
Hi,
I have a 7000x7000 matrix, and each element is an integer. For each element, I want to apply the function :
wt <- 0
for(q in 1:count){
wt <- wt + 0.5^(q-1)
}
I get the value of 'count' from the elements in the matrix , and want to store the corresponding 'wt' value for that element.
I suppose I could loop through the matrix, and apply the function to each
2006 Feb 13
5
search algorithm
Hi!
I have a problem of finding a specific value in a column. For example, I
have a matrix with say 2 columns
X Y
1 -2.0341602 9.036689e-05
2 -1.4287230 1.807338e-04
3 -1.1194402 2.711007e-04
4 -1.0327582 3.614676e-04
5 -0.8130556 4.518344e-04
6 -0.7138212 5.422013e-04
7 -0.6634425 6.325682e-04
8 -0.6512083 7.229351e-04
9