> -----Original Message----- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of uday
> Error in rowSums(a[, 2] == -999.99) : > 'x' must be an array of at least two dimensions Indeed it must - but you have asked for rowSums on a one-dimensinal object (a[,2]). You didn;t need to sum the rows of that. Try a[ a[,2] != -999 , ] assuming that the column is integer or that you have read the Note on finite representation of ractions in ?Comparison and are willing to take your chances, or a[ a[,2] > -998 , ] if it's not and if it's safe to assume that all large negative numbers are 'missing'. Better still, if you read the data using read.table, use na.strings=c('"-999", "NA") . That will mark "-999" as missing data. An na.omit will then remove the offending rows (but also those that contain NAs of thre reasons. S******************************************************************* This email and any attachments are confidential. Any use...{{dropped:8}} ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.