R version 3.0.3 (2014-03-06) -- "Warm Puppy" Copyright (C) 2014 The R Foundation for Statistical Computing 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. > > RC.capture <- function (expression, collapse = NULL) { + resultConn <- textConnection('RC.resultText', open = 'w', local=TRUE) + sink(resultConn) + on.exit(function() { + sink() + close(resultConn) + }) + expression + on.exit(NULL) + sink() + close(resultConn) + return(paste(c(RC.resultText, ''), collapse = collapse, sep = '')) + } > RC.texteval <- function (sourceText, collapse = NULL, echo = TRUE) { + sourceConn <- textConnection(sourceText, open = 'r') + on.exit(close(sourceConn)) + result <- RC.capture(source(file = sourceConn, local = FALSE, echo = echo, print.eval = TRUE), collapse = collapse) + on.exit(NULL) + close(sourceConn) + res <- '' + for(i in 1:length(result)) { + if (result[i]!='') res <- paste(res,result[i],' + ',sep='') + } + return(res) + } > x <- array(list(NA + ,NA + ,1 + ,NA + ,NA + ,NA + ,NA + ,"'Man'" + ,"'Man'" + ,"'Man'" + ,1 + ,1 + ,1 + ,1 + ,1 + ,1 + ,NA + ,"'Vrouw'" + ,"'Man'" + ,"'Vrouw'" + ,NA + ,NA + ,1 + ,NA + ,NA + ,NA + ,NA + ,"'Vrouw'" + ,"'Vrouw'" + ,"'Vrouw'" + ,1 + ,NA + ,NA + ,NA + ,NA + ,NA + ,NA + ,"'Man'" + ,"'Vrouw'" + ,"'Vrouw'" + ,1 + ,NA + ,NA + ,NA + ,NA + ,NA + ,NA + ,"'Vrouw'" + ,"'Vrouw'" + ,"'Vrouw'" + ,1 + ,NA + ,NA + ,NA + ,NA + ,NA + ,NA + ,"'Man'" + ,"'Vrouw'" + ,"'Vrouw'" + ,NA + ,NA + ,1 + ,NA + ,NA + ,1 + ,1 + ,"'Vrouw'" + ,"'Man'" + ,"'Man'" + ,NA + ,NA + ,1 + ,NA + ,NA + ,1 + ,NA + ,"'Vrouw'" + ,"'Vrouw'" + ,"'Man'" + ,1 + ,NA + ,NA + ,NA + ,NA + ,NA + ,NA + ,"'Man'" + ,"'Vrouw'" + ,"'Man'" + ,1 + ,NA + ,NA + ,NA + ,NA + ,NA + ,NA + ,"'Man'" + ,"'Vrouw'" + ,"'Vrouw'" + ,NA + ,1 + ,NA + ,NA + ,NA + ,NA + ,NA + ,"'Vrouw'" + ,"'Man'" + ,"'Vrouw'" + ,NA + ,NA + ,NA + ,1 + ,NA + ,NA + ,NA + ,"'Vrouw'" + ,"'Vrouw'" + ,"'Man'" + ,NA + ,NA + ,NA + ,1 + ,NA + ,NA + ,NA + ,"'Vrouw'" + ,"'Vrouw'" + ,"'Vrouw'" + ,1 + ,1 + ,1 + ,1 + ,1 + ,1 + ,NA + ,"'Vrouw'" + ,"'Man'" + ,"'Vrouw'" + ,NA + ,NA + ,1 + ,NA + ,1 + ,NA + ,NA + ,"'Vrouw'" + ,"'Vrouw'" + ,"'Vrouw'" + ,1 + ,1 + ,1 + ,1 + ,1 + ,NA + ,NA + ,"'Man'" + ,"'Man'" + ,"'Vrouw'" + ,1 + ,NA + ,NA + ,NA + ,NA + ,NA + ,NA + ,"'Vrouw'" + ,"'Man'" + ,"'Vrouw'" + ,1 + ,NA + ,1 + ,NA + ,1 + ,NA + ,NA + ,"'Man'" + ,"'Man'" + ,"'Vrouw'" + ,NA + ,NA + ,NA + ,NA + ,NA + ,NA + ,NA + ,"'Man'" + ,"'Man'" + ,"'Vrouw'" + ,1 + ,1 + ,1 + ,1 + ,1 + ,1 + ,NA + ,"'Man'" + ,"'Vrouw'" + ,"'Man'" + ,1 + ,NA + ,NA + ,NA + ,NA + ,NA + ,NA + ,"'Man'" + ,"'Vrouw'" + ,"'Man'" + ,1 + ,1 + ,1 + ,1 + ,1 + ,NA + ,NA + ,"'Vrouw'" + ,"'Vrouw'" + ,"'Man'") + ,dim=c(7 + ,88) + ,dimnames=list(c('maandag' + ,'dinsdag' + ,'woensdag' + ,'donderdag' + ,'vrijdag' + ,'zaterdag' + ,'zondag' + ,'geslacht') + ,1:88)) Error in array(list(NA, NA, 1, NA, NA, NA, NA, "'Man'", "'Man'", "'Man'", : length of 'dimnames' [1] not equal to array extent Execution halted