“R”中是否有“最后一个命令输出”的表达式? [重复]

时间:2022-12-20 20:13:05

This question already has an answer here:

这个问题在这里已有答案:

In Mathematica, the output of the last expression can be accessed using the symbol %. In particular, one can do the following in Mathematica:

在Mathematica中,可以使用符号%访问最后一个表达式的输出。特别是,可以在Mathematica中执行以下操作:

1+2
% / 3

This will return the output 1, because the output of the first expression is 3, and 3/3 = 1.

这将返回输出1,因为第一个表达式的输出是3,而3/3 = 1。

Is there an equivalent functionality in R?

R中是否有相同的功能?

1 个解决方案

#1


18  

Here you go. Try ? .Last.value to learn more

干得好。试试? .Last.value了解更多信息

1 + 2
.Last.value /3

#1


18  

Here you go. Try ? .Last.value to learn more

干得好。试试? .Last.value了解更多信息

1 + 2
.Last.value /3