Use the read.table function to read in the syphilis. Evaluate structure of data frame. Do not attach the data frame (yet). Create a 3-dimensional array using both the table or xtabs function. Now attach the data frame using the attach function. Create the same 3-dimensional array using both the table or xtabs function.
std <- read.table(“~/git/phds/data/syphilis89c.txt”, head = TRUE, sep = “,”)
str(std)
head(std)
lapply(std, table)
table(std\(Race, std\)Age, std$Sex)
xtabs(~ Race + Age + Sex, data = std)
attach(std)
table(Race, Age, Sex)
xtabs(~ Race + Age + Sex)
detach(std)