z/OS Tools & Language

Expand all | Collapse all

Rscript line command

  • 1.  Rscript line command

    Posted 07-31-2018 20:07

    I am a new user of R and I am stuck. I want to execute a Rscript that will allow me to compute some indices for many stations once. Here is what the manual says to do:

    "5.2 Calculating the indices on multiple station files
    The script that provides this functionality is climpact2.batch.stations.r. This script requires command line arguments to be passed to it at run time. Execution of this script takes the following form, from the Linux command line:
    Rscript climpact2.batch.stations.r /full/path/to/station/files/ /full/path/to/metadata.txt base_period_begin base_period_end cores_to_use
    The 5 command line arguments above are defined in the following table.
    Table 2. Command line arguments to pass to climpact2.batch.stations.r

    Directory where individual station files are kept. An example can be found in sample_data/XXXX
    Text file that contains information about each station file to process.
    Beginning year for the base period. To be used on all stations.
    Ending year for the base period. To be used on all stations.
    Number of processor cores to use. When processing hundreds or thousands of files, this is useful.

    An example of executing the climpact2.batch.stations.r file would be:
    Rscript climpact2.batch.stations.r ./sample_data/Renovados_hasta_2010 ./sample_data/climpact2.sample.batch.metadata.txt 1971 2000 4

    I don’t know anything about the Rscript and I tried to enter the full path Rscript climpact2.batch.stations.r ./ C:/Users/ouedr/OneDrive/Documents/climpact2-master/sample_data// C:/Users/ouedr/OneDrive/Documents/climpact2-master/sample_data/ climpact2.sample.batch.metadata.txt 1985 2014 4 but I get error. Can someone help me with a tutorial of how to do this specific task? to get results. Please help me. If you need the R file or other you can tell me
    Thank you! Capture1|690x285

  • 2.  RE: Rscript line command

    Posted 08-14-2018 06:58


    Do you run your script on Windows? Rocket Team has ported R for z/OS and on this forum (Open Source Languages and Tools for z/OS) we provide support only for z/OS users.