运行 ❯
建立您
自己的
网站
×
更改方向
更改主题,深色/浅色
前往 Spaces
x <- 1L # integer y <- 2 # numeric # convert from integer to numeric: a <- as.numeric(x) # convert from numeric to integer: b <- as.integer(y) # print values of x and y x y # print the class name of a and b class(a) class(b)
[1] 1 [1] 2 [1] "numeric" [1] "integer"