假设我在R中运行一些代码.例如:
x <- 1
if (x == 0.1){
print('X = 0.1')
} else if (x > 0.1){
print('X is bigger than 0.1 ')
} else {
print('X is smaller than 0.1')
}
Run Code Online (Sandbox Code Playgroud)
如果我查看R studio中的历史文件,它会告诉我运行此条件语句但它不会显示结果(即X大于0.1).
有没有办法在R或R studio中自动记录输出?