[R] count number of empty cells in a table/matrix/data.frame

2009-12-03 Thread maiya
Hi everyone! This is a ridiculously simple problem, I just can't seem to find the solution! All I need is something equivalent to sum(is.na(x)) but instead of counting missing values, to count empty cells (with a value of 0). A naive attempt with is.empty didn't work :) Thanks! Maja Oh,

Re: [R] count number of empty cells in a table/matrix/data.frame

2009-12-03 Thread Greg Snow
To: r-help@r-project.org Subject: [R] count number of empty cells in a table/matrix/data.frame Hi everyone! This is a ridiculously simple problem, I just can't seem to find the solution! All I need is something equivalent to sum(is.na(x)) but instead of counting missing values

Re: [R] count number of empty cells in a table/matrix/data.frame

2009-12-03 Thread maja zaloznik
Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of maiya Sent: Thursday, December 03, 2009 9:29 AM To: r-help@r-project.org Subject: [R] count number of empty