Batch Files - Hilary Dugan
Timeline
SubTasks
From Gleon Fellowship
    TypeM
    low
    ProgressM
    100%
    Start dateM
    19th Jan 2015
    Target dateM
    23rd Jan 2015
    OwnerM
    Participants
    Not defined!
    Expertise
    r programming
    Legend: M Mandatory | States: Not defined, Valid, Inconsistent with parent
    (Set PropertyValue: Progress = 5)
    (Set PropertyValue: Progress = 0)
    Line 24: Line 24:
     
    {{#set:
     
    {{#set:
     
    Owner=Hilary|
     
    Owner=Hilary|
    Progress=5|
    +
    Progress=0|
     
    StartDate=2015-01-19|
     
    StartDate=2015-01-19|
     
    TargetDate=2015-01-23|
     
    TargetDate=2015-01-23|
     
    Type=Low}}
     
    Type=Low}}

    Revision as of 18:54, 20 January 2015

    Skills Sharing: Batch files to graph with R

    Why should I use a batch file?

    • Any R script can be run without opening R
    • Can output figures
    • Can be automated to run daily

    Challenges:

    • Batch files run natively on Windows OS


    Example on Windows 7: Two files are needed

    1. The R script (ex. helloworld.R)
    2. The batch file should be saved as "NAME.bat". It will be a text file that contains the following code (substitute path directories where necessary).

    "C:\Program Files\R\R-2.15.2\bin\x64\R.exe" CMD BATCH "D:\user\...\helloworld.r" "D:\...\helloworld.out”



    Properties
    Credits
    Users who have contributed to this Task, its SubTasks and Answers:
    Yandex.Metrica