################################################################################ ##### Example of SimultAn Package ##### ################################################################################ ################################################################################ ##### Correspondence analysis ##### ################################################################################ ### CorrAn <- function(data, sr = NA, sc = NA, nd = 2, dp = 2) data <- read.table(file = "traffic.dat") dataCA <- data[1:11, 1:9] CorrAn.out <- CorrAn(data = dataCA) summary(CorrAn.out) plot(CorrAn.out, s1 = 1, s2 = 2) #supplementary row and column CorrAn.out <- CorrAn(data = dataCA, sr = 11, sc = 9) summary(CorrAn.out) plot(CorrAn.out, s1 = 1, s2 = 2) ###other names(CorrAn) names(CorrAn.out) CorrAn.out help(CorrAn) ################################################################################ ##### Simultaneous analysis ##### ################################################################################ #SimAn <- function(data, G, acg, weight = 2, nameg = NA, sr = NA, sc = NA, # nd = 2, dp = 2) dataSA <- read.table(file = "traffic.dat") SimAn.out <- SimAn(data = dataSA, G = 2, acg = list(1:9, 10:18), weight = 2, nameg = c("M", "F")) summary(SimAn.out) plot(SimAn.out, s1 = 1, s2 = 2) #supplementary row SimAn.out <- SimAn(data = dataSA, G = 2, acg = list(1:9, 10:18), weight = 2, nameg=c("M", "F"), sr = 11) summary(SimAn.out) plot(SimAn.out, s1 = 1, s2 = 2) #other names(SimAn) names(SimAn.out) SimAn.out help(SimAn) ################################################################################ ##### End of Example of SimultAn Package ##### ################################################################################