Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

Exam Revision MATH2349 1. Consider the following string. Which command would you use to replace the `x` with blank (whitespace)? string ← c("169 millimeters x 117 millimeters x 9.1 millimeters") 2....

1 answer below »
Exam Revision MATH2349
1. Consider the following string. Which command would you use to replace the `x` with blank
(whitespace)? string ← c("169 millimeters x 117 millimeters x 9.1 millimeters")
2.
What is the result of the following R code?
3. Which one of the following is NOT one of the print functions?
4. Consider x vector. Which one of the following removes all punctuations in x? c("hello!", "good
-day.", "hi 5��"�
A chartr(string, x)
B chartr(string, "x", "~")
C chartr(string, old="x",new=" ")
D chartr(string, "x", " - ")
A TRUE
B FALSE
C "WA", "SA", "NSW"
D "TAS", "VIC"
A cat()
B print()
C noquote()
D quote()
A str_subset(x, "[:alnum:]")
B str_extract(x, "[:alnum:]")
C str_remove(x, "[:punct:]")
D str_replace_all(x, "[:punct:]", "")
E94793
Highlight
E94793
Highlight
E94793
Highlight
E94793
Highlight
5.
According to the following code, what will be the result of y?
6. Consider the following data frame. `date_col` variable is in a
factor format. What command would you use to convert it to a
date format?
7. The header of the Flights data frame is given in the
following output. Which one of the following can be
used to extract the day of the month information of the
`Flights$departure_time`?
A 7
B 1
C 2
D 5
A ymd()
B dmy()
C is.date()
D mdy()
A mday(Flights$departure_time)
B month(Flights$departure_time)
C year(Flights$departure_time)
D hour(Flights$departure_time)
E94793
Highlight
E94793
Highlight
E94793
Highlight
8. Which one of the following functions from `lu
idate` package will convert `z` into a date
format? z ← c(" XXXXXXXXXX", " XXXXXXXXXX", "23/03/2018", "30�01�2018")
9. In which one of the following are values divided by their standard deviation (or root mean
square)?
10.
According to the following code, what will be the result of `y`?
11. Which one of the following packages has a function to detect multivariate outliers?
12. Which of the following can be used to deal with outliers?
A ymd(z)
B dmy(z)
C ydm(z)
D hms(z)
A Box-Cox transformation
B logarithmic transformation
C z-score standardisation
D square root transformation
A XXXXXXXXXXNA XXXXXXXXXX
B XXXXXXXXXXNA XXXXXXXXXX
C NA NA NA NA NA
D XXXXXXXXXXNA XXXXXXXXXX
A li
ary(dplyr)
B li
ary(MVN)
C li
ary(tidyr)
D li
ary(validate)
A Capping
B Transforming
C Imputing
D All of the above
E94793
Highlight
E94793
Highlight
E94793
Highlight
E94793
Highlight
E94793
Highlight
13.
Which one of the following is the reason for the e
or given below?
14.
Consider the following data frame. What command would you use to find the total missing
values in each column?
15.
According to the following code, what will be the result of y?
A Because is.infinite() function accepts only vectorial input.
B Because there is no infinite value in the data frame
C Because data frame has missing values
D Because there is a division by zero problem in the data frame
A sum(is.na(df))
B is.na(df)
C is.nan(df)
D colSums(is.na(df))
A 4 6
B TRUE
C FALSE FALSE FALSE TRUE FALSE TRUE
D NA
E94793
Highlight
E94793
Highlight
E94793
Highlight
16. Refer to the demo slides for the relational database scenario on sales and employees data
sets. According to the given information, how would you find the names of sales people
(employees) who made a sale while dropping all the information in the sales data set?
17. Refer to the demo slides for the relational database scenario on sales and employees data
sets. According to the given information, how would you find the names of sales people who
didn't make a sale?
18. Consider the id_lookup and ratings data sets, what would
e the result of: ratings %�% left_join(id_lookup) o
left_join(ratings, id_lookup )
19. Consider the id_lookup and ratings data sets, what would
e the result of: id_lookup %�% anti_ join(ratings) o
anti_ join(id_lookup, ratings)
A anti_ join(employees, sales)
B semi_join(employees, sales)
C union(employees, sales)
D bind_cols(employees,sales)
A anti_ join(employees, sales)
B semi_join(employees, sales)
C union(employees, sales)
D bind_cols(employees,sales)
A Picture 1
B Picture 2
C Picture 3
D Picture 4
A Picture 1
B Picture 2
C Picture 3
D Picture 4
E94793
Highlight
E94793
Highlight
E94793
Highlight
E94793
Highlight
20.
Consider the following data frame. What command would you use to calculate the mean of
`Sepal.Length` grouped by `Species`?
21.
Which one of the following will order this data frame in an ascending order using col2 , col3
and col1 , respectively?
22.
The header of the flights data frame is given in the following output. Which one of the following
selects all flights in 2013?
A iris %�% group_by(Sepal.Length)
B iris %�% summarise(mean(Sepal.Length))
C iris %�% group_by(Species) %�% summarise(mean(Sepal.Length))
D iris %�% group_by(mean(Sepal.Length))
A df %�% select(col1, col2, col3�
B df %�% filter(col1, col2, col3�
C df %�% a
ange(col1, col2, col3�
D df %�% a
ange(col2, col3, col1�
A flights %�% select(day == 1�
B flights %�% filter(year == 2013�
C flights %�% filter(month == 1�
D flights %�% select(year == 2013�
E94793
Highlight
E94793
Highlight
E94793
Highlight
23.
According to the following code, what will be the class of df?
24.
What is the class of y?
25.
According to the following code, what will be the ordering of the levels for y?
A list
B vecto
C matrix
D data.frame
A numeric
B characte
C facto
D logical
A moderate < high < severe < low
B low < severe < high < moderate
C low < moderate < high < severe
D severe < high < moderate < low
E94793
Highlight
E94793
Highlight
E94793
Highlight

MATH2349 Exam Semester 1, 2020
MATH2349 Exam Semester 2, 2020
Example Exam Questions (with Answers)
MATH2349 Final Exam Information
• Exam Date & Time - TBA.
• The final exam will be an “Open-Book” online exam via Canvas.
• There will be 25 multiple-choice questions (3.6 marks each) and 1 short answer question (10
marks), 100 marks total.
• The exam will cover Modules 1 - 8.
• Weight: 15%
• Duration of exam will be 1 hours.
• Once you open the exam in Canvas the timer starts. The timer will continue to run whether you are
logged into the quiz or not.
• If you lose your internet connection, try to log back in as quickly as possible to resume the quiz.
• Canvas will automatically submit the quiz at the designated end time and the system will terminate
your access to the quiz/exam.
• Any questions that were not answered will be scored as inco
ect.
• During the exam, you are NOT allowed to share the questions/answers with your fellow classmates
using any platform (i.e. Email, Slack, text, XXXXXXXXXXYou will be in
each of exam conditions if such an
action is detected.
1
Exam Questions (Answers are given on Page 8 and 9)
Answer the following multiple choice questions on Canvas. Choose the one, best response from the alternatives
provided.
1. Which one of the following is a task in “Scan” step of Data Preprocessing?
(a) Preprocessing time and characters/strings
(b) Data scaling, centering, standardising and normalising
(c) Identify and handle outliers, missing values
(d) Importing data into R from different data sources
2. Which one of the following is the reason for the e
or given below?
cars <- read_csv("cars.csv")
# E
or in read_csv("cars.csv") : could not find function "read_csv"
(a) The “cars.csv” is not in the working directory
(b) The “cars.csv” file is co
upted
(c) The relevant package is missing
(d) No need to use quotations " "
4. Which one of the following functions stores only a single object?
I. Rdata
II. RDS
III. Rda
(a) I and II
(b) I and III
(c) Only II
(d) I, II and III
2
3. Which one of the following packages is used to export data to Excel?
(a) li
ary(readr)
(b) li
ary(xlsx)
(c) li
ary(readxl)
(d) Base R functions
5. What is the result of the following R code?
x <- 5
y <- is.finite(x > 0)
y
(a) 5
(b) TRUE
(c) FALSE
(d) 1
6. What is the class of z?
z <- c("a", "b", "c", 1, 2, 3)
class(z)
(a) logical
(b) numeric
(c) facto
(d) characte
7. The header and the structure of the city data frame are given in the following output. Which one of
the following will subset X2016.Rank and X2015.Rank from the city data frame?
head(city)
## X X2016.Rank X2015.Rank X2014.Rank City Country Index.2010
## XXXXXXXXXXVienna Austria 108.6
## XXXXXXXXXXZurich Switzerland 108.0
## XXXXXXXXXXAuckland New Zealand 107.4
## XXXXXXXXXXMunich Germany 107.0
## XXXXXXXXXXVancouver Canada 107.4
## XXXXXXXXXXDusseldorf Germany 107.2
str(city)
## 'data.frame': 51 obs. of 7 variables:
## $ X : int XXXXXXXXXX10 ...
## $ X2016.Rank: int XXXXXXXXXX10 ...
## $ X2015.Rank: int XXXXXXXXXX10 ...
## $ X2014.Rank: int XXXXXXXXXX10 ...
## $ City : Factor w/ 51 levels "Adelaide","Amsterdam",..: XXXXXXXXXX XXXXXXXXXX ...
## $ Country : Factor w/ 22 levels "Australia","Austria",..: XXXXXXXXXX5 1 ...
## $ Index.2010: num XXXXXXXXXX ...
(a) city$X2016.Rank
(b) city$X2015.Rank
(c) city[, c(2,3)]
(d) city[c(2,3), ]
3
8. The header and the structure of the city data frame are given in the following output. Which one of
the following will subset German cities from the city data frame?
head(city)
## X X2016.Rank X2015.Rank X2014.Rank City Country Index.2010
## XXXXXXXXXXVienna Austria 108.6
## XXXXXXXXXXZurich Switzerland 108.0
## XXXXXXXXXXAuckland New Zealand 107.4
## XXXXXXXXXXMunich Germany 107.0
## XXXXXXXXXXVancouver Canada 107.4
## XXXXXXXXXXDusseldorf Germany 107.2
str(city)
## 'data.frame': 51 obs. of 7 variables:
## $ X : int XXXXXXXXXX10 ...
## $ X2016.Rank: int XXXXXXXXXX10 ...
## $ X2015.Rank: int XXXXXXXXXX10 ...
## $ X2014.Rank: int XXXXXXXXXX10 ...
## $ City : chr "Vienna" "Zurich" "Auckland" "Munich" ...
## $
Answered Same Day Nov 05, 2021 MATH2349

Solution

Naveen answered on Nov 06 2021
127 Votes
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here