The R Project SVN R

Rev

Rev 90031 | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

_A_n _R_d _R_e_g_r_e_s_s_i_o_n _T_e_s_t

_U_s_a_g_e:

     \x \y %{}
     
     foo(x, y, ...)
     
_A_r_g_u_m_e_n_t_s:

    x, y: combined arguments, in multiple Rd lines

          paragraph

     ...: description of ...: ...

_D_e_t_a_i_l_s:

     Included conditional content.  End(#ifdef).

     Escaped backslash '\x'.

     '%{}'

     a link and some to known destinations: 'weighted.mean', dito, '{',
     'R_HOME'.

     var in <text>.

     'foo(<x>, <y>)'.

     Preformatted:

       Escaped backslash \x.
     
       %{}
     
       var in \var{text}.
       
       foo(\var{x}, \var{y}).
       
       From gap: pedtodot.Rd -- n=split(m,par,"\034") 
     
_V_a_l_u_e:

     [NULL]

     ...

\_S_e_x_p_r:

     Yihui Xie's example:

     def
          ghi

     -

     > cat("\noutput\n")
     output

     -

     > x<-007

     Georgi Boshnakov's example of generated paragraphs: a

     b

     c

     _one_ two _one_ two

     [1] "a\n    b\n    c"

     R (2025). "t."

\_t_a_b_u_l_a_r:

        1              linked text in \tabular  <https://example.org/a&b#c> 
        2   2nd-column entry with _line break_  third                       
                                  in Rd source  column                      
       -3-                               third                              
                                           row                              
      
\_e_q_n:

     This should not start a new paragraph: 1/(n-1).

     Simple 1-arg case with basic substitution in plain text (and
     legacy HTML): 0 <= 'x' <= 1

     More symbols: sqrt{sum_i (\log(x_i)-mu)^2}
     where i \in \{1,...,n\} if n \times pi < Inf.

\_d_e_q_n:

     1-arg form, centered also in text conversion:

                        theta = (mu^*, sigma^2, rho)                    
     
     2-arg form, where the text version is collapsed before centering
     (for the sake of existing Rd files):

                                  E = m c^2                             
     
     With AMS extension (R >= 4.2.2), where the text version spans more
     than 3 source lines (5 in fact) and is thus output as-is in R >=
     4.4.0:

                  0  if x < 0,
         f(x) =
                  1  if x >= 0.
     
_E_x_a_m_p_l_e_s:

     \x
     %{}
     
     ## Not run: stop("doomed to fail")
     
     foo(x,
         y)