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 8721371
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T07:12:40+00:00 2026-06-13T07:12:40+00:00

When running R in ‘batch mode’, the interactive flag is set to false, which

  • 0

When running R in ‘batch mode’, the interactive flag is set to false, which prevents any sort of user prompts that would interrupt the process in the context of an embedded/batch setting. See:

R -e 'interactive()'

Some holds when using Rscript. The flag can also manually be set by using the interactivity package. To test, we can try:

R -e 'install.packages("anything")

Assuming no CRAN mirror has been set yet, install.packages will not show some interactive mirror picker, but instead throw an error and exit.

However, I noticed that the help or ? command will still work. For example, the command below will show the help browser, and it does not continue until I press q.

R -e 'help(lm); 1+2'

However, when sending the output to a file, it does not show the interactive prompt and just dumps the complete help document in the output:

R -e 'help(lm); 1+2' > output.txt

I’m a bit confused now about what is really going on when using help. Why do you get the interactive help browser even when R is running in batch mode? Is this a feature of R, or from the Debian/Ubuntu front-end? Is there a risk of R becoming unresponsive when the help function is called inside i.e. Rserve, RInside, JRI, etc, due to R waiting for using input?

  • 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-06-13T07:12:41+00:00Added an answer on June 13, 2026 at 7:12 am

    help actually spawns a new process, pager, which is like “less”:

    > help(lm); 1+2
    [1]+  Stopped                 R -e 'help(lm); 1+2'
    $ ps
      PID TTY          TIME CMD
    27735 pts/6    00:00:00 bash
    31607 pts/6    00:00:00 R
    31615 pts/6    00:00:00 sh
    31616 pts/6    00:00:00 pager
    31617 pts/6    00:00:00 ps
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Running this code as a regular user throws HttpListenerException (access denied). Snippet runs ok
I'm running a Octopress blog which is based on Jekyll . Now I wanted
Running Solr on Tomcat 7 on Win 2008 Server. I am looping through a
Running my script through Devel::NYTProf showed that the following portion of code took up
Running Puppet v2.7.14 on CEntOs 6 and also using Apache/Passenger instead of WEBrick. I
Running the following line in my script gives me a Permission denied error: $config_out
Running this program is printing forked! 7 times. Can someone explain how forked! is
Running the following program on gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3 and Intel(R) Core(TM)2 Duo CPU,
Running SQL Server 2008 (not R2). I have a few reports that have URLs
Running rails 3.2.3 with guard/spork/rspec/factory_girl and have the following in my spec helper: Spork.prefork

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.