ordisurf                package:vegan                R Documentation

_S_m_o_o_t_h_s _V_a_r_i_a_b_l_e_s _a_n_d _P_l_o_t_s _C_o_n_t_o_u_r_s _o_n _O_r_d_i_n_a_t_i_o_n.

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

     Function 'ordisurf' fits a smooth surface for given variable and
     plots the result on ordination diagram.

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

     ordisurf(x, y, choices=c(1, 2), knots=10, family="gaussian", col="red",
          thinplate = TRUE, add = FALSE, ...)

_A_r_g_u_m_e_n_t_s:

       x: Ordination configuration, either a matrix or a result known
          by 'scores'. 

       y: Variable to be plotted. 

 choices: Ordination axes. 

   knots: Number of initial knots in 'gam' (one more than degrees of
          freedom). 

  family: Error distribution in  'gam'. 

     col: Colour of contours. 

thinplate: Use thinplate splines in 'gam'.

     add: Add contours on an existing diagram or draw a new plot. 

     ...: Other graphical parameters. 

_D_e_t_a_i_l_s:

     Function 'ordisurf' fits a smooth surface using thinplate spline
     fitting in 'gam', and  interpolates the fitted values  into a
     regular grid using 'interp'.  Finally, it plots the results either
     over an existing ordination diagram or draws a new plot with
     sample plots and fitted contours.  The function uses 'scores' to
     extract ordination scores, and 'x' can be any result object known
     by that function.

_V_a_l_u_e:

     Function is usually called for its side effect of drawing the
     contour plot, but it returns the result object of 'gam'.

_N_o_t_e:

     The funtion requires libraries 'mgcv' ('gam') and 'akima'
     ('interp').  In fact, it is a very primitive wrapper for these.

     The default is to use thinplate splines.  These make sense in
     ordination as they have equal smoothing in all directions and are
     rotation invariant.  However, they seem to fail badly in some
     case, and then separate spline smoothing may be used.

     The function was called 'surf' in older version of 'vegan'; new
     names was chosen to avoid name clashes with the 'labdsv' package.

_A_u_t_h_o_r(_s):

     Dave Roberts and Jari Oksanen

_S_e_e _A_l_s_o:

     For basic routines 'gam', 'interp' and 'scores'. Function 
     'envfit' provides a poorer but more traditional and compact
     alternative.

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

     ## The examples are not run by `example(ordisurf)' because they need
     ## libraries `mgcv' and `akima' which may not exist in every system.
     ## Not run: data(varespec)
     ## Not run: data(varechem)
     ## Not run: library(MASS)
     ## Not run: library(mva)
     ## Not run: vare.dist <- vegdist(varespec)
     ## Not run: vare.mds <- isoMDS(vare.dist)
     ## Not run: attach(varespec)
     ## Not run: attach(varechem)
     ## Not run: ordisurf(vare.mds, Baresoil, xlab="Dim1", ylab="Dim2")
     ## Total cover of reindeer lichens
     ## Not run: ordisurf(vare.mds, Cla.ste+Cla.arb+Cla.ran, xlab="Dim1", ylab="Dim2") 

