965-R-Learning-Repo/test/t-code/2720042/R1001.R
2024-11-20 17:04:40 +08:00

9 lines
696 B
R
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#请先确认datasets包已经被加载如果没有请先自行加载程序包
__________(mtcars) #填写适当函数名查看数据维度(2分)
mtcars=________(mtcars) #将所有数据进行z-score规范化(2分)
mtcars=___________(mtcars) #将mtcars转化成数据框格式 (2分)
plot(___________) #以油耗为Y轴排量为X轴其余为默认参数画散点图4分
mx=___________(mpg~hp,data=mtcars)#填写适当函数名建立线性回归函数(2分)
__________(mx)#显示回归结果(2分)
cat("回归模型中hp的系数是",_____________) #将答案数字填入划线处(3分)
cat("残差中位数是",_____________) #将答案数字填入划线处(3分)