mlibrary              package:mvbutils              R Documentation

_L_o_a_d_i_n_g _a_n_d _l_i_s_t_i_n_g _o_f _i_n_f_o_r_m_a_l _p_a_c_k_a_g_e_s

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

     'mlibrary' lets you use tasks as informal proto-packages. The
     documentation etc. requirements are much less stringent than for
     proper packages.

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

     # Usual: mlibrary( task=)
     mlibrary( ..., character.only=FALSE, task, pos=lib.pos(), execute.First=TRUE)

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

    task: an unquoted character string naming a task.

 character.only: if TRUE, 'task' will be interpreted as a normal quoted
          character string.

     pos: a position on the search path; no reason not to use the
          default

 execute.First: if FALSE, don't execute any '.First.lib' code. ?Is this
          working?

     ...: other arguments as for 'library'

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

     'mlibrary( task=mytask)' loads task 'mytask' as a library. It sets
     'lib.loc' based on the disk location of 'mytask' before calling
     'library'. If no objects are found in the loaded package after the
     'library' call (i.e. if there is no code in the file "R/mytask"),
     then 'mlibrary' will load the .Rdata file and execute its
     '.First.lib' if any (but see below). This binary-loading feature
     is extremely convenient if you are developing personal
     proto-libraries and want to avoid the formality of R source files,
     Rd documentation files, and perpetual RCMD INSTALL; it's how I
     maintain 'mvbutils', for example. Of course, for CRAN distribution
     you must do the job properly; 'formalize.package' may help.

     To use task 'XXX' as a proto-package loaded via
     'mlibrary(task=XXX)', all you need to add to 'XXX' is a
     DESCRIPTION file in the task directory; none of the usual package
     subdirectories (not even "R" or "man") need be present.

     After 'mlibrary( task=mytask)', you can 'cd(mytask)' to bring
     'mytask' into the active workspace (top of the search path); see
     'cd'. Note that 'mlibrary' calls '.First.lib', while 'cd' calls
     '.First.task', and you probably don't want both in a single task.

     'execute.First=FALSE' is useful for debugging; if there is a
     problem in '.First.lib', normal 'library' will just refuse to load
     the package.

     'mlibrary' without a 'task' argument will duplicate 'library'. In
     particular, '.execute.First=FALSE' will have no effect.

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

     As for 'library'.

_N_o_t_e:

     (1) The "binary load" option (see '?INSTALL') available in more
     recent versions of R may make 'mlibrary' partly obsolete.

     (2) 'mlibrary' has not been tried with namespaced proto-libraries.

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

     Mark Bravington

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

     'cd', 'formalize.package'

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

     ## Not run: 
     mlibrary( task=mvbutils)
     ## End(Not run)

