Re: [R] Object not found using GAMs in MGCV Package

2012-01-16 Thread Don McKenzie
And note how Michael has changed your code so that your data object is now named "Final" instead of "Final.csv". On 16-Jan-12, at 5:16 PM, R. Michael Weylandt wrote: That should work: you are using it before the call to gam? Try this (verbatim) library(mgcv) Final <- read.csv("Final.csv

Re: [R] Object not found using GAMs in MGCV Package

2012-01-16 Thread R. Michael Weylandt
That should work: you are using it before the call to gam? Try this (verbatim) library(mgcv) Final <- read.csv("Final.csv") ls.str() search() sessionInfo() gam(Atlantic ~ s(depth, bs="sos", k=4) + s(distance, bs="sos", k=4), data = Final) and give the output. Michael On Jan 16, 2012, at 7

Re: [R] Object not found using GAMs in MGCV Package

2012-01-16 Thread Dontrece Smith
I used: > Final <- read.csv("Final.csv", header=TRUE) On 1/16/12, Jorge I Velez wrote: > Hi Dontrece, > > It looks like you do not have an object "Final" in your active session. > Could you please show us how you read your data, e.g., what commands you > used and what's the result of ls()? > >

Re: [R] Object not found using GAMs in MGCV Package

2012-01-16 Thread Dontrece Smith
Now, it read this: > library(mgcv) This is mgcv 1.7-6. For overview type 'help("mgcv-package")'. > gam(Atlantic ~ s(depth, bs="sos", k=4) + s(distance, bs="sos", k=4), data = > Final) Error in inherits(x, "data.frame") : object 'Final' not found On 1/16/12, Jorge I Velez wrote: > Hi, > > If "x

Re: [R] Object not found using GAMs in MGCV Package

2012-01-16 Thread Jorge I Velez
Hi Dontrece, It looks like you do not have an object "Final" in your active session. Could you please show us how you read your data, e.g., what commands you used and what's the result of ls()? As Sarah Goslee mentioned in an earlier post, you probably used read.table() or read.csv() but you hav

Re: [R] Object not found using GAMs in MGCV Package

2012-01-16 Thread Jorge I Velez
Hi, If "x" is your data, then gam(Atlantic ~ s(depth, bs="sos", k=4) + s(distance, bs="sos", k=4), data = x) will do. See examples in ?gam. BTW, how did you read your data in R? What's the output of ls()? HTH, Jorge * * On Mon, Jan 16, 2012 at 6:29 PM, ruggeddon24 <> wrote: > This is my f

Re: [R] Object not found using GAMs in MGCV Package

2012-01-16 Thread Sarah Goslee
See inline: On Mon, Jan 16, 2012 at 6:29 PM, ruggeddon24 wrote: > 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" > "A