move                package:mvbutils                R Documentation

_O_r_g_a_n_i_z_i_n_g _R _w_o_r_k_s_p_a_c_e_s

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

     'move' shifts one or more objects around the task hierarchy (see
     'cd'), whether or not the source and destination are currently
     attached on the search path.

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

     move( x, from, to)
     move( what=, from, to)
     move( x, from, to, copy=, overwrite.by.default=)

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

       x: unquoted name

    from: unquoted path specifier

      to: unquoted path specifier

    what: character vector

 overwrite.by.default: logical(1)

    copy: logical(1)

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

     The normal invocation is something like 'move( myobj, .,
     0/another.task)'- note the lack of quotes around 'myobj'. To move
     objects with names that have to be quoted, or to move several
     objects at the same time, specify the 'what' argument: e.g. 'move(
     what=c( "myobj", "%myop%"), ., 0/another.task)'. Note that 'move'
     is playing fast and loose with standard argument matching here; it
     correctly interprets the '.' as 'from', rather than 'x'. This
     well-meaning subversion can lead to unexpected trouble if you
     deviate from the paradigms in EXAMPLES. If in doubt, you can
     always name 'from' and 'to'.

     If 'move' finds an object with the same name in the destination,
     you will be asked whether to overwrite it. If you say no, the
     object will not be moved. If you want to force overwriting of a
     large number of objects, set 'overwrite.by.default=TRUE'.

     By default, 'move' will delete the original object after it has
     safely arrived in its destination. It's normally only necessary
     (and more helpful) to have just one instance of an object; after
     all, if it needs to be accessed by several different tasks, you
     can just 'move' it to an ancestral task. However, if you really do
     want a duplicate, you can avoid deletion of the original by
     setting 'copy=TRUE'.

     You will be prompted for whether to 'save' the source and
     destination tasks, if they are attached somewhere, but not in
     position 1. Normally this is a good idea, but you can always say
     no, and call 'save.pos' or 'Save.pos' later. If the source and/or
     destination are not attached, they will of course be 'save'd
     automatically. The top workspace (i.e. current task) '.GlobalEnv'
     is never saved automatically; you have to call 'save.image' or
     'Save' yourself.

     'move' is not meant to be called within other functions.

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

     Mark Bravington

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

     'cd'

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

     ## Not run: 
     move( myobj, ., 0) # back to the ROOT task
     move( what="%myop%", 0/first.task, 0/second.task)
     # neither source nor destination attached. Funny name requires "what"
     move( what=c( "first.obj", "second.obj"), ., ../sibling.task)
     # multiple objects require "what"
     ## End(Not run)

