[R] CCA with Vegan - Plot problem
Gavin Simpson
gavin.simpson at ucl.ac.uk
Fri Nov 9 13:15:01 CET 2012
On Fri, 2012-11-09 at 00:51 -0800, rumble14 wrote:
> Hi,
> I've just started using R and am having some problems with CCA using vegan.
>
> I'm looking at abundance p/m2 (hence decimals) vs environmental variables
> and have been using
> http://ecology.msu.montana.edu/labdsv/R/labs/lab12/lab12.html to guide me
> through.
>
> My organism data looks like this:
> Sample "Species_1" "Species_2" "Species_3" etc
> Sample_1 0 0.12432 0.3456
> etc
>
> and is in a .csv file
>
> My environment data (.csv again) looks like this:
> Temp Water etc
> 18 33.3
> etc
>
> I can get vegan to run the CCA with no problems but when I enter
>
> >cca1.plot <- plot(cca.1,choices=c(1,2))
>
> I get the following error message:
>
> Error in function (formula, data = NULL, subset = NULL, na.action = na.fail,
> :
> invalid type (list) for variable 'org'
>
> ('org' is the name of my organism file once attached).
Somewhat frustratingly you have covered everything *but* how you created
`cca.1` and whilst you might presume that because an error was not
thrown everything worked out OK with that procedure, the failing
`plot()` call suggests otherwise.
Can you show the exact code you used please? Also, not sure why you are
attaching anything - it is not required for most R usage and certainly
not for using cca() in vegan.
G
> I'd appreciate some help. If I haven't given enough detail, please let me
> know. I've tested the example data given on the website and it works so am
> obviously missing something I shouldn't be.
>
> Cheers,
> Heather
>
>
>
> --
> View this message in context: http://r.789695.n4.nabble.com/CCA-with-Vegan-Plot-problem-tp4649012.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> R-help at r-project.org 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.
>
--
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
Dr. Gavin Simpson [t] +44 (0)20 7679 0522
ECRC, UCL Geography, [f] +44 (0)20 7679 0565
Pearson Building, [e] gavin.simpsonATNOSPAMucl.ac.uk
Gower Street, London [w] http://www.ucl.ac.uk/~ucfagls/
UK. WC1E 6BT. [w] http://www.freshwaters.org.uk
%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%~%
More information about the R-help
mailing list