Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions R/tableDS.R
Original file line number Diff line number Diff line change
Expand Up @@ -135,9 +135,10 @@ exclude<-NULL

if(!is.null(rvar)&&!is.null(cvar)&&!is.null(stvar))
{
#Check cell counts valid without NAs or NaNs
##Check cell counts valid without NaNs. Note: NAs need to be included as
##otherwise there's a disclosure risk when cross-tabulating.
counts.valid<-TRUE
test.outobj<-table(rvar,cvar,stvar,exclude="NaN",useNA="no")
test.outobj<-table(rvar,cvar,stvar,exclude="NaN",useNA="yes")

numcells<-length(test.outobj)

Expand All @@ -161,9 +162,10 @@ numcells<-length(test.outobj)

if(!is.null(rvar)&&!is.null(cvar)&&is.null(stvar))
{
#Check cell counts valid without NAs or NaNs
##Check cell counts valid without NaNs. Note: NAs need to be included as
##otherwise there's a disclosure risk when cross-tabulating.
counts.valid<-TRUE
test.outobj<-table(rvar,cvar,exclude="NaN",useNA="no")
test.outobj<-table(rvar,cvar,exclude="NaN",useNA="yes")

numcells<-length(test.outobj)

Expand Down