read.CMData: Read data from external file into a CMData object

Description Usage Arguments Value Author(s) See Also

View source: R/CMData.R

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

1
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

...

additonal arguments passed to read.table

Value

a CMData object

Author(s)

Aniko Szabo

See Also

CMData


CorrBin documentation built on May 2, 2019, 4:46 p.m.