Analyzing Car Data

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson
Download our mobile app to listen on the go
Get App

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 (D)</p> Signup and view all the answers

Which function is used to create a vector in R?

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

What does the length() function return?

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

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

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

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

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

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

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

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

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

Which of the following is an example of qualitative data?

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

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

<p>Data frame (C)</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 (B)</p> Signup and view all the answers

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

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

Which of the following is an example of continuous data?

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

What are the possible categories for binary data?

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

Which function is used to create a factor in R?

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

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

<p>rbind() (A)</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 (B)</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)] (B)</p> Signup and view all the answers

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

<p>object name (C)</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 (C)</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 (C)</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 (C)</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 (A)</p> Signup and view all the answers

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

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

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

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

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

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

Which operations can be applied to only ratio attributes?

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

Which operations may also be inapplicable for some attributes?

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

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

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

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

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

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

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

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

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

Which of the following is an example of quantitative data?

<p>Continuous 3.3 (A)</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 (A)</p> Signup and view all the answers

Which of the following is an example of binary data?

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

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

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

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

<p>read.csv (A)</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 (D)</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() (C)</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) (A)</p> Signup and view all the answers

Which function is used to create a vector in R?

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

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

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

What does the length() function return in R?

<p>The number of values in a vector (C)</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 (A)</p> Signup and view all the answers

Which function is used to create a factor in R?

<p>factor() (D)</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 (D)</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] (D)</p> Signup and view all the answers

What does the length() function return?

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

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

<p>write.table (D)</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] (A)</p> Signup and view all the answers

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

<p>Numeric (C)</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 (B)</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 (A)</p> Signup and view all the answers

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

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

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

<p>Differences (-) and addition (+) (D)</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 (D)</p> Signup and view all the answers

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

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

What does the length() function return?

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

Flashcards are hidden until you start studying

Related Documents

week02_merged.docx
Use Quizgecko on...
Browser
Browser