Utility functions            package:Rdbi            R Documentation

_U_t_i_l_i_t_y _f_u_n_c_t_i_o_n_s

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

     'list.to.csv' converts a list of values to a comma seperated
     string.

     'list.to.key.pair.string' takes a list and reformats it as a
     string with arbitrary seperators between keys and values and
     between key-value pairs.

     'printListPairs' is a simple utility function that prints list
     key-value pairs nicely formated.

     'single.quote' pastes its arguments into a single quoted string.

     'double.quote' pastes its arguments into a double quoted string.

     'strip.line.feeds' removes line feeds from a string.

     'expand.asis' takes an "asis" argument as used in 'read.table' and
     returns a vector of bools indicating whether columns should be
     converted to factors.

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

     list.to.csv(...)
     list.to.key.pair.string(key.list, key.sep = "=", pair.sep = " ")
     printListPairs(list)
     single.quote(...)
     double.quote(...)
     strip.line.feeds(x)
     expand.asis(as.is, len = length(as.is))

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

    list: A list of values.

 key.sep: Seperator between keys and values.

pair.sep: Seperator between key-value pairs.

  string: A text string.

   as.is: A column name or number, or a vector of column numbers, or a
          vector of booleans indicating which columns to leave in
          character mode as opposed to converting to factors.

     len: The length of the output "asis" vector.

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

     Timothy H. Keitt

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

     <URL: http://rdbi.sourceforge.net/>

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

     list.to.csv(list(a = 'a', b = 'b', c = 'c'))
     printListPairs(list(a = 'a', b = 'b', c = 'c'))
     list.to.key.pair.string(list(a = 'a', b = 'b', c = 'c'),
      key.sep = " -> ", pair.sep = " | ")
     single.quote("test")
     double.quote("test")
     expand.asis(5, 10)
     strip.line.feeds("test\n")

