← 返回命令列表

Linux command

littler 命令

文本

复制后可按需替换文件名、目录或参数。

常用示例

Run R expression

r -e "print('Hello')"

Run R script

r [script.R]

Install package

r -e "install.packages('[package]')"

Pipe data to R

echo "[1,2,3]" | r -e "sum(scan())"

Run with arguments

r [script.R] [arg1] [arg2]

说明

littler (r) provides a shebang-capable scripting interface for R. It allows running R code from the command line and in scripts, making R more accessible for shell scripting and automation. littler starts faster than R --vanilla by avoiding R's full initialization.

参数

-e _expr_
Evaluate expression.
-p
Print result.
-l _package_
Load package.
-i
Interactive mode.
-n
No implicit printing.
-t
Use temporary directory.
-v
Verbose output.

FAQ

What is the littler command used for?

littler (r) provides a shebang-capable scripting interface for R. It allows running R code from the command line and in scripts, making R more accessible for shell scripting and automation. littler starts faster than R --vanilla by avoiding R's full initialization.

How do I run a basic littler example?

Run `r -e "print('Hello')"` in a terminal, then adjust file names, paths, flags, or remote targets for your system.

What does -e _expr_ do in littler?

Evaluate expression.