[Rd] Possible bug in help file name generation

Deepayan Sarkar deep@y@n@@@rk@r @end|ng |rom gm@||@com
Thu Jun 24 14:19:55 CEST 2021


On Thu, Jun 24, 2021 at 5:31 PM Iñaki Ucar <iucar using fedoraproject.org> wrote:
>
> Hi,
>
> I noticed that R 4.1 places html files into the packages' help
> directory, compared to previous versions, which used an RDS. I found a
> possible bug in the code that processes the aliases from the Rd files
> and generates the names for these html files (I haven't identified
> where this happens though).
>
> To reproduce this, install e.g. the 'caper' package from CRAN and
> inspect the help directory. I find the following file:
>
> 'pgls.confint'$'\n''.html'
>
> which contains a special character. This comes from the fact that the
> file caper/man/pgls.profile.Rd in caper's source code contains a
> newline in the corresponding alias:
>
> \name{pgls.profile}
> \alias{pgls.profile}
> \alias{plot.pgls.profile}
> \alias{pgls.confint
> }
>
> and this ends up in the file name.

Yes, the code should probably do a trimws() somewhere, but this also
looks like something that maybe R CMD check should identify and
complain about.

Best,
-Deepayan

> --
> Iñaki Úcar
>
> ______________________________________________
> R-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel



More information about the R-devel mailing list