R语言 cor()函数返回的结果Population、Income、Illiteracy LifeExp、Murder 、HSGrad分别是什么意思?

Python014

R语言 cor()函数返回的结果Population、Income、Illiteracy LifeExp、Murder 、HSGrad分别是什么意思?,第1张

R语言 cov(a)函数返回的结果Population、Income、Illiteracy、LifeExp、Murder 、HSGrad分别是数据集“a"里的变量名称啊,要知道是什么意思,你需要去查看数据说明。

r语言 function 指定多个返回值

# Goals: To write functions

#To write functions that send back multiple objects.

# FIRST LEARN ABOUT LISTS --

X = list(height=5.4, weight=54)

print("Use default printing --")

print(X)

print("Accessing individual elements --")

cat("Your height is ", X$height, " and your weight is ", X$weight, "\n")

# FUNCTIONS --

square <- function(x) {

R自己默认的有效数字到小数点第15位,超过15就四舍五入了。

你可以自己验证以下逻辑语句。

>0.9999999999999999==1

[1] FALSE

>0.99999999999999999==1

[1] TRUE

>0.99999999999999995==1

[1] TRUE

>0.99999999999999994==1

[1] FALSE

如果是第一个0.9999999999999999,x向量自然没有不是整数的坐标,所以返回值是numeric (0)