R version 2.15.3 (2013-03-01) -- "Security Blanket" Copyright (C) 2013 The R Foundation for Statistical Computing ISBN 3-900051-07-0 Platform: i686-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(5,"f",35,-2.67,10,"f",44,9.67,14,"f",20,-6,16,"f",38,28.33,17,"f",43,12,19,"f",32,-11.3,21,"f",24,3,22,"f",59,-4.67,23,"f",41,-5,26,"f",44,2.33,27,"f",66,37.67,28,"f",40,7.5,29,"f",24,5,32,"f",60,30,33,"f",35,15.33),dim=c(4,15),dimnames=list(c('Childcode','Gender','BVPT','RAD'),1:15)) > y <- array(NA,dim=c(4,15),dimnames=list(c('Childcode','Gender','BVPT','RAD'),1:15)) > for (i in 1:dim(x)[1]) + { + for (j in 1:dim(x)[2]) + { + y[i,j] <- as.numeric(x[i,j]) + } + } There were 15 warnings (use warnings() to see them) > par3 = 'TRUE' > par2 = '' > par1 = '' > ylab = 'BVPT Test Score' > xlab = 'Reading age deficiency score' > main = 'Vocabulary skill change' > par3 <- 'TRUE' > par2 <- '' > par1 <- '' > #'GNU S' R Code compiled by R2WASP v. 1.2.291 () > #Author: aston2 > #To cite this work: Ian E. Holliday, 2012, Simple Linear Regression (v1.0.5) in Free Statistics Software (v$_version), Office for Research Development and Education, URL http://www.wessa.net/Ian.Holliday/rwasp_Simple%20Regression%20Y%20~%20X.wasp/ > #Source of accompanying publication: > # > cat1 <- as.numeric(par1) > cat2<- as.numeric(par2) > intercept<-as.logical(par3) > x <- t(x) > xdf<-data.frame(t(y)) > (V1<-dimnames(y)[[1]][cat1]) [1] NA > (V2<-dimnames(y)[[1]][cat2]) [1] NA > xdf <- data.frame(xdf[[cat1]], xdf[[cat2]]) > names(xdf)<-c('Y', 'X') Error in names(xdf) <- c("Y", "X") : 'names' attribute [2] must be the same length as the vector [0] Execution halted