[R] Object not found using GAMs in MGCV Package

ruggeddon24 smithdon2469 at gmail.com
Tue Jan 17 00:29:15 CET 2012


This is my first time running GAMs in R.
My csv file has these column headings:

"X"         "Y"         "Sound"     "Atlantic"  "Blacktip"  "Bonnet"   
"Bull"      "Finetooth" "Lemon"     "Scalloped" "Sandbar"   "Spinner"  
"Abundance" "Diversity" "Depth"     "Distance"  "Width"     "System"   
"Channel"   "Profile"  "Bathy"     "Slope"     "Salinity"
 X is longitude and Y is Latitude.

I typed in the code below and received the reply "Error in eval(expr, envir,
enclos) : object 'Atlantic' not found".

> library(mgcv)
This is mgcv 1.7-6. For overview type 'help("mgcv-package")'.
> help("mgcv-package")
starting httpd help server ... done
> gam(Atlantic ~ s(depth, bs="sos", k=4) + s(distance, bs="sos", k=4))
Error in eval(expr, envir, enclos) : object 'Atlantic' not found

I do not have a clue how to fix this problem. Do I have too many variables
or do I need to remove my x and y from the file? This data is being used to
assess the spatial distribution of shark abundance in relation to
environmental variables. I really cannot remove the x and y anyway. Help
would be greatly appreciated.

--
View this message in context: http://r.789695.n4.nabble.com/Object-not-found-using-GAMs-in-MGCV-Package-tp4301836p4301836.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list