inst/example/model.R

# Q1

id <- seq(1, 6)  # id <- 1:6

age <- c(30, 32, 28, 39, 20, 25)

edu <- rep(0, 6)

class <- factor(rep(c("poor", "middle"), each=3))

# Q2

IndianMothers <- data.frame(id, age, edu, class)

# Q3

ageSummary <- round(c(min=min(age), max=max(age),
                      median=median(age),
                      mean=mean(age), sd=sd(age)),
                    1)

Try the compare package in your browser

Any scripts or data that you put into this service are public.

compare documentation built on May 2, 2019, 10:24 a.m.