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 »
Need to perform on R programming and its a data wrangling online test, however, expert must have intensive experience on R, Moreover, theone attemptallowed and timedwill be1 hour. Also it will be 10-15 Question some of would be MCQ and some needs to be write a code. Therefore, the test will start sharp 9:00 o clock morning and will close at 10:00


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 `lubridate` package will convert `z` into a date format? z ← c("08.06.2018", "29062018", "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 1.00 1.00 NA 1.00 1.00 B 1.00 0.67 NA 0.00 1.00 C NA NA NA NA NA D 0.00 0.00 NA 1.00 1.00 A library(dplyr) B library(MVN) C library(tidyr) D library(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 error 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 be the result of: ratings %�% left_join(id_lookup) or left_join(ratings, id_lookup ) 19. Consider the id_lookup and ratings data sets, what would be the result of: id_lookup %�% anti_ join(ratings) or 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 %�% arrange(col1, col2, col3� D df %�% arrange(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 vector C matrix D data.frame A numeric B character C factor 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="" incorrect.="" •="" during="" the="" exam,="" you="" are="" not="" allowed="" to="" share="" the="" questions/answers="" with="" your="" fellow="" classmates="" using="" any="" platform="" (i.e.="" email,="" slack,="" text,="" .="" .="" .="" ).="" you="" will="" be="" in="" breach="" 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="" error="" given="" below?="" cars=""><- read_csv("cars.csv")="" #="" error="" 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="" corrupted="" (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)="" library(readr)="" (b)="" library(xlsx)="" (c)="" library(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) factor (d) character 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 ## 1 1 1 1 1 vienna austria 108.6 ## 2 2 2 2 2 zurich switzerland 108.0 ## 3 3 3 3 3 auckland new zealand 107.4 ## 4 4 4 4 4 munich germany 107.0 ## 5 5 5 5 5 vancouver canada 107.4 ## 6 6 6 6 6 dusseldorf germany 107.2 str(city) ## 'data.frame': 51 obs. of 7 variables: ## $ x : int 1 2 3 4 5 6 7 8 9 10 ... ## $ x2016.rank: int 1 2 3 4 5 6 7 8 9 10 ... ## $ x2015.rank: int 1 2 3 4 5 6 7 8 9 10 ... ## $ x2014.rank: int 1 2 3 4 5 6 7 8 9 10 ... ## $ city : factor w/ 51 levels "adelaide","amsterdam",..: 47 51 3 31 46 15 17 18 13 43 ... ## $ country : factor w/ 22 levels "australia","austria",..: 2 20 14 8 4 8 8 20 5 1 ... ## $ index.2010: num 109 108 107 107 107 ... (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 ## 1 1 1 1 1 vienna austria 108.6 ## 2 2 2 2 2 zurich switzerland 108.0 ## 3 3 3 3 3 auckland new zealand 107.4 ## 4 4 4 4 4 munich germany 107.0 ## 5 5 5 5 5 vancouver canada 107.4 ## 6 6 6 6 6 dusseldorf germany 107.2 str(city) ## 'data.frame': 51 obs. of 7 variables: ## $ x : int 1 2 3 4 5 6 7 8 9 10 ... ## $ x2016.rank: int 1 2 3 4 5 6 7 8 9 10 ... ## $ x2015.rank: int 1 2 3 4 5 6 7 8 9 10 ... ## $ x2014.rank: int 1 2 3 4 5 6 7 8 9 10 ... ## $ city : chr "vienna" "zurich" "auckland" "munich" ... ## $ c("a",="" "b",="" "c",="" 1,="" 2,="" 3)="" class(z)="" (a)="" logical="" (b)="" numeric="" (c)="" factor="" (d)="" character="" 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="" ##="" 1="" 1="" 1="" 1="" 1="" vienna="" austria="" 108.6="" ##="" 2="" 2="" 2="" 2="" 2="" zurich="" switzerland="" 108.0="" ##="" 3="" 3="" 3="" 3="" 3="" auckland="" new="" zealand="" 107.4="" ##="" 4="" 4="" 4="" 4="" 4="" munich="" germany="" 107.0="" ##="" 5="" 5="" 5="" 5="" 5="" vancouver="" canada="" 107.4="" ##="" 6="" 6="" 6="" 6="" 6="" dusseldorf="" germany="" 107.2="" str(city)="" ##="" 'data.frame':="" 51="" obs.="" of="" 7="" variables:="" ##="" $="" x="" :="" int="" 1="" 2="" 3="" 4="" 5="" 6="" 7="" 8="" 9="" 10="" ...="" ##="" $="" x2016.rank:="" int="" 1="" 2="" 3="" 4="" 5="" 6="" 7="" 8="" 9="" 10="" ...="" ##="" $="" x2015.rank:="" int="" 1="" 2="" 3="" 4="" 5="" 6="" 7="" 8="" 9="" 10="" ...="" ##="" $="" x2014.rank:="" int="" 1="" 2="" 3="" 4="" 5="" 6="" 7="" 8="" 9="" 10="" ...="" ##="" $="" city="" :="" factor="" w/="" 51="" levels="" "adelaide","amsterdam",..:="" 47="" 51="" 3="" 31="" 46="" 15="" 17="" 18="" 13="" 43="" ...="" ##="" $="" country="" :="" factor="" w/="" 22="" levels="" "australia","austria",..:="" 2="" 20="" 14="" 8="" 4="" 8="" 8="" 20="" 5="" 1="" ...="" ##="" $="" index.2010:="" num="" 109="" 108="" 107="" 107="" 107="" ...="" (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="" ##="" 1="" 1="" 1="" 1="" 1="" vienna="" austria="" 108.6="" ##="" 2="" 2="" 2="" 2="" 2="" zurich="" switzerland="" 108.0="" ##="" 3="" 3="" 3="" 3="" 3="" auckland="" new="" zealand="" 107.4="" ##="" 4="" 4="" 4="" 4="" 4="" munich="" germany="" 107.0="" ##="" 5="" 5="" 5="" 5="" 5="" vancouver="" canada="" 107.4="" ##="" 6="" 6="" 6="" 6="" 6="" dusseldorf="" germany="" 107.2="" str(city)="" ##="" 'data.frame':="" 51="" obs.="" of="" 7="" variables:="" ##="" $="" x="" :="" int="" 1="" 2="" 3="" 4="" 5="" 6="" 7="" 8="" 9="" 10="" ...="" ##="" $="" x2016.rank:="" int="" 1="" 2="" 3="" 4="" 5="" 6="" 7="" 8="" 9="" 10="" ...="" ##="" $="" x2015.rank:="" int="" 1="" 2="" 3="" 4="" 5="" 6="" 7="" 8="" 9="" 10="" ...="" ##="" $="" x2014.rank:="" int="" 1="" 2="" 3="" 4="" 5="" 6="" 7="" 8="" 9="" 10="" ...="" ##="" $="" city="" :="" chr="" "vienna"="" "zurich"="" "auckland"="" "munich"="" ...="" ##="">
Answered Same DayNov 05, 2021MATH2349

Answer To: Exam Revision MATH2349 1. Consider the following string. Which command would you use to replace the...

Naveen answered on Nov 06 2021
139 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