read.CMData {CorrBin}R Documentation

Read data from external file into a CMData object

Description

A convenience function to read data from specially structured file directly into a CMData object. There are two basic data format options: etiher the counts of responses of all categories are given (and the cluster size is the sum of these counts), or the total cluster size is given with the counts of all but one category. The first column should always give the treatment group, then either the counts for each category (first option, chosen by setting with.clustersize = FALSE), or the size of the cluster followed by the counts for all but one category (second option, chosen by setting with.clustersize = TRUE). Optionally, a last column could give the number of times the given combination occurs in the data.

Usage

read.CMData(file, with.clustersize = TRUE, with.freq = TRUE, ...)

Arguments

file

name of file with data. The data in the file should be structured as described above.

with.clustersize

logical indicator of whether a cluster size variable is present in the file

with.freq

logical indicator of whether a frequency variable is present in the file

...

additional arguments passed to read.table

Value

a CMData object

Author(s)

Aniko Szabo

See Also

CMData


[Package CorrBin version 1.6.1 Index]