Error while running gls with nlme
<p>I am trying to run the gls function but I keep getting this error message:</p>

<p>"Error in model.frame.default(formula = ~var + FS, data = list(MINBIO15 = c(37L,  : 
  object is not a matrix"</p>

<p>My data looks like this:</p>

<pre><code>                        MINBIO15  MAXBIO15  FS
Achyranthes_aspera         37      117      0
Achyropsis_avicularis      28      86       0
Alternanthera_adscendens  -999    -999      -999
Alternanthera_brasiliana   33      119      0
Alternanthera_caracasana   35      109      1
Alternanthera_cinerella    105     120      1
...
</code></pre>

<p>My script is:</p>

<pre><code>&gt;tree&lt;-read.tree ("tree.phy")
&gt;clima&lt;-read.table("mydata.txt",header=TRUE,na.strings=-999)
&gt;clima&lt;-na.omit(clima)
&gt;match.phylo.data(tree, clima)
&gt;var=(clima$MINBIO15)
&gt; result.br &lt;- gls(var ~ FS, clima, correlation=corBrownian(phy=tree),method="REML") 
</code></pre>

<p>Data and tree tips match perfectly, and my data is a dataframe</p>

<p>Perhaps you could give some advice on it?</p>