本文介绍了R等价于python"_"吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Python的标识符_
可用于存储最后评估的结果使其非常适合加速数据探索和自省.
Python has an identifier _
that allows for storing the result of the last evaluation which makes it great for speeding up data exploration and introspection.
In [1]: 43 * 2
Out[1]: 86
In [2]: _ + 1
Out[2]: 87
R中是否有类似的命令?
Is there a similar command in R?
推荐答案
这是一种可键入的内容,但.Last.value:
Tis a faff to type, but .Last.value:
> sqrt(2)
[1] 1.414214
> .Last.value
[1] 1.414214
这篇关于R等价于python"_"吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!