createPackage            package:Biobase            R Documentation

_C_r_e_a_t_e _a _P_a_c_k_a_g_e _D_i_r_e_c_t_o_r_y _f_r_o_m _a _T_e_m_p_l_a_t_e

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

     Create a package directory from a template, with symbol-value
     substitution

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

     createPackage(pkgname, destinationDir, originDir, symbolValues, unlink=FALSE, quiet=FALSE)

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

 pkgname: Character. The name of the package to be written.

destinationDir: Character. The path to a directory where the package is
          to be written.

originDir: Character. The path to a directory that contains the
          template package. Usually, this will contain a file named
          'DESCRIPTION', and subdirectories 'R', 'man', 'data'. In all
          files and filenames, symbols will be replaced by their
          respectives values, see the parameter 'symbolValues'.

symbolValues: Named list of character strings. The symbol-to-value
          mapping. See 'copySubstitute' for details.

  unlink: Logical. If 'TRUE', and 'destinationDir' already contains a
          file or directory with the name 'pkgname', try to unlink
          (remove) it.

   quiet: Logical. If 'TRUE', do not print information messages.

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

     The intended use of this function is for the automated mass
     production of data packages, such as the microarray annotation,
     CDF, and probe sequence packages. An example is in the function
     'makeProbePackage'.

     No syntactic or other checking of the package is performed. For
     this, use R CMD check.

     The symbols '@PKGNAME@' and '@DATE@' are automatically defined
     with the values of 'pkgname' and '\date()', respectively.

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

     The function returns a 'list' with one element 'pkgdir': the path
     to the package.

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

     Wolfgang Huber <URL: http://www.dkfz.de/mga/whuber>

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

     'copySubstitute', 'makeProbePackage', the reference manual
     _Writing R extensions_.

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

       sym  = list(AUTHOR = "Hesiod", VERSION = "1.0",
              TITLE = "the nine muses",
              FORMAT = "Character vector containg the names of the 9 muses.")

       res  = createPackage("muses",
                destinationDir = tempdir(),
                originDir      = file.path(.path.package("Biobase"), "Code"),
                symbolValues   = sym,
                unlink = TRUE, quiet = FALSE)

       muses = c("Calliope", "Clio", "Erato", "Euterpe", "Melpomene",
                 "Polyhymnia", "Terpsichore", "Thalia", "Urania")

       dir.create(file.path(res$pkgdir, "data"))

       save(muses, file = file.path(res$pkgdir, "data", "muses.rda"))

       res$pkgdir

