Skip to content

Use library path of a fresh R session #255

@renkun-ken

Description

@renkun-ken

In the documentation of r_session, the description libpath argument says

libpath: Library path for the subprocess. By default the same as the current library path. I.e. not necessarily the library path of a fresh R session.)

I wonder if it is possible to keep the library path of a fresh R session instead of propagating from the main session?

My motivation is that I need to start an R session from a specific working directory so that the folder .Rprofile is respected (e.g. renv projects or any other startup customization) so that I can call session$run() with the proper R libpath setup specific to that directory. In this use case, it is best that the spawned R session should behave exactly the same as if the session is a fresh session started from the specific working directory.

Metadata

Metadata

Assignees

No one assigned

    Labels

    featurea feature request or enhancement

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions