objBrowse               package:svMisc               R Documentation

_F_u_n_c_t_i_o_n_s _t_o _i_m_p_l_e_m_e_n_t _a_n _o_b_j_e_c_t _b_r_o_w_s_e_r

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

     These functions provide features required to implement a complete
     object browser in a GUI client.

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

     objBrowse(id = "default", envir = .GlobalEnv, all.names = NULL, pattern = NULL,
             group = NULL, sep = "\t", path = NULL, regenerate = FALSE)
     objClear(id = "default")
     objDir()
     objInfo(id = "default", envir = .GlobalEnv, object = "", path = NULL)
     objList(id = "default", envir = .GlobalEnv, object = NULL, all.names = FALSE,
             pattern = "", group = "", all.info = FALSE, sep = "\t", path = NULL,
             compare = TRUE, ...)

     objMenu(id = "default", envir = .GlobalEnv, objects = "", sep = "\t",
             path = NULL)
     objSearch(sep = "\t", path = NULL, compare = TRUE)

     ## S3 method for class 'objList':
     print(x, sep = NA, eol = "\n", header = !attr(x, "all.info"),
             raw.output = !is.na(sep), ...)

     write.objList(x, path, sep = "\t", ...)

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

      id: The id of the object browser (you can run several ones
          concurrently, providing you give them different ids) 

   envir: An environment, or the name of the environment, or the
          position in the 'search()' path 

all.names: Do we display all names (including hidden variables starting
          with '.')? 

 pattern: A pattern to match for selecting variables 

   group: A group to filter 

    path: The path where to write a temporary file with the requested
          information. Set to NULL (default) if you don't pass this
          data to your GUI client by mean of a file 

regenerate: Do we force to regenerate the information? 

  object: name of the object selected in the object browser,
          components/arguments of which should be listed

 objects: A list with selected items in the object browser 

all.info: Do we return all the information (envir as first column or
          not (by default) 

 compare: If TRUE, result is compared with last cached value and the
          client is updated only if something changed 

     sep: Separator to use between items (if path is not NULL) 

       x: Object returned by 'objList'

     eol: Separator to use between object entries, default is to list
          each item in a separate line

  header: If TRUE, two-line header is printed, of the form: 
           Environment=environment name 
           Object=object name 
           Default is not to print header if 'all.info' is true. 

raw.output: If TRUE, a compact, better suited for parsing output is
          produced

     ...: further arguments, passed to 'write.table'

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

     'objBrowse()' does the horsework. 'objDir()' gets the temporary
     directory where exchange files are stored, in case you exchange
     data through files. You can use a better way to communicate with
     your GUI (you have to provide your code) and disable writing to
     files by using 'path = NULL'. 'objList()' lists objects in a given
     environment, elements of a recursive objects or function
     arguments. 'objSearch()' lists the search path. 'objClear()'
     clears any reference to a given object browser. 'objInfo()'
     computes a tooltip info for a given object. 'objMenu()' computes a
     context menu for selected object(s) in the object explorer managed
     by the GUI client. 'print.objList()' print method for 'objList'
     objects.

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

     Depending on the function, a list, a string, a reference to an
     external, temporary file or 'TRUE' in case of success or 'FALSE'
     otherwise is returned invisibly.

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

     Philippe Grosjean (phgrosjean@sciviews.org) and Kamil Barton
     (kbarton@zbs.bialowieza.pl)

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

     'Complete', 'CallTip'

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

     # Create various context menus
     data(iris)
     (objInfo(object = "iris"))
     data(trees)
     # For one object
     (objMenu(objects = "iris"))
     # For multiple objects
     (objMenu(objects = c("iris", "trees")))
     # For inxistant object (return "")
     (objInfo(object = "noobject"))
     (objMenu(objects = "noobject"))
     rm(iris, trees)

     # For environments
     (objInfo(envir = ".GlobalEnv"))
     (objMenu(envir = ".GlobalEnv"))
     (objInfo(envir = "TempEnv"))
     (objMenu(envir = "TempEnv"))
     (objInfo(envir = "package:datasets"))
     (objMenu(envir = "package:datasets"))
     # For an environment that does not exist on the search path (return "")
     (objInfo(envir = "noenvir"))
     (objMenu(envir = "noenvir"))

