README.md

Toward a R package ?

Build depends on: - devtools - roxygen2

    # Dependencies for building the package
    Rscript --no-init-file -e \
        'install.packages(c("devtools", "roxygens2"), repos="https://cran.univ-paris1.fr")'

Package depends on: - readr - doBy

(should be manage by the Install process from DESCRIPTION file)

    # Dependencies of the packahe
    Rscript --no-init-file -e \
        'install.packages(c("readr", "doBy"), repos="https://cran.univ-paris1.fr")'

Some command lines for the build process

    # Build Install
    R CMD INSTALL --no-multiarch --with-keep.source .

    # Clean Build Install
    R CMD INSTALL --preclean --no-multiarch --with-keep.source .

    # Check package
    Rscript --no-init-file -e 'library(devtools) ; devtools::check(document = FALSE)'

    # Check package and documentation
    Rscript --no-init-file -e 'library(devtools) ; devtools::check(document = TRUE)'

    # Build source
    Rscript --no-init-file -e 'library(devtools) ; devtools::build()'

    # Build binary
    Rscript --no-init-file -e "library(devtools) ; devtools::build(binary = TRUE, args = c('--preclean'))"

    # Build documentation with Roxygen2
    Rscript --no-init-file -e "library(devtools) ; devtools::document()"

Inside R:

library(devtools)
# Install the package
devtools::install()
# Build the doc
devtools::document()

Warning: The NAMESPACE where the functions are exported is done by devtools::document().



plateforme-stlouis/Ty documentation built on May 24, 2019, 8:45 p.m.