实例 R 语言 创建数字数据类型

x
 
x <- 10.5
y <- 55
# Print values of x and y
x
y
# Print the class name of x and y
class(x)
class(y)
                    

输出结果

[1] 10.5
[1] 55
[1] "numeric"
[1] "numeric"