idaTable {ibmdbR} | R Documentation |
In-Database Cross Tabulation and Table Creation
Description
Function used to build a contingency table of the counts at each combination of factor levels based on the contents of a IDA data frame (ida.data.frame
).
Usage
idaTable(idadf,max.entries=1000)
Arguments
idadf |
A IDA data frame that contains the input data for the function. |
max.entries |
The maximum number of entries. If the cross product of all columns exceeds this number, an error will be thrown. |
Details
idaTable
uses the cross-classifying factors to build a contingency table of the counts at each combination of categorical
values in all categorical columns of the ida.data.frame
passed as input.
Value
The idaTable
function returns a contingency table, an object of class "table".
Examples
## Not run:
#Create a pointer to the table IRIS
idf<-ida.data.frame('IRIS')
#Add a column
idf$SepalLengthg4 <- ifelse(idf$SepalLength>4,'t','f')
#Calculate the cross-table between Species and SepalLengthg4
idaTable(idf[,c('Species','SepalLengthg4')])
## End(Not run)
[Package ibmdbR version 1.51.0 Index]