Skip to content

R options: options() are not passed down to futures - should they? (document either way) #134

@HenrikBengtsson

Description

@HenrikBengtsson

I'm adding this as a reminder to myself to document this (next release), but also to consider more automated solutions (a future release):

R's global options() are not passed down to futures. This has to be done manually right now, e.g.

fopts <- options()[c("digits", "repos")]
f <- future({
  options(fopts)
  [...]
})

This works, but it would be nice to have an automated version of this as well (cf. globals and packages) to better capture the state of the calling R process. Doing this might be a bit tricky since some options are read only / shouldn't be changed and others are specific the local machine, which may not work on a remote machine. Maybe it's possible to use static-code inspection to identify what options are used (similar to how globals are identified).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions