Displaying 2 results from an estimated 2 matches for "notmissing".
1997 Aug 19
2
R-alpha: A few bugs in R-0.50-a3.
A few problems in R-0.50-a3 (which were also in R-0.49):
1)
y <- c(10,11,12,13,14,NA,NA)
n <- length(y)
missed <- (1:n)[is.na(y)]
notmissed <- (1:n)[!is.na(y)]
blocks <- cut(missed,breaks=c(0,notmissed,n+1))
a <- function(v) {
q <- range(v)
c(q[1]-1,q[2]+1)
}
brackets <- tapply(missed,blocks,a)
This codes gives the following in S:
> brackets
$"0+ thru 1":
2006 Mar 16
6
removing ROWS with missing values
I am trying to find out if R can recognize specific criteria for removing
rows (i.e. a prexisting function)
I have a matrix myMatrix that is 12000 by 20
I would like to remove rows from myMatrix that have:
-999 across all columns
-999 across all columns but one
-999 across all columns but two
-999 across all columns but three
-999 across all columns but four
-999 across all columns but five