[R-SIG-Mac] Unexpected input error
Steven McKinney
smckinney at bccrc.ca
Thu Sep 26 00:35:49 CEST 2013
Hi Alan,
This is probably more appropriately addressed on the R-help email list,
as it is not really Mac-specific.
Copying your code into R on my Mac, it appears to work, no error message for me.
I see you have an older version of R, so it's unclear if it is a version issue.
My version isn't the latest, but more recent than yours.
> require("rattle")
Loading required package: rattle
Rattle: A free graphical interface for data mining with R.
Version 2.6.26 r77 Copyright (c) 2006-2013 Togaware Pty Ltd.
Type 'rattle()' to shake, rattle, and roll your data.
> weatherDS <- new.env()
> evalq({
+ data <- weather
+ nobs <- nrow(weather)
+ vars <- -grep('^(Data|Location|RISK_)', names(data))
+ form <- formula(RainTomorrow ~ .)
+ target <- all.vars(form)[1]
+ set.seed(42)
+ train <- sample(nobs, 0.7*nobs)
+ }, weatherDS)
> get("train", env = weatherDS)
[1] 335 343 105 302 233 188 266 49 236 252 163 256 331 91 356 330 365 42 166 195 313 48
[23] 341 325 29 176 133 308 152 282 248 272 130 229 2 276 3 69 298 201 124 142 13 315
[45] 140 339 285 205 309 197 106 110 126 246 324 362 210 53 81 158 207 300 231 172 257 58
[67] 82 336 306 72 312 349 64 141 301 310 351 109 149 1 167 46 102 183 219 159 66 26
[89] 24 85 185 287 292 255 357 199 90 139 200 348 286 274 265 103 247 366 193 190 269 275
[111] 156 214 191 115 136 135 363 89 338 319 88 101 322 144 175 96 221 304 56 303 273 350
[133] 148 337 198 134 189 27 242 235 34 19 104 174 352 181 38 328 65 33 355 70 360 277
[155] 243 164 40 7 342 293 260 113 123 291 289 37 353 294 278 327 212 321 347 93 83 333
[177] 157 112 150 196 171 160 59 345 261 182 267 227 232 51 35 138 23 223 296 10 268 225
[199] 125 204 147 86 244 73 279 297 155 78 203 41 213 245 52 186 329 127 87 318 305 132
[221] 161 25 79 228 45 116 43 162 209 226 283 22 259 290 180 316 12 262 71 54 9 128
[243] 314 254 68 184 20 18 121 111 39 251 31 60 340 249
>
> sessionInfo()
R version 2.15.3 (2013-03-01)
Platform: x86_64-apple-darwin9.8.0/x86_64 (64-bit)
locale:
[1] en_CA.UTF-8/en_CA.UTF-8/en_CA.UTF-8/C/en_CA.UTF-8/en_CA.UTF-8
attached base packages:
[1] stats4 grid splines stats graphics grDevices utils datasets methods
[10] base
other attached packages:
[1] rattle_2.6.26 rpart_4.1-1 glmnet_1.9-3 glinternet_0.9.0 lme4_0.999999-0
[6] Matrix_1.0-12 lattice_0.20-15 party_1.0-6 vcd_1.2-13 colorspace_1.2-1
[11] MASS_7.3-23 strucchange_1.4-7 sandwich_2.2-10 zoo_1.7-9 coin_1.0-21
[16] mvtnorm_0.9-9994 modeltools_0.2-19 survival_2.37-4
loaded via a namespace (and not attached):
[1] nlme_3.1-108 tools_2.15.3
>
Steven McKinney
Statistician
Molecular Oncology and Breast Cancer Program
British Columbia Cancer Research Centre
________________________________________
From: r-sig-mac-bounces at r-project.org [r-sig-mac-bounces at r-project.org] On Behalf Of Alan Randolph [alan_randolph at hotmail.com]
Sent: September 25, 2013 2:58 PM
To: r-sig-mac at r-project.org
Subject: [R-SIG-Mac] Unexpected input error
Hi, I am newbie to R so pardon me if this is not the forum for asking this question.
I am getting the error "unexpected input in "evalq({‚" in the Boost Tutorial example section 13.3 of Graham William's, "Data Mining with Rattle and R. Below is the line as I have entered it and version information.
To me it looks like I have copied the command verbatim from the book. What can I try to resolve the problem?
> evalq({
data <- weather
nobs <- nrow(weather)
vars <- -grep('^(Data|Location|RISK_)', names(data))
form <- formula(RainTomorrow ~ .)
target <- all.vars(form)[1]
set.seed(42)
train <- sample(nobs, 0.7*nobs)
}, weatherDS)
Error: unexpected input in "evalq({‚"
Mac OS X version 10.8.5
platform i386-apple-darwin9.8.0
arch i386
os darwin9.8.0
system i386, darwin9.8.0
status
major 2
minor 14.2
year 2012
month 02
day 29
svn rev 58522
language R
version.string R version 2.14.2 (2012-02-29)
[[alternative HTML version deleted]]
More information about the R-SIG-Mac
mailing list