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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T08:58:26+00:00 2026-05-16T08:58:26+00:00

I have some R code inside a file called analyse.r. I would like to

  • 0

I have some R code inside a file called analyse.r. I would like to be able to, from the command line (CMD), run the code in that file without having to pass through the R terminal and I would also like to be able to pass parameters and use those parameters in my code, something like the following pseudocode:

C:\>(execute r script) analyse.r C:\file.txt

and this would execute the script and pass “C:\file.txt” as a parameter to the script and then it could use it to do some further processing on it.

How do I accomplish this?

  • 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-16T08:58:27+00:00Added an answer on May 16, 2026 at 8:58 am
    1. You want Rscript.exe.

    2. You can control the output from within the script — see sink() and its documentation.

    3. You can access command-arguments via commandArgs().

    4. You can control command-line arguments more finely via the getopt and optparse packages.

    5. If everything else fails, consider reading the manuals or contributed documentation

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

Sidebar

Ask A Question

Stats

  • Questions 495k
  • Answers 495k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer By using @PathVariable: @RequestMapping(value = "/article/{articleId}", method = RequestMethod.GET) public… May 16, 2026 at 11:27 am
  • Editorial Team
    Editorial Team added an answer That's because the exception never escapes the action method since… May 16, 2026 at 11:27 am
  • Editorial Team
    Editorial Team added an answer void traverse(Node* root) { queue<Node*> q; if (root) { q.push(root);… May 16, 2026 at 11:27 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Suppose I have some code like this: class Visitor { public: Visitor(callBackFunction) {} void
I would like to be able to dynamically retrieve the current executing module or
I have a file called config.yml in my /config folder of my rails application.
We have some JavaScript code that resizes <div/> elements (adjusts height/width/padding/margin etc.) based on
This scoping problem seems like the type of C++ quandary that Scott Meyers would
I have a PHP file that handles sending out confirmation emails. I also have
I have a custom UIButton with a png inside it. I have quite a
I have an ant task that contains javac task inside. It reports about error
I am using the debugger to step through my code. The code file I’m
I am trying to copy over some files pulled out from a zip folder,

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.