Non ASCII words (commom in portuguese) trigers warnings
in R CMD CHECK
. To prevent this, enc{}{}
must be
used. This function gets a character and returns enc{}{}
for all non ASCII words.
use_enc(x) enc_nize(file) enc_titles()
x | character[1] A title to be converted. |
---|---|
file | character[1] A R file with documentation written in
roxygen syntax. |
character[1] The converted character provided.
enc_titles
applies enc_nize
to all files in
the ./R/
directory of a package. So, it is assumed that
working directory is a root package directory. enc_titles
modifies files. So be careful with its use.
library(proto) library(gsubfn) cat(use_enc("Um título com conteúdo acenturado para testar a função"), "\n")#> Um t\enc{í}{i}tulo com conte\enc{ú}{u}do acenturado para testar a fun\enc{çã}{ca}o