• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 12 pages
Exam (elaborations)

Adr 100 Test

Document preview thumbnail
Preview 2 out of 12 pages

Exam of 12 pages for the course nursing course at nursing course (ADR 100 TEST)

Content preview

ADR 100

TEST 1

Question 1
Which of the following lines of code would allow a user to install a package?
1. install.packages(ggplot2)
2. install.packages("ggplot2")
3. library("ggplot2")
4. library(ggplot2)

Question 2
What would the following lines of code is equivalent to the bolded line shown immediately
below?
> a <- 8
1. a>=8
2. a = 8
3. a<=8
4. a is not equel to 8

Question 3
Which sequence is necessary to use the R package crayon in your current environment, if never
previously used?
1. library("crayon") → install("crayon")
2. download("crayon") → import.crayon
3. install.packages("crayon") → library("crayon")
4. install.package("crayon") → import("crayon")

Question 4
Which of the following statement is true?
1. The data stored in a frame can only be numeric or character
2. A data frame is a table in which each column contains values of more than one variable and
each row contains only one variable
3. The name of the rows can be same
4. The column names in a data frame cannot be empty

Question 5
[To answer this question, you can use information from the unit or you may enter the code
directly into your R Console. Please don’t think you’d be cheating if you just type the code in
directly to answer the question -- in fact, we encourage it!]
A user creates a vector called stocks with the following code:

, > stocks <- c( GE , T , AAPL , VZ , MMM , JNJ )
What will the following line of code return in the console?
> length(stocks)
1. GE, T, AAPL, VZ, MMM, JNJ
2. AAPL
3. 6
4. 5

Question 6
Which of the following can be used to select one or multiple elements from a matrix?
1. Quotation marks
2. Selection function
3. Square brackets
4. Parentheses

Question 7
The iris dataset is built into the base package in R. It contains data about the petal length, petal
width, sepal length, and sepal width of 150 iris flowers of three species (setosa, versicolor, and
virginica. In RStudio, enter the following line of code into the console (type everything after the
prompt, which is represented by the greater than sign):
> dim(iris)
What is displayed in the console when you enter this command?
1. [1] 150 5
2. [1] 5 150
3. [1] 5 85
4. [1] 3 150

Question 8
The iris dataset is built into the base package in R. It contains data about the petal length, petal
width, sepal length, and sepal width of 150 iris flowers of three species (setosa, versicolor, and
virginica. Using R Studio, find the standard deviation of iris petal width, by typing
sd(iris$Petal.Width).
1. 0.7622377
2. 0.8157157
3. 0.5155109
4. 0.1856191

Question 9
You are working with a data frame called songlist. Frustratingly, you find that many of the values
in songlist simply appear as NA (Not Available).
What would happen if you were to type the following code into the console?

Document information

Uploaded on
January 16, 2024
Number of pages
12
Written in
2023/2024
Type
Exam (elaborations)
Contains
Questions & answers
$30.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
LEARNEXAMS
3.3
(15)
Sold
123
Followers
13
Items
1424
Last sold
2 weeks ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions