Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7637457
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T07:56:41+00:00 2026-05-31T07:56:41+00:00

In my scripts, which I am currently making into a package, a number of

  • 0

In my scripts, which I am currently making into a package, a number of "global settings" are needed. Currently, these settings are in global variables and were usually changed by editing the script directly. (The script produces entries for a database, and you need to adjust stuff like "author name" and other custom "constant" part of the entries.)

Again, currently I used const_author <- "Meow The Scientist Cat"et al. I can, of course, leave this exactly as is, and export all the global variables, so the user can set them to whatever. However, this is ugly, and pollutes the namespace.

What is the standard method in R to make such settings available to the user? Using options()? And at which point in the package should these options be loaded?

Maybe using a function like settingsTemplate(filename) which exports a file with default settings, which the user then can customize; and he has to source the file or loadSettings (filename) before using the scripts?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T07:56:42+00:00Added an answer on May 31, 2026 at 7:56 am

    You could create something similar to xcms: in zzz.R we call .setXCMSOptions (from init.R upon package loading, where xcms specific options are inserted into the generic BioC options:

    getOption("BioC")$xcms
    

    You could provide getter and setter methods for your options.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Currently all of my script's settings are located in a PHP file which I
I'm currently making my own social network and I have a php problem which
I currently have a script which allows me to output the list of files
Currently I have a bash script which runs the find command, like so: find
I am writing a script which is likely to be modified by users. Currently
I have some ksh scripts which I'd like to convert to run with bash
I have two SQL scripts which get called within a loop that accept a
I have a few IPython scripts which have redundant functionality. I would like to
I am making a web page which will allow users to input and view
I currently have quite the predicament. An if statement I have written - which

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.