Hello
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 |
|
|
/full/path/to/station/files/ |
Directory where individual station files are kept. An example can be found in sample_data/XXXX |
/full/path/to/metadata.txt |
Text file that contains information about each station file to process. |
base_period_begin |
Beginning year for the base period. To be used on all stations. |
base_period_end |
Ending year for the base period. To be used on all stations. |
cores_to_use |
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 how to run my script in R to get results. Please help me