Exam Revision MATH XXXXXXXXXXConsider 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....

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:]", "") 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) 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", "30012018") 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 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 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 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 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 <><><><><><><><><><><>

May 18, 2022
SOLUTION.PDF

Get Answer To This Question

Submit New Assignment

Copy and Paste Your Assignment Here