Analyzing Car Data
60 Questions
0 Views

Analyzing Car Data

Created by
@GenerousChrysoprase

Questions and Answers

Which function is used to read data from a text file in R?

  • read.table (correct)
  • read.xlsx
  • read.json
  • read.csv
  • What is the default value for the header argument in the read.csv function?

  • FALSE
  • NA
  • TRUE (correct)
  • NULL
  • Which function is used to view the first 6 rows of a data frame in R?

  • tail()
  • head() (correct)
  • names()
  • dim()
  • What does the dim() function in R return?

    <p>Both number of rows and number of columns</p> Signup and view all the answers

    Which function is used to create a vector in R?

    <p>c()</p> Signup and view all the answers

    What does the length() function return?

    <p>The number of values in a vector</p> Signup and view all the answers

    How do you access items in a matrix using index numbers?

    <p>Using [] brackets</p> Signup and view all the answers

    Which function is used to add columns to a matrix in R?

    <p>cbind()</p> Signup and view all the answers

    Which function can be used to export data as a text file in R?

    <p>write.table</p> Signup and view all the answers

    What is the most convenient and standard representation for data analysis in R?

    <p>Tabular representation</p> Signup and view all the answers

    Which of the following is an example of qualitative data?

    <p>The grades of students</p> Signup and view all the answers

    Which data structure is commonly used in R for organizing tabular data?

    <p>Data frame</p> Signup and view all the answers

    What is the difference between ordinal and nominal data?

    <p>Ordinal data can be ordered, while nominal data cannot be ordered</p> Signup and view all the answers

    What types of features/attributes are important to recognize in tabular data?

    <p>Qualitative vs. quantitative</p> Signup and view all the answers

    Which of the following is an example of continuous data?

    <p>The average mark of a student</p> Signup and view all the answers

    What are the possible categories for binary data?

    <p>1, 0</p> Signup and view all the answers

    Which function is used to create a factor in R?

    <p>factor()</p> Signup and view all the answers

    Which function is used to access items in a data frame column in R?

    <p>rbind()</p> Signup and view all the answers

    What is the purpose of the summary() function in R?

    <p>To summarise the data in a data frame</p> Signup and view all the answers

    What is the correct way to remove the first row and column from a data frame in R?

    <p>data_frame[-c(1), -c(1)]</p> Signup and view all the answers

    Which of the following is a valid object name in R?

    <p>object name</p> Signup and view all the answers

    What is the data type of the object 'x' after executing the code 'x <- 5.5' in R?

    <p>numeric</p> Signup and view all the answers

    Which R data structure is used to store a list of items of the same type?

    <p>Vectors</p> Signup and view all the answers

    What does the function 'str(dat)' do in R?

    <p>Displays the structure of data, type, and data in each column</p> Signup and view all the answers

    Which type of attribute can be split further into two types: symmetric or asymmetric based on whether or not their values are equally informative?

    <p>Binary attributes</p> Signup and view all the answers

    Which type of attribute can be split into two types: interval and ratio?

    <p>Quantitative attributes</p> Signup and view all the answers

    Which type of attribute can be split into discrete and continuous ones?

    <p>Quantitative attributes</p> Signup and view all the answers

    Which operations can be applied to every type of attribute except nominal?

    <p>Comparison (= and 6=)</p> Signup and view all the answers

    Which operations can be applied to only ratio attributes?

    <p>Division (/) and multiplication (x,.)</p> Signup and view all the answers

    Which operations may also be inapplicable for some attributes?

    <p>Differences (-) and addition (+)</p> Signup and view all the answers

    Which function is used to check the data type of an object in R?

    <p>typeof()</p> Signup and view all the answers

    What is the data type of the object 'hp' in the given data frame?

    <p>integer</p> Signup and view all the answers

    Which R data structure is commonly used for organizing tabular data?

    <p>Data Frames</p> Signup and view all the answers

    What is the purpose of the summary() function in R?

    <p>To provide summary statistics</p> Signup and view all the answers

    Which of the following is an example of quantitative data?

    <p>Continuous 3.3</p> Signup and view all the answers

    What is the difference between ordinal and nominal data?

    <p>Ordinal data can be meaningfully ordered, while nominal data doesn't have any order</p> Signup and view all the answers

    Which of the following is an example of binary data?

    <p>Binary value (1, 0)</p> Signup and view all the answers

    Which type of attribute can be split into two types: interval and ratio?

    <p>Numeric</p> Signup and view all the answers

    Which function is used to import data from a CSV file in R?

    <p>read.csv</p> Signup and view all the answers

    What is the purpose of the names() function in R?

    <p>To show the names of the columns in a data frame</p> Signup and view all the answers

    Which function is used to check the class of each column in a data frame in R?

    <p>sapply()</p> Signup and view all the answers

    What does the dim() function in R return?

    <p>The dimensions of a data frame (number of rows and number of columns)</p> Signup and view all the answers

    Which function is used to create a vector in R?

    <p>rep()</p> Signup and view all the answers

    Which function is used to access items in a data frame column in R?

    <p>[]</p> Signup and view all the answers

    What does the length() function return in R?

    <p>The number of values in a vector</p> Signup and view all the answers

    What does the dim() function in R return?

    <p>The number of rows and columns in a matrix</p> Signup and view all the answers

    Which function is used to create a factor in R?

    <p>factor()</p> Signup and view all the answers

    What does the dim() function in R return?

    <p>The number of rows and columns in a data frame</p> Signup and view all the answers

    What is the correct way to remove the first row and column from a data frame in R?

    <p>data_frame[-1, -1]</p> Signup and view all the answers

    What does the length() function return?

    <p>The number of items in a vector</p> Signup and view all the answers

    Which function is used to export data as a text file in R?

    <p>write.table</p> Signup and view all the answers

    What is the correct way to remove the first row and column from a data frame in R?

    <p>df &lt;- df[-1, -1]</p> Signup and view all the answers

    What type of attribute can be split into two types: interval and ratio?

    <p>Numeric</p> Signup and view all the answers

    What is the purpose of the summary() function in R?

    <p>To calculate summary statistics of a data frame</p> Signup and view all the answers

    Which type of attribute can be split further into two types: symmetric or asymmetric based on whether or not their values are equally informative?

    <p>Binary attributes</p> Signup and view all the answers

    Which type of attribute can be split into two types: interval and ratio?

    <p>Quantitative attributes</p> Signup and view all the answers

    Which operations can be applied to every type of attribute except nominal?

    <p>Differences (-) and addition (+)</p> Signup and view all the answers

    What is the purpose of the summary() function in R?

    <p>To create a summary statistics table for a data frame</p> Signup and view all the answers

    Which function is used to read data from a text file in R?

    <p>read.csv()</p> Signup and view all the answers

    What does the length() function return?

    <p>The number of elements in a vector</p> Signup and view all the answers

    More Quizzes Like This

    Use Quizgecko on...
    Browser
    Browser