系列笔记-USYD悉尼大学Data1001 RQuiz1——RQuiz6 做法讲解

Rquiz1—Rquiz6

学期一共12个Rquiz(算final成绩)和12个Lquiz(不算final成绩),和final挂钩的考试一定要认真对待。这些quiz都是送分题,希望这篇博客能助你一臂之力。


前言

创作不易,拒绝抄袭,可以引用,标明出处。
小编会尽力去完善每一个知识点,如果有错误,漏掉的内容欢迎留言私信补充。


RQuiz 1

Question 1

To calculate log(4), which would work in R code?

  • > log(4)
  • > In(4)
  • >Ine(4)
  • LOG(4)

讲解: 把这四个选项每个放在rstudio里运行一下,只有log(4)能运行出结果。

Question 2

Which code is correct?

  • getwd()
  • setwd(x=c(1,2,3))
  • help[getwd]
  • setwd(’…’)

讲解: 放在Rstudio里运行,R语言的语法,其余都有不同的程序错误。

Question 3

What is the answer to the following R code?
x=c(1,2,3,4,5)
sum(x) + sort(x)[2]

  • 17
  • 16
  • 15
  • 14

讲解: 放在rstudio里运行

x=c(1,2,3,4,5)
sum(x)+sort(x)[2]
#outpot:17

Question 4

x=c(-1,2,3,-4,5)
Which commands sorts the data?

  • sort(x)
  • Sort(x)
  • SORT(x)
  • sort(x)

讲解: 放在Rstudio里运行一下,只有sort(x)没有出错。
在这里插入图片描述

Question 5

“Simpson’s Paradox occurs when relationships between percentages in subgroups are the same, when the subgroups are combined, because of a confounding or lurking variable”.

  • True
  • False

讲解: 理论题。
题目翻译:当子组中的百分比之间的关系相同时,或者由于混淆或潜伏变量而将子组合并时,就会发生“辛普森悖论”。


RQuiz 2

Question 1

In the sleep dataset, how many levels does the group variable have?

  • 4
  • 2
  • 6
  • 8

讲解: 问在sleep数据集中,group变量有多少个级别?答案是两个。

Question 2

What is the length of the depth variable in quakes?

  • 10
  • 100
  • 1000
  • 10000

讲解: 问地震中深度变量的长度是多少?

Question 3

Which command would isolate a variable in the sleep dataset?

  • sleep$extras
  • sleep$age
  • sleep$time
  • sleep$group

解释: 问哪个命令将隔离睡眠数据集中的变量?

Question 4

What is the result of the following code?

dim(mtcars^2)
  • 1024 121
  • 32 11
  • NULL
  • 123904

讲解: 带入Rstudio里运行。

Question 5

In the Australian road fatality dataset (L4), what type of variable is BusInvolvement?

  • Quantitative - continuou
  • Quantitative - discrete
  • Qualitative - binary
  • Qualitative - ordinal

讲解: 在澳大利亚道路死亡数据集(L4)中,涉及公共汽车的变量类型是什么?


总结

更新中ing

  • 3
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值