Data Science Using R ‘Value Added’ (Quiz 2)

                     

Data Science Using R Quiz

More on Data Science Using R : Click Here

Quiz

1. CSV files can be imported and read using:*

  1. read.table(“file.csv”)
  2. read.csv(“file.csv”)
  3. write.csv(“file.csv”)
  4. none of the above

2. ” %>% ” is called*

  1. pipe operator
  2. reference operator
  3. modulus operator
  4. dereference operator

3.  consider laptops dataset , to create a apple_laptop dataset having Manufacturer only Apple which command will be used*

  1. laptops %>% filter(Manufacturer==”Apple”)->apple_laptop
  2. laptops %>% filter(Manufacturer==”Apple”)<-apple_laptop
  3. laptops %>% select(Manufacturer==”Apple”)->apple_laptop
  4. laptop %>% filter(Category==”Apple”)->apple_laptop

4. consider the dataset in question 3. Which command will be used to select column 2 and 3.*

  1. laptops %>% select(2,3)
  2. laptops %>% filter(2,3)
  3. laptops[2,3]
  4. laptops %>% select([2,3])

5. _________ is called Grammar of Data Manipulation

  1. dplyr
  2. ggplot2
  3. purrr
  4. tibble

6. __________ is called Grammar of Graphics*

  1. dplyr
  2. ggplot2
  3. purrr
  4. tibble

Data Science Using R Quiz

7. Choose correct command to create a connection with MySQL database*

  1. dbconnect(MySQL(),user=’root’, password=’password’,dbname=’mydb’,host=’localhost’)
  2. dbConnect(MySQL(),user=’root’, password=’password’,dbname=’mydb’,host=’localhost’)
  3. dbconnect(MySQL(),user=’root, password=’password’,dbnames=’mydb’,host=’localhost’)
  4. connect(MySQL(),user=’root, password=’password’,dbname=’mydb’,host=’localhost’)

8. Package to install MySQL database is*

  1. RMySQL
  2. MySQL
  3. RMYSQL
  4. none of the above

9. scatter plot is used to*

  1. depict relationship between 2 variables
  2. represent categorical data
  3. represent distribution of quantitative data
  4. represent distribution of qualitative data

10. __________ is the geometric function in ggplot for histogram*

  1. geom_hist()
  2. geom_histogram()
  3. geom_histo()
  4. histogram()

11.  In order to retrieve  all values from a database named student ___________ command is used in R*

  1. fetch(dbSendQuery(MySQL_connection, “Select * from student”))
  2. Fetch(dbSendQuery(MySQL_connection, “Select all from Student”))
  3. fetch(dbSendQuery(MySQL_connection, “Select all from students”))
  4. dbSendQuery(MySQL_connection, “Select all from Student”)

12. Data Science is an interdisciplinary field that uses scientific methods, processes, algorithms and systems to extract knowledge and insights from*

  1. noisy data
  2. structured data
  3. unstructured data
  4. all of the above

13.  in order to write the title of a plot generated by ggplot2 package. which of the following functions is used*

  1. ggtitle()
  2. ggwrite()
  3. ggdesc()
  4. ggtext()

14. R files has an extension ______*

  1. .R
  2. .rp
  3. .c
  4. .s

15.  consider two vectors > x<-c(1,2,3,4)> y<-c(5,6,7,8) what will be the output of code z<-cbind(x,y))*

  • Option 1
  • Option 2
  • error will be generated

Link to Enroll in Data Visualization Using R Coursera: Click Here

* The material and content uploaded on this website are for general information and reference purposes only. Please do it by your own first.