Run Batch File from R
The help page ?shell
says how to do it. Just run
shell("MyScript.bat", wait=FALSE)
Executing a batch file in an R script
Try shell.exec("\\\\network\\path\\file.bat")
The shell.exec
command uses the Windows-associated application to open the file. Note the double back-ticks.
Pro tip: write.csv(file='tmp.csv',tmpdat);shell.exec('tmp.csv')
is useful (assuming you've associated CSV files with your preferred application for viewing CSV files) for quickly checking output.
Related Topics
Change Size of Axes Title and Labels in Ggplot2
How to Play Birthday Music Using R
Shift Legend into Empty Facets of a Faceted Plot in Ggplot2
Convert a Row of a Data Frame to Vector
Get the Path of Current Script
R Creating a Sequence Table from Two Columns
Combining Pivoted Rows in R by Common Value
How to Find Index of Match Between Two Set of Data Frame
Display Y-Axis for Each Subplot When Faceting
Get All the Rows with Rownames Starting with Abc111
Subtracting Values Group-Wise by the Average of Each Group in R
Shiny Dynamic Filter Variable Selection and Display of Variable Values for Selection
How to Extract All the Rows If a Level in One Column Contains All the Levels of Another Column in R
Selection of Activity Trace in a Chart and Display in a Data Table in R Shiny