rupica            package:adegenet            R Documentation(utf8)

_M_i_c_r_o_s_a_t_e_l_l_i_t_e_s _g_e_n_o_t_y_p_e_s _o_f _3_3_5 _c_h_a_m_o_i_s (_R_u_p_i_c_a_p_r_a
_r_u_p_i_c_a_p_r_a) _f_r_o_m _t_h_e _B_a_u_g_e_s _m_o_u_n_t_a_i_n_s (_F_r_a_n_c_e)

_D_e_s_c_r_i_p_t_i_o_n:

     This data set contains the genotypes of 335 chamois (_Rupicapra
     rupicapra_) from the Bauges mountains, in France. No prior
     clustering about individuals is known. Each genotype is
     georeferenced. These data also contain a raster map of elevation
     of the sampling area.

_U_s_a_g_e:

     data(rupica)

_F_o_r_m_a_t:

     'rupica' is a genind object with 3 supplementary components inside
     the '@other' slot:

     _x_y a matrix containing the spatial coordinates of the genotypes.

     _m_n_t a raster map of elevation, with the 'asc' format from the
          'adehabitat' package.

     _s_h_o_w_B_a_u_g_e_s a function to display the map of elevation with an
          appropriate legend (use 'showBauges()').

_S_o_u_r_c_e:

     Daniel Maillard, 'Office National de la Chasse et de la Faune
     Sauvage' (ONCFS), France.

_R_e_f_e_r_e_n_c_e_s:

     Cassar S (2008) Organisation spatiale de la variabilité
     génétique et phénotypique à l'échelle du paysage: le cas du
     chamois et du chevreuil, en milieu de montagne. PhD Thesis.
     University Claude Bernard - Lyon 1, France. 

     Cassar S, Jombart T, Loison A, Pontier D, Dufour A-B, Jullien J-M,
     Chevrier T, Maillard D. Spatial genetic structure of Alpine
     chamois (_Rupicapra rupicapra_): a consequence of landscape
     features and social factors? submitted to _Molecular Ecology_.

_E_x_a_m_p_l_e_s:

     if(require(ade4) & require(adehabitat) & require(spdep)){

     data(rupica)
     rupica

     ## see the sampling area
     showBauges <- rupica$other$showBauges
     showBauges()
     points(rupica$other$xy,col="red")

     ## perform a sPCA
     spca1 <- spca(rupica,type=5,d1=0,d2=2300,plot=FALSE,scannf=FALSE,nfposi=2,nfnega=0)
     barplot(spca1$eig,col=rep(c("black","grey"),c(2,100)),main="sPCA eigenvalues")
     screeplot(spca1,main="sPCA eigenvalues: decomposition")

     ## data visualization
     showBauges(,labcex=1)
     s.value(spca1$xy,spca1$ls[,1],add.p=TRUE,csize=.5)
     add.scatter.eig(spca1$eig,1,1,1,posi="topleft",sub="Eigenvalues")

     showBauges(,labcex=1)
     s.value(spca1$xy,spca1$ls[,2],add.p=TRUE,csize=.5)
     add.scatter.eig(spca1$eig,2,2,2,posi="topleft",sub="Eigenvalues")

     rupica$other$showBauges()
     colorplot(spca1$xy,spca1$li,cex=1.5,add.plot=TRUE)

     ## Not run: 
     ## global and local tests
     Gtest <- global.rtest(rupica@tab,spca1$lw,nperm=999)
     Gtest
     plot(Gtest)
     Ltest <- local.rtest(rupica@tab,spca1$lw,nperm=999)
     Ltest
     plot(Ltest)
     ## End(Not run)
     }

