1 Jul 17:32
Re: Model specification with RPy/vegan integration (Gregory, Matthew)
>
> Hi all,
>
> (This might be a bit tangetial and technical question for this
> listserve. Please advise if there is a more appropriate venue.)
>
> I'm trying to call vegan 'cca' from Python using Rpy. I read my species
> and environmental data into R data frames without an issue and can even
> run the 'full' cca model without a problem, e.g.
>
> from rpy import *
> set_default_mode(NO_CONVERSION)
>
> # Import the vegan library
> r.library('vegan')
>
> # Open up the data files and read into data frames
> spp_file = r.read_csv('spp.csv', header=r.TRUE)
> env_file = r.read_csv('env.csv', header=r.TRUE)
> spp = r.data_frame(spp_file, row_names='FCID')
> env = r.data_frame(env_file, row_names='FCID')
>
> # Squareroot transform the species matrix
> spp = r.sqrt(spp)
>
> # Create the vegan CCA
> out_cca = r.cca(spp, env)
>
> However, when I try to specify the model to only include a subset of the
> environmental variables, e.g.
(Continue reading)
RSS Feed