Why (or when) is Rscript (or littler) better than R CMD BATCH?

前端 未结 2 1741
醉酒成梦
醉酒成梦 2020-12-01 06:13

I am automating some webscraping with R in cron and sometimes I use R CMD BATCH and sometimes I use Rscript.

To

2条回答
  •  感动是毒
    2020-12-01 06:52

    From what I understand:

    R CMD BATCH:

    • echo the input statements
    • can not output to stdout

    Rscript:

    • does NOT echo
    • output to stdout
    • can be used in one-liner (i.e. with no input file)

    littler:

    • all that Rscript does
    • can read commands from stdin (useful for pipelining)
    • faster startup time
    • load the methods package

提交回复
热议问题