The R Project SVN R

Rev

Rev 27442 | Rev 40284 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 27442 Rev 27714
Line 79... Line 79...
79
data(UCBAdmissions)
79
data(UCBAdmissions)
80
## Use the Berkeley admission data as in Friendly (1995).
80
## Use the Berkeley admission data as in Friendly (1995).
81
x <- aperm(UCBAdmissions, c(2, 1, 3))
81
x <- aperm(UCBAdmissions, c(2, 1, 3))
82
dimnames(x)[[2]] <- c("Yes", "No")
82
dimnames(x)[[2]] <- c("Yes", "No")
83
names(dimnames(x)) <- c("Sex", "Admit?", "Department")
83
names(dimnames(x)) <- c("Sex", "Admit?", "Department")
84
ftable(x)
84
stats::ftable(x)
85
 
85
 
86
## Fourfold display of data aggregated over departments, with
86
## Fourfold display of data aggregated over departments, with
87
## frequencies standardized to equate the margins for admission
87
## frequencies standardized to equate the margins for admission
88
## and sex.
88
## and sex.
89
## Figure 1 in Friendly (1994).
89
## Figure 1 in Friendly (1994).