[R] roxygen2 v6.0.0

Marc Girondot marc_grt at yahoo.fr
Mon Feb 6 16:46:59 CET 2017


Hi,

I used roxygen2 v5.0.1 to document my package, and all was ok. I have 
just updated to roxygen2 v6.0.0 and my script is broken and I can't find 
why.

I have done a simple version of a package folder as a test with 3 files: 
chr.R, essai-package.R and DESCRIPTION.

Previously, I did:

package.skeleton("essai",code_files=c('chr.R',"essai-package.R"))
roxygenize("essai")
system(paste0("R CMD build '", getwd(), "/essai'"))
install.packages(file.path(getwd(), "essai_1.0.tar.gz"), repos = NULL, 
type="source")

And it worked well.

Now I get an error at the second line: roxygenize("essai")

 > roxygenize("essai")
First time using roxygen2. Upgrading automatically...
Updating roxygen version in 
/Users/marcgirondot/Documents/Espace_de_travail_R/Package_Essai/essai/DESCRIPTION
Warning: The existing 'NAMESPACE' file was not generated by roxygen2, 
and will not be overwritten.
Warning: The existing 'chr.Rd' file was not generated by roxygen2, and 
will not be overwritten.
Warning: The existing 'essai-package.Rd' file was not generated by 
roxygen2, and will not be overwritten.

And of course it fails after.

Are you aware of this situation ? And do you have a solution ?

Thanks a lot

Marc


A file DESCRIPTION:

Package: essai
Type: Package
Title: Package Used For Try
Version: 1.0
Date: 2017-02-06
Author: Marc Girondot <marc.girondot at u-psud.fr>
Maintainer: Marc Girondot <marc.girondot at u-psud.fr>
Description: Trying package.
Depends: R (>= 2.14.2)
License: GPL-2
LazyData: yes
LazyLoad: yes
Encoding: UTF-8
RoxygenNote: 6.0.0

A file essai-package.R (essai=try in French):

#' Trying package
#'
#' \tabular{ll}{
#'  Package: \tab essai\cr
#'  Type: \tab Package\cr
#'  Version: \tab 1.0 - build 1\cr
#'  Date: \tab 2017-02-06\cr
#'  License: \tab GPL (>= 2)\cr
#'  LazyLoad: \tab yes\cr
#'  }
#' @title The package essai
#' @author Marc Girondot \email{marc.girondot@@u-psud.fr}
#' @docType package
#' @name essai-package

NULL

A file chr.R:

#' chr returns the characters defined by the codes
#' @title Return the characters defined by the codes
#' @author Based on this blog: 
http://datadebrief.blogspot.com/2011/03/ascii-code-table-in-r.html
#' @return A string with characters defined by the codes
#' @param n The vector with codes
#' @description Return a string with characters defined by the codes. 
J'essaye avec un code utf-8: ê.
#' @examples
#' chr(65:75)
#' chr(unlist(tapply(144:175, 144:175, function(x) {c(208, x)})))
#' @encoding UTF-8
#' @export


chr <- function(n) {
     rawToChar(as.raw(n))
     }



More information about the R-help mailing list