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      = system.file("Code", package="Biobase"),
                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

