Bits For Mid1
Bits For Mid1
**QUESTIONSSTART**
1. To get the R program to install on your computer you need which link from the
website?
A. R Sources B. R Binaries C. Packages D. Other
**NEXTQUESTION**
2. The c() command can make simple data items; you separate items using the ____
character
A. Semi colon B. Punctuation mark C.Comma D.#
**NEXTQUESTION**
3. To load a CSV file of data from a disk file you can use ______________the
command
A. read.ta () B.read.table()C.read.tab() D.read.text()
**NEXTQUESTION**
**NEXTQUESTION**
5. You can use ____ keys to access and edit previously executed commands
A. Shift
B. Arrow
C. Ctrl
D. Tab
**NEXTQUESTION**
6. On Windows and Mac you can use ____ instead of a filename when reading a file
from disk.
A. file.choose()
B. fd.choose()
C. inode.choose()
D. list.choose()
**NEXTQUESTION**
7. When selecting part of a matrix or data frame you use [p, q], where p and q are
____ and ____.
A. rows, columns
B. list ,element
C. operand ,operator
D. separator, delimiter
**NEXTQUESTION**
8. You can set row and column names simultaneously for an object such as a matrix
using the ____ command.
A. dim()
B. dimen()
C. die()
D. dimnames()
**NEXTQUESTION**
9. You can check to see whether an R object is NULL with the _________ function.
A. is.null()
B. is.nullobj()
C. null()
D. All of the mentioned
**NEXTQUESTION**
**NEXTQUESTION**
12. In 2004, ________ purchased the S language from Lucent for $2 million.
a) Insightful
b) Amazon
c) IBM
d) All of the mentioned
**NEXTQUESTION**
13. R is technically much closer to the Scheme language than it is to the original _____
language.
a) B
b) C
c) C++
d) S
**NEXTQUESTION**
14. The R-help and _____ mailing lists have been highly active for over a decade now
a) R-mail
b) R-devel
c) R-dev
d) All of the mentioned
**NEXTQUESTION**
**NEXTQUESTION**
**NEXTQUESTION**
17. The _________ R system contains, among other things, the base package which is
required to run R and
a) root
b) child
c) base
d) All of the mentioned
**NEXTQUESTION**
**NEXTQUESTION**
**NEXTQUESTION**
21. If you explicitly want an integer, you need to specify the _____ suffix.
a) D
b) R
c) L
d) All of the mentioned
**NEXTQUESTION**
22. Attributes of an object (if any) can be accessed using the ______ function.
a) objects()
b) attrib()
c) attributes()
d) All of the mentioned
**NEXTQUESTION**
23. R objects can have attributes, which are like ________ for the object.
a) metadata
b) features
c) expression
d) None of the mentioned
**NEXTQUESTION**
**NEXTQUESTION**
25. If you explicitly want an integer, you need to specify the _____ suffix.
a) D
b) R
c) L
d) All of the mentioned
**NEXTQUESTION**
26. You can rotate a matrix or data frame using the ____ command
A. t()
B. s()
C. r()
D. k()
**NEXTQUESTION**
27. To enter text data from the clipboard you must add the ____ instruction to the
command.
A. what = char
B. what = character
C. what = char()
D. what = charat
**NEXTQUESTION**
28. To get additional command packages for R you can download____________ a file
A. Zip
B. Doc
C. JPG
D. PPT
**NEXTQUESTION**
30. To access the help system in R you can type which of the following commands?
A. help(topic)
B. ?topic
C. help.start()
D. Any of these commands
**NEXTQUESTION**
31. You can see the command packages that are loaded in memory using which of the
following commands?
A. ls()
B. library()
C. search()
D. dir()
E. installed.packages()
**NEXTQUESTION**
32. To load a command package and make its commands ready for use, you must use
which command?
A. library(name)
B. package(name)
C. load(name)
D. install.package(name)
**NEXTQUESTION**
33. You can enter data from the clipboard using which of the following commands?
A. c()
B. scan()
C. read.csv()
D. load()
**NEXTQUESTION**
34. To see your current working directory you must use which one of the following
commands?
A. dir()
B. setwd()
C. getwd()
D. search()
E. ls()
**NEXTQUESTION**
35. To remove a package from memory and disable its commands, you must type the
____ command.
A. detach(package:name)
B. delete(package:name)
C. drop (package:name)
D. ditach (package:name)
**NEXTQUESTION**
36. To see what command packages you have already downloaded and have available
you can type the ____ command
A. installed.packages()
B. Avail.packages()
C. list.packages()
D. panel.packages()
**NEXTQUESTION**
38. Which one of the following commands will not save objects to disk as text?
A. cat()
B. write.table()
C. save()
D. write()
E. dput()
**NEXTQUESTION**
40. Which one of the following commands is not used in rearranging data objects?
A. sort()
B. order()
C. sample()
D. rank()
**NEXTQUESTION**
41. Which one of the following commands does not allow you to access elements inside
another object (such as a data frame or list)?
A. attach()
B. search()
C. $
D. with()
42. Which one of the following commands would not help you determine if an object
was a matrix?
A. is.matrix()
B. class()
C. str()
D. summary()
**ENDOFQUESTIONS**
**SECONDUNIT**
**QUESTIONSSTART**
**NEXTQUESTION**
43. Which one of the following commands is not a summary command?
A. length()
B. mean()
C. var()
D. ls()
E. sd()
**NEXTQUESTION**
**NEXTQUESTION**
**NEXTQUESTION**
46. Which of the following statements best describes how the freq = FALSE
instruction modifies a histogram:
A. The y-axis scale is altered.
B. The area under the bars sums to 100.
C. The area under the bars sums to 1.
D. The y-axis shows density rather than frequency.
**NEXTQUESTION**
47. Which one of the following commands is not related to distribution functions?
A. pexp()
B. rexp()
C. qf()
D. exp()
E. dexp()
**NEXTQUESTION**
48. Which one of the following statements is not true with regard to the Kolmogorov-
Smirnov test?
A. The command enables you to compare two distributions.
B. The test is carried out with the kolmogorov.test()
command.
C. The command enables you to compare one distribution to a
standard distribution.
D. You can specify a standard distribution as a command or as a
named distribution.
**NEXTQUESTION**
**NEXTQUESTION**
50. Which one of the following statements is not true with regard to the Students t-
test?
A. The test is carried out via the t.test() command.
B. By default, variance is assumed unequal, so you set var.equal
= TRUE to force the assumption of equality.
C. You can carry out a matched pair test by adding paired =
TRUE as an instruction.
D. You can specify the test data as a formula of the form y ~
x.
E. You can carry out a one-sample test by specifying mean =
n, where n is the mean to test against.
**NEXTQUESTION**
51. Which one of the following types of correlation is not used by the cor()
command?
A. Pearsons product moment
B. Covariance
C. Spearmans rho
D. Kendalls tau
**NEXTQUESTION**
52. Which one of the following cor.test() commands uses the correct syntax?
A. cor.test(speed ~ dist, data = cars, method
= kendall)
B. cor.test(speed ~ dist, data = cars, type =
kendall)
C. cor.test(~ speed + dist, data = cars, type
= kendall)
D. cor.test(speed, dist, data = cars, type =
kendall)
E. cor.test(~ speed + dist, data = cars,
method = kendall)
**NEXTQUESTION**
53. Which one of the following statements concerning the chisq.test() command
is not correct?
A. Yates correction for 2 2 matrices is applied by default.
B. You can carry out a goodness of fit test.
C. You can determine the significance using a Monte Carlo
simulation.
D. The result object contains the individual chi-squared values.
**NEXTQUESTION**
54. The ________ function takes an arbitrary number of arguments and concatenates
them one by one into character strings.
a) copy()
b) paste()
c) bind()
d) None of the mentioned
**NEXTQUESTION**
**NEXTQUESTION**
56. To convert a data frame into a list object you use the ____ command
A. as.list()
B. vi.list()
C. ad.list()
D. re.list()
**NEXTQUESTION**
57. You can use the_________command to set names for elements of a list object.
A. names()
B. listnames()
C. nameadd()
D. lsnames()
**NEXTQUESTION**
**NEXTQUESTION**
59. To see what variables you have created in the current session, type
A. objects()
B. files()
C. lists()
D. vectors()
**NEXTQUESTION**