[EMAIL PROTECTED] wrote:
Hello R lovers
I have written a little cute function to count the number of missing value
per row in a matrix and return the percentage of missing value
it takes a lot of time to run with a 1000 rows matrix
I'd like to know if there is a function already implemented to
Hello R lovers
I have written a little cute function to count the number of missing value
per row in a matrix and return the percentage of missing value
R M - matrix(rnorm(25), ncol=5)
R diag(M) - NA
R M[2,3] - NA
R apply(M, 2, function(x) sum(is.na(x)))/ncol(M)
[1] 0.2 0.2 0.4 0.2 0.2
the
Dear Vincent
I'd like to know if there is a function already implemented
to count the
number of occurence of a given values in a vector
Does
my.matrix-cbind(c(0,1,NA),c(NA,1,NA))
count.NA-function(the.matrix){
result-t(apply(the.matrix,1,function(x,n){
m-sum(is.na(x))
c(m,m/n)
Torsten Hothorn [EMAIL PROTECTED] writes:
Hello R lovers
I have written a little cute function to count the number of missing value
per row in a matrix and return the percentage of missing value
R M - matrix(rnorm(25), ncol=5)
R diag(M) - NA
R M[2,3] - NA
R apply(M, 2, function(x)
On Thu, 5 Jun 2003, Uwe Ligges wrote:
[EMAIL PROTECTED] wrote:
Hello R lovers
I have written a little cute function to count the number of missing value
per row in a matrix and return the percentage of missing value
it takes a lot of time to run with a 1000 rows matrix
I'd like to
From: Uwe Ligges [mailto:[EMAIL PROTECTED]
[EMAIL PROTECTED] wrote:
Hello R lovers
I have written a little cute function to count the number
of missing value
per row in a matrix and return the percentage of missing value
it takes a lot of time to run with a 1000 rows matrix