楼主: 霉菌-
2015 2

[作业] R语言问题求助 [推广有奖]

  • 1关注
  • 1粉丝

已卖:454份资源

硕士生

78%

还不是VIP/贵宾

-

威望
0
论坛币
6392 个
通用积分
85.9002
学术水平
5 点
热心指数
9 点
信用等级
5 点
经验
3153 点
帖子
68
精华
1
在线时间
152 小时
注册时间
2019-3-7
最后登录
2025-2-26

楼主
霉菌- 发表于 2022-5-10 18:08:42 |AI写论文

+2 论坛币
k人 参与回答

经管之家送您一份

应届毕业生专属福利!

求职就业群
赵安豆老师微信:zhaoandou666

经管之家联合CDA

送您一个全额奖学金名额~ !

感谢您参与论坛问题回答

经管之家送您两个论坛币!

+2 论坛币
Issue the data(state) command to load the sample state data objects. We will work with the matrix
state.x77 which is one of the state sample data sets



a) Look up the help for state.x77.
b) Display the dimension names of the state.x77 matrix.
c) Write an expression that returns the summary statistics, as given by summary(), for each of the
columns in this matrix.
d) Create a vector named popdense that contains the population density in persons per square mile. Note
that the population in state.x77 is given in thousands.
e) Apply the pairs() function to the matrix to create scatter plots of all columns against one another.
f) When passed a matrix, the cor() function creates a correlation matrix where the value in the ith row
and the jth column is the correlation between the ith and jth columns of the original matrix. Use cor() to
create a correlation matrix named cor.state.x77.
g) The var() function is similar to the cor() function except that it creates a covariance matrix rather
than a correlation matrix. The diagonal elements are variances and the off diagonal elements are
covariances. Use the var() function to overwrite the elements on the diagonal of cor.state.x77
with variances and elements on the upper diagonal with covariances. Elements on the lower diagonal
will remain correlations.
h) Display the contents of the matrix sorted by descending Murder rates.
i) Select the states that have <1% illiteracy, but a murder rate of > 10 per 100, 000.
j) Select the states that have greater than average high school graduate rates, but less than average
annual income.


二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

关键词:R语言问题 R语言 correlations correlation Covariances

沙发
霉菌- 发表于 2022-5-24 20:52:00
研究生R语言课程作业,内含该问题答案,代码是自己写的,欢迎大家一起交流~

答案.pdf
下载链接: https://bbs.pinggu.org/a-3689407.html

56.56 KB

需要: 5 个论坛币  [购买]

藤椅
llb_321 在职认证  发表于 2022-5-26 10:23:21
自己做出来了,挺好。
作业嘛,就要自己做才行。

您需要登录后才可以回帖 登录 | 我要注册

本版微信群
加好友,备注cda
拉您进交流群
GMT+8, 2025-12-22 16:20