problem with vegan function rda()

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

problem with vegan function rda()

Lukas Kohl-3
Hello R-list

Maybe someone knows what's going on here.

I'm trying to re-run a script I wrote earlier this year using the function
rda() in the vegan package. The script run fine back then, and I did not
change the dataset, so I was wandering whether there's some problem in a
updated version of the package (I re-installed R + all packages since then).

Thanks for any advice,
Lukas Kohl

--

So here's the output I get:

> rda(rel)
Call:
rda(X = rel)

Regularization parameters:
NULL

Prior probabilities of groups:
NULL

Misclassification rate:
       apparent:  %
Warning message:
In is.na(x$error.rate[1]) :
  is.na() applied to non-(list or vector) of type 'NULL'

There's no NA's in my dataset, which seems ok..

> sum(is.na(rel))
[1] 0
> nrow(rel)
[1] 59
> ncol(rel)
[1] 49
> head(rel)
      X14.0   i.15.0  ai.15.0    br.16.0      X15.1    n.15.0    i.16.0
br.17.0
1 0.8409636 2.758547 1.925111 0.00000000 0.03878272 0.8658653 1.2627433
0.00000000
2 0.8631263 2.999573 2.068838 0.00000000 0.04781487 0.9281469 1.2124018
0.01814870
3 1.1698988 4.017031 2.475490 0.00000000 0.06475970 0.8345328 1.8643781
0.04102243
4 1.1189279 3.543764 2.385878 0.00000000 0.04980440 0.7698666 1.7861071
0.03490974
5 1.2324211 2.017189 1.484382 0.02462469 0.03719938 0.8285019 1.1649025
0.00000000
6 1.1275200 1.984574 1.417046 0.00000000 0.02461027 0.7751023 0.7736307
0.01144489
     X16.0 X2.1.16.1a X10.Me.16.0 X2.3.16.1b     X2.4a X2.4.16.1w7
X2.5.i.17.0_
1 16.74626  0.4417955   1.0486484  0.3216925 0.4034028    4.357194
0.5073206
2 16.77015  0.4702506   1.1215379  0.3326751 0.3719471    4.753351
0.5005562
3 16.89350  0.7087030   2.5427811  0.3788973 0.4233197    4.578289
0.5389445
4 17.21581  0.6239133   2.5463528  0.3439109 0.4152840    4.537743
0.4928171
5 18.34007  0.2722663   0.8365801  0.1955707 0.4530307    3.462293
0.2493175
6 18.42559  0.2618034   0.8100510  0.1946894 0.4464420    3.396504
0.2508381
    X16.1c br.17.0.1    br17.1 X10.Me17.0   cy17.0    X18.0        X0
X18.1w9t._
1 1.342751  2.883930 0.5117392  0.3985677 2.214624 4.429970 0.1811544
0.1680561
2 1.456768  2.817626 0.7262325  0.3552404 2.370162 3.419123 0.4533272
0.1274811
3 1.819283  3.597939 0.7856195  0.6546772 2.029322 3.375979 0.3780399
0.1366054
4 1.748514  3.893054 0.7656742  0.5506949 2.114840 3.604125 0.3286007
0.2314595
5 1.041661  3.516501 0.3611086  0.2074937 1.722343 3.698022 0.1720278
0.1276793
6 1.008310  3.589629 0.3439892  0.2085050 1.788364 3.858083 0.0000000
0.1268165
   br19.0._ X18.1w9c   X18.1b    X18.1c    X18.2a X18.2w6.9 X18.3w6.9.12
cy.19.0
1 0.4214627 11.88366 7.042868 0.7785622 0.5296606  20.75001    0.3747013
0.1845085
2 0.3655930 12.00201 7.117161 0.7833297 0.2148572  21.92248    0.4152870
0.1879331
3 0.2086673 13.43202 6.233585 1.1172938 0.5660451  14.61465    0.4775747
0.2788579
4 0.2348959 13.74445 6.138005 1.0161645 0.2209565  15.53226    0.4344465
0.2116109
5 0.1659439 14.24557 5.240076 0.7881302 0.1541940  23.97948    0.5682993
0.1642502
6 0.1609455 14.29624 5.137798 0.7543159 0.2945796  24.54077    0.5711625
0.1318383
  cy.19.0.1      X0.1 X18.3w3.6.9     X20.0       X0.2     X18.2b
X21.0     X20.2
1  3.896800 0.1349484    3.392245 0.7221273 0.14947364 0.04188258 0.1495564
0.4198097
2  3.974945 0.1426084    3.216271 0.5750869 0.12714397 0.08999512 0.1339824
0.2883602
3  5.044190 0.3689036    2.116062 0.8468635 0.08036104 0.07226680 0.1390747
0.2504645
4  4.324061 0.3253495    2.270108 0.8674106 0.09904184 0.05582051 0.1436902
0.1901801
5  3.534329 0.1266162    3.941966 0.7320950 0.15424966 0.14193815 0.1310820
0.1926944
6  3.547334 0.1062227    4.118720 0.7581633 0.12410799 0.11998844 0.1402905
0.1977357
     X20.3a    X20.3b X20.4w6.9.12.15     X22.0 X20.5w3.6.9.12.15
X0.3    X23.0_
1 0.4094126 0.2474286       1.1500272 1.1227407         0.9296417 0.2243854
0.2339230
2 0.4186328 0.2084205       0.8633682 0.8924207         0.5396120 0.1732975
0.1987064
3 0.4683385 0.1670621       0.7293349 1.3617136         0.3184905 0.1806325
0.2426850
4 0.4419191 0.1784320       0.7967968 1.4136308         0.2825521 0.1660992
0.2709302
5 0.4628079 0.1882448       0.7705750 1.1223705         0.2243516 0.1713259
0.2452253
6 0.4212344 0.1971018       0.7522184 1.1690829         0.1822425 0.0000000
0.2481156
      X24.0      X25.0 X22.6w3.6.9.12.15.18
1 0.9094009 0.08456623           0.16707761
2 0.7546380 0.06352018           0.14586538
3 1.1081230 0.08133338           0.18639182
4 1.2978036 0.11136199           0.12997539
5 0.9084890 0.09101005           0.10949849
6 1.0261733 0.10038159           0.07969927

here are the package versions.

> version
               _
platform       x86_64-pc-linux-gnu
arch           x86_64
os             linux-gnu
system         x86_64, linux-gnu
status

major          3
minor          0.2
year           2013
month          09
day            25
svn rev        63987
language       R
version.string R version 3.0.2 (2013-09-25)
nickname       Frisbee Sailing

> citation('vegan')

To cite package ‘vegan’ in publications use:

  Jari Oksanen, F. Guillaume Blanchet, Roeland Kindt, Pierre Legendre, Peter
  R. Minchin, R. B. O'Hara, Gavin L. Simpson, Peter Solymos, M. Henry H.
  Stevens and Helene Wagner (2013). vegan: Community Ecology Package. R
  package version 2.0-10. http://CRAN.R-project.org/package=vegan

        [[alternative HTML version deleted]]

______________________________________________
[hidden email] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Reply | Threaded
Open this post in threaded view
|

Re: problem with vegan function rda()

Jari Oksanen
Lukas,


Lukas Kohl <llukas.kkohl <at> gmail.com> writes:

>
> Hello R-list
>
> Maybe someone knows what's going on here.
>
> I'm trying to re-run a script I wrote earlier this year using the function
> rda() in the vegan package. The script run fine back then, and I did not
> change the dataset, so I was wandering whether there's some problem in a
> updated version of the package (I re-installed R + all packages since then).
>
> Thanks for any advice,
> Lukas Kohl
>

Sorry for the late reply: I don't follow this list regularly.

A couple of points about your question:

(1) vegan indeed has function rda(), but its output has no resemblance
to your example (except for the line repeating Call:). Either you are using
some other package or you have made up your own version of rda() or you
do not show its output.

(2) The rda() function in vegan 2.2-0. This is documented in NEWS. You can
see this by issuing vegandocs("NEWS") command after loading library(vegan).

(3) I have no idea what your script does (id does something different than
vegan::rda()) and I cannot reproduce the problem without that knowledge.

Kind regards, Jari Oksanen
 
PS. Sorry for not top-posting: Gmane does not allow it.

PS2. Sorry for removing some of your message: Gmane requires this.

> --
>
> So here's the output I get:
>
> > rda(rel)
> Call:
> rda(X = rel)
>
> Regularization parameters:
> NULL
>
> Prior probabilities of groups:
> NULL
>
> Misclassification rate:
>        apparent:  %
> Warning message:
> In is.na(x$error.rate[1]) :
>   is.na() applied to non-(list or vector) of type 'NULL'
>
> There's no NA's in my dataset, which seems ok..
>
> > sum(is.na(rel))
> [1] 0
> > nrow(rel)
> [1] 59
> > ncol(rel)
> [1] 49
> > head(rel)
>       X14.0   i.15.0  ai.15.0    br.16.0      X15.1    n.15.0    i.16.0

______________________________________________
[hidden email] mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.