开发者

R equivalent of python "_"?

开发者 https://www.devze.com 2023-02-10 13:45 出处:网络
Python has an identifier _ that allows for storing the result of the last evaluation which make开发者_JS百科s it great for speeding up data exploration and introspection.

Python has an identifier _ that allows for storing the result of the last evaluation which make开发者_JS百科s it great for speeding up data exploration and introspection.

In [1]: 43 * 2
Out[1]: 86

In [2]: _ + 1
Out[2]: 87

Is there a similar command in R?


Tis a faff to type, but .Last.value:

> sqrt(2)
[1] 1.414214
> .Last.value
[1] 1.414214
0

精彩评论

暂无评论...
验证码 换一张
取 消