Skip to content

Documentation on how to keep source code references (line numbers) in installed packages seems non-working #66

@aryoda

Description

@aryoda

To show the file name and line number that has thrown a condition the current documentation at github says:

enable the keep.source.pkgs option before (you install the packages!)

It seems that this does not work, at least not if I use install.packages as-is:

install.packages("data.table")

What seems to work is:

install.packages("data.table", INSTALL_opts = "--with-keep.source")

The reason seems to be that install.packages calls R CMD INSTALL internally.

Adding the option to .Rprofile seems to work keeping the source references (tested with R 3.6.1).

What should work: Setting the environment variable R_KEEP_PKG_SOURCE to yes (see ?options for the option keep.source.pkgs).

See also:

https://stackoverflow.com/a/50268331

https://cran.r-project.org/doc/manuals/R-exts.html#Dynamic-pages

keep.source=TRUE Whether to keep the author’s formatting when displaying the code, or throw it away and use a deparsed version.

https://cran.r-project.org/doc/manuals/R-exts.html#Tidying-R-code

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions