Run R script from command line

前端 未结 7 1632
甜味超标
甜味超标 2020-11-22 09:20

I have a file, called a.r, it has a chmod of 755,

sayHello <- function(){
   print(\'hello\')
}

sayHello()

Ho

7条回答
  •  -上瘾入骨i
    2020-11-22 09:36

    How to run Rmd in command with knitr and rmarkdown by multiple commands and then Upload an HTML file to RPubs

    Here is a example: load two libraries and run a R command

    R -e 'library("rmarkdown");library("knitr");rmarkdown::render("NormalDevconJuly.Rmd")'
    
    R -e 'library("markdown");rpubsUpload("normalDev","NormalDevconJuly.html")'
    

提交回复
热议问题