R version 2.12.0 (2010-10-15) Copyright (C) 2010 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i486-pc-linux-gnu (32-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > x <- array(list(4,'SMK',5,'SMK',3,'SMK',4,'SMK',5,'SMK',3,'SMK',7,'SMK',5,'SMK',6,'SMK',3,'SMK',2,'SMK',4,'SMK',5,'SMK',2,'SMK',3,'SMK',6,'SMK',4,'SMK',4,'SMK',6,'SMK',2,'SMK'),dim=c(2,20),dimnames=list(c('Rating','Smoker'),1:20)) > y <- array(NA,dim=c(2,20),dimnames=list(c('Rating','Smoker'),1:20)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } There were 20 warnings (use warnings() to see them) > par5 = '2' > par4 = '1' > par3 = '0' > par2 = 'TRUE' > par1 = '3' > ylab = 'ratings' > xlab = 'smoker' > main = 'Smoker's ratings of a hot Vindaloo curry' Error: unexpected symbol in "main = 'Smoker's" Execution halted