R version 3.0.2 (2013-09-25) -- "Frisbee Sailing" Copyright (C) 2013 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-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) + } > y <- c(6.2,4.4,2.4,2.7,2.2,5.1,3.4,3.4,3.4,7.0,4.3,4.7,6.0,4.6,4.3,3.7,3.1,2.5,2.3,2.1,2.1,3.7,4.3,4.0,3.1,3.6,7.0,6.0,5.1,4.1,4.1,6.8,5.9,8.9,8.8,6.5,6.2,6.3,5.4,4.6,4.4,4.9,6.5,7.2,6.5,5.5,4.8,4.6,4.0,3.9,3.6,3.3,4.1,5.3,5.9,5.0,4.2,4.1,4.2,5.4,9.8,9.6,8.8,7.7,7.0,5.7) > x <- c(347.01,324.85,316.36,385.13,479.12,489.38,495.3,461.73,504.76,523.15,505.44,495.27,570.51,573.02,556.76,588.55,612.57,624.04,679.84,751.48,740.88,862.65,845.44,780.89,829.11,875.4,916.08,888.96,899.97,1010.87,1061.45,1136.95,1164,1233.78,1197.54,1119.99,1200.24,1281.01,1315.76,1425.02,1465.38,1537.54,1543.8,1527.45,1544.66,1596.04,1703.88,1792.69,1892.42,2022.15,2180.96,2282.28,2473.05,2376.94,2178.78,2054.45,2109.36,2341.12,2538.4,2638.3,2543.42,2104.99,2136.84,2232.08,2333.43,2603.53) > ylab = 'Men's unemployment' Error: unexpected symbol in "ylab = 'Men's" Execution halted