R: [R] extracting columns with NA's

2003-09-19 Thread Vito Muggeo
(A). Of course you can modify the == as well as nrow(A) A1-A[!which(fi==nrow(A)),] Hope this help you best, vito - Original Message - From: antonio rodriguez [EMAIL PROTECTED] To: R-help [EMAIL PROTECTED] Sent: Friday, September 19, 2003 11:58 AM Subject: [R] extracting columns with NA's Hi

Re: [R] extracting columns with NA's

2003-09-19 Thread Peter Wolf
antonio rodriguez wrote: Hi All, How do I can delete from a matrix (or array) only those columns which have all their values set to NA? Cheers Antonio Rodriguez --- __ [EMAIL PROTECTED] mailing list

Re: [R] extracting columns with NA's

2003-09-19 Thread Barry Rowlingson
antonio rodriguez wrote: Hi All, How do I can delete from a matrix (or array) only those columns which have all their values set to NA? use 'apply' to sweep through columns using a little function that sees if all values in a column are NA: eg: x: x [,1] [,2] [,3] [,4]