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()

Arguments

x

character[1] A title to be converted.

file

character[1] A R file with documentation written in roxygen syntax. enc_nize() assumes that title is signed with @title tag. If it is not the case, the function give a warning. This function returns NULL and modifies files in disc. Be careful with its use.

Value

character[1] The converted character provided.

Details

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.

Examples

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