# R program to print# the value of an object# Creating a vector
x <- c(1,2,3,4)# Creating a list
list1 <- list(letters[1:6])# Calling the identity function
identity(x)
identity(list1)
R
输出
[1]1234[[1]][1]"a""b""c""d""e""f"
R
例2 :
# R program to print# the value of an object# Calling predefined data frame
x1 <- BOD
# Creating a matrix
mat <- matrix(c(1:9),3,3, byrow = T)# Calling the identity() Function
identity(x1)
identity(mat)
R
输出
Time demand
118.32210.33319.04416.05515.66719.8[,1][,2][,3][1,]123[2,]456[3,]789