Skip to content
Srirāma Bhamidipati edited this page Dec 8, 2016 · 24 revisions

Welcome to the cchaid wiki!

To install from R prompt:

> install.packages("devtools")
> devtools::install_github("sriramab/cchaid")

Prepare Dataset:

Your raw dataset should look like below (or like here),

Snapshot of raw datafile

Note1: First row indicating whether the column is nominal(n), ordinal(o), ignore_column(x), continuous(c)

Note2: Second row containing the names of the columns should be plain text without any special symbols, no dashes, no hyphens.

Once you have prepared your dataset, then use the function cc_read_file("aidwork3.txt") where aidwork3.txt is your prepared dataset (tab-delimited).

> mydata <- cc_read_file("aidwork3.txt")
# stores your dataset into - mydata - after some cleaning 
> class(mydata)
[1] "data.frame"

Sample Dataset:

> library(cchaid)
> data(package="cchaid")
> attach(cc_dataset)
> sample_data <- cc_dataset
# copies sample dataset into - sample_data 
> class(sample_data)
[1] "data.frame"
Clone this wiki locally