straight            package:compositions            R Documentation

_D_r_a_w_s _i_n_f_i_n_i_t_e _s_t_r_a_i_g_h_t _l_i_n_e_s.

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

     The function draws lines in a given direction d through points x.

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

               straight(x,...)
               ## S3 method for class 'acomp':
               straight(x,d,...,steps=30)
               ## S3 method for class 'rcomp':
               straight(x,d,...,steps=30)
               ## S3 method for class 'aplus':
               straight(x,d,...,steps=30)
               ## S3 method for class 'rplus':
               straight(x,d,...,steps=30)
               ## S3 method for class 'rmult':
               straight(x,d,...,steps=30)
               

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

       x: dataset of points of the given type to draw the line through

       d: dataset of directions of the line

     ...: further graphical parameters

   steps: the number of discretisation points to draw the segments not
          straight on the monitor.

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

     The functions add lines to the graphics generated with the
     corresponding plot functions. 
      Adding to multipaneled plots, redraws the plot completely and is
     only possible, when the plot has been created with the plotting
     routines from this library. 
      Lines end, when they leave the space (e.g. the simplex), which
     sometimes leads to the impression of premature end.

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

     'plot.acomp','lines.acomp'

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

     data(SimulatedAmounts)

     plot(acomp(sa.lognormals))
     straight(mean(acomp(sa.lognormals)),princomp(acomp(sa.lognormals))$Loadings[1,],col="red")
     straight(mean(rcomp(sa.lognormals)),princomp(rcomp(sa.lognormals))$loadings[,1],col="blue")

     plot(aplus(sa.lognormals[,1:2]))
     straight(mean(aplus(sa.lognormals[,1:2])),princomp(aplus(sa.lognormals[,1:2]))$Loadings[1,],col="red")
     straight(mean(rplus(sa.lognormals[,1:2])),princomp(rplus(sa.lognormals[,1:2]))$loadings[,1],col="blue")

     plot(rplus(sa.lognormals[,1:2]))
     straight(mean(aplus(sa.lognormals[,1:2])),princomp(aplus(sa.lognormals[,1:2]))$Loadings[1,],col="red")
     straight(mean(rplus(sa.lognormals[,1:2])),princomp(rplus(sa.lognormals[,1:2]))$loadings[,1],col="blue")

