第一個是.Last.value,
他會等於是最新剛剛宣告的物件。
另一個是當原本在賦予值給物件時,
是不會顯示物件的值為何,
不過用引號包起來的話,
賦予值時,
也會顯示其值為何,
就不需要再打一次物件名稱來觀察其值。
就不需要再打一次物件名稱來觀察其值。
以下為範例。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##1 | |
x <- "This is x!" | |
.Last.value ##"This is x!" | |
y <- "y!" | |
.Last.value ##"y!" | |
##2 | |
(y <- "y!") ##"y!" |
沒有留言:
張貼留言