-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Srirāma Bhamidipati edited this page Dec 8, 2016
·
24 revisions
Welcome to the cchaid wiki!
> install.packages("devtools")
> devtools::install_github("sriramab/cchaid")
Your raw dataset should look like below (or like here),
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"
> library(cchaid)
> data(package="cchaid")
> attach(cc_dataset)
> sample_data <- cc_dataset
# copies sample dataset into - sample_data
> class(sample_data)
[1] "data.frame"