Input data for a GAM

#1
Hi there,

I am trying to use a GAM (with the mgcv package) to look at species abundance.
I have created a data frame for input into the model but the model will not pick up the column headers when I create my function. This also spawns the error message 'object is not a matrix'.
I have also tried separating the data and using matrices but this comes up with the object is not a data frame error.

I can send the workspace if needed

Thanks