When I create an R-package using UTF-8 encoding and special characters like ä,ß, etc., they are shown correctly in the description, but if the title of a function contains one, the whole title becomes NA.
For example, I create the package minimalExample with
library(devtools)
library(roxygen2)
create("minimalExample")
Then I put the file with this function and description in the R folder of minimalExample:
#' Title containing ä or ß
#'
#' Description containing ä or ß and ü.
#'
#' @param x Some name.
#' @examples
#' hello("world")
#' @encoding UTF-8
hello <- function(x){
print(paste("Hello,", x))
}
Then I make the documentation pdf using
document("minimalExample")
shell('R CMD Rd2pdf --encoding=UTF-8 minimalExample')
And the result is: ä,ß and ü are in the description of the pdf manual file, but there's a NA instead of the title.
The help (at least using RStudio) displays the title correctly.
load_all("minimalExample")
?hello