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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T21:24:47+00:00 2026-06-03T21:24:47+00:00

I am layman to unix and sofar I using R in windows. For example

  • 0

I am layman to unix and sofar I using R in windows. For example I type following in my R session (in R gui).

# this is a my funny example script 
X <- 1:10
Y <- 21:30
plot(X, Y)
myfun <- function (x){
              x1 <- x^0.2
              return (x1)
             }
myfun(X)

How can I achieve this in unix shell, in two situations –

(1) directly in command line via an interpeter
(2) creating a script and running script.

Please provide step considering I am layman to unix.

  • 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-03T21:24:49+00:00Added an answer on June 3, 2026 at 9:24 pm

    Assuming you save your script in a simple text file with the name so.R, you can run it under Linux/Unix by typing R at the prompt. Once in R enter

      source('so.R')
    

    to execute the script inside the R environment (this assumes the so.R file is in the same directory as you are when you issue this command).

    To run the script from the Linux/Unix command line use the following command:

      R CMD BATCH so.R
    

    Note that I got the plot to show when I ran the script inside of R, but from the Linux command line it doesn’t show. I suspect it gets quickly displayed and then goes away, so there will be a R command that you have to look up to make it pause after it displays the plot.

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

Sidebar

Related Questions

Well this is a layman's attempt on blurring an image, i am not using
Could someone explain in layman terms what this actually does? XmlTextReader textReader = new
What is the difference between the following concepts in layman terms: spinning lock, blocking
What is Unobtrusive Javascript in layman terms? An example would be nice to aid
I'm new to C#, and thus am looking for layman's terms regarding this. Essentially,
Can some one explain to me in layman's terms what the following sentences, from
Can anyone please tell me in layman terms what is meaning of following code
What would this statement do: ServerSocket ss=new ServerSocket(4646); Please explain in layman terms.
i've been doing some research on interfaces and a simple layman's explanation for what
Is there a layman document out there describing what are the differences in rendering

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.