Learn R Programming

soundcorrs (version 0.1.1)

binTable: Sum all rows and all columns in a table, except for the selected ones.

Description

Useful for when the data are scarce and chisq.test returns a warning, or when a more specific analysis of the data is required.

Usage

binTable(x, row, col)

Arguments

x

[data.frame/matrix/table] Table to be binned.

row

[integer/vector] The rows to not be binned.

col

[integer/vector] The columns to not be binned.

Value

[table] Table with some of its data binned.

Examples

Run this code
# NOT RUN {
mtx <- matrix (1:16, nrow=4, dimnames=list(paste0("r",1:4),paste0("c",1:4)))
binTable (mtx, 1, 1)
binTable (mtx, 1, c(1,3))
# }

Run the code above in your browser using DataLab