kingTetrahedron         package:compositions         R Documentation

_P_l_o_t_i_n_g _c_o_m_p_o_s_i_t_i_o_n _i_n_t_o _r_o_t_a_t_a_b_l_e _t_e_t_r_a_h_e_d_r_o_n

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

     Plots acomp/rcomp object  into tetrahedron and exports it in
     kinemage format.

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

        kingTetrahedron(X,parts=1:4,file="tmptetrahedron.kin",clu=NULL,vec=NULL,king=TRUE,scale=0.2,col=1,title="Compositional Tetrahedron")
               

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

       X: a compositional acomp or rcomp object of 4 or more parts

   parts: a numeric or character vector specifying the 4 parts to be
          used.

    file: file.kin for 3D display  with the KiNG (Kinemage, Next
          Generation) interactive system for three-dimensional vector
          graphics. 

     clu: partition determining the colors of points

     vec: vector of values determining points sizes

    king: FALSE for Mage; TRUE for King (described below)

   scale: relative size of points

     col: color of points if clu=NULL

   title: The title of the plot

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

     The  routine transforms a 4 parts mixture m quadrays into
     3-dimensional XYZ coordinates and writes them as file.kin. For
     this transformation we apply K. Urner: Quadrays and XYZ at <URL:
     http://www.grunch.net/synergetics/quadxyz.html> and T. Ace:
     Quadray formulas at <URL: http://www.qnet.com/~crux/quadray.html>.
      The kin file we display as 3-D animation with KiNG viewer  a free
     software available at <URL: http://kinemage.biochem.duke.edu>.  A
     kinemage is a dynamic, 3-D illustration.  The best way to take
     advantage of that is by rotating it and twisting it around  with
     the mouse click near the center of the graphics window and slowly
     draging right or left, up or down. Furthermore by clicking on
     points with the mouse (left button again),  the label associated
     with each point will appear in the bottom left of the graphics
     area and also the distance from this point to the last will be
     displayed. With the right button drag we can zoom in and out of
     the picture. This animation supports coloring and different sizing
     of points.

     We can display the kin file as 3-D animation also with MAGE viewer
     previous version of KiNG, also a free software available at
     http://kinemage.biochem.duke.edu. For this we put king=FALSE in
     the command line.

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

     The function is called for its sideeffect of generating  a file 
     for 3D display  with the KiNG (Kinemage, Next Generation)
     interactive system for three-dimensional vector graphics. Works
     only with KiNG viewer available at <URL:
     http://kinemage.biochem.duke.edu>

_N_o_t_e:

     This routine and the documentation is based on mix.Quad2net from
     the MixeR-package of Vladimir Batagelj and Matevz Bren, and has
     been contributed by Matevz Bren to this package. Only slight
     modifications have been applied to make function compatible with
     the philosophy and objects of the compositions package.

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

     Vladimir Batagelj and Matevz Bren, with slight modifications of
     K.Gerald van den Boogaart

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

     Aitchison, J. (1986) _The Statistical Analysis of Compositional
     Data_ Monographs on Statistics and Applied Probability. Chapman &
     Hall Ltd., London (UK). 416p.

     <URL: http://vlado.fmf.uni-lj.si/pub/MixeR/>

     <URL: http://www.grunch.net/synergetics/quadxyz.html>

     <URL: http://www.qnet.com/~crux/quadray.html>

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

     'plot.acomp'

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

     data(SimulatedAmounts)
     dat <- acomp(sa.groups5)
     hc <- hclust(dist(dat), method = "complete")  # data are clustered 
     kingTetrahedron(dat,parts=1:4, file="myfirst.kin", clu=cutree(hc,7),
     scale=0.2)
     # the 3-D plot is written into Glac1.kin file to be displayed with KiNG viewer. # The seven clusters partition is notated with different colors of points.

