[R-pkg-devel] Fix non-ASCII characters in R packages

peter dalgaard pd@|gd @end|ng |rom gm@||@com
Mon Dec 2 15:29:29 CET 2019


Dunno if it helps, but the NOTE is about "checking data", which, as far as I can decipher the code, means that it is looking at datasets in the data/ directory. So I suspect that looking at *.R files is not going to be the right thing to do.

-pd

> On 2 Dec 2019, at 14:57 , Rafael Pereira <rafa.pereira.br using gmail.com> wrote:
> 
> Hi all,
> 
> I am trying to update my R package on CRAN but I am being requested to fix
> this NOTE:
> 
> checking data for non-ASCII characters ... NOTE Note: found 58 marked
> Latin-1 strings
> 
> I have used to code below to identify my scripts that have strings using
> non-ASCII characters. The problem is that in most cases these non-ASCII
> characters are used in the documentation of functions, so I cannot simply
> convert their encoding using iconv() for example
> 
> # Find scripts using non-ASCII characters
>  f <- list.files(pattern = "*.R", recursive = T)
>  r <- lapply(f, tools::showNonASCIIfile)
> 
> I've tried (1) reopening and (2) resaving those scripts with UTF-8
> encoding, (3) setting UTF-8 as the default encoding of the project, but
> nothing seems to fix this issue. Any suggestions?
> 
> obs. I've posted this question on SO
> https://stackoverflow.com/questions/59139923/fix-non-ascii-characters-in-r-packages
> 
> best,
> 
> Rafael Pereira
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel

-- 
Peter Dalgaard, Professor,
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Office: A 4.23
Email: pd.mes using cbs.dk  Priv: PDalgd using gmail.com



More information about the R-package-devel mailing list