lesliedb / spatial_cv

Repository for classwork
0 stars 2 forks source link

Unexplained R crash with leave one out script #1

Closed lesliedb closed 9 years ago

lesliedb commented 9 years ago

@dmcglinn I've noticed that when I replace this line in my script:

matrixCoef = rbind(get(paste("modelCoef", i, sep="")), matrixCoef)

with:

matrixCoef = rbind(as.name(paste("modelCoef", i, sep="")), matrixCoef)

rStudio crashes unexpectedly. The whole point or using as.name instead of get is so that my output would hopefully display each model run as modelCoef1, modelCoef2, etc instead of the current output of [1,]. I guess this is just for readability purposes. Any help would be greatly appreciated.

dmcglinn commented 9 years ago

I'm not sure why the crash was occurring. I've never used the as.name() function. Hopefully my changes in #3 provide a useful enough solution that this is no longer an issue.