Tabular Data Manipulation in R
54 Questions
0 Views

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

Which of the following is a type of qualitative attribute?

  • Discrete
  • Ratio
  • Nominal (correct)
  • Interval
  • Which of the following operations can be applied to all types of attributes?

  • Multiplication
  • Comparison (correct)
  • Division
  • Addition
  • Which of the following is a technical format for storing tabular data?

  • XML
  • MAT
  • FCS
  • CSV (correct)
  • Which of the following processes involves gathering columns into a new pair of variables?

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

    Which function is used to perform the spreading process in R?

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

    Which process involves separating one column into multiple columns based on a separator character?

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

    Which of the following is NOT a learning outcome of the CSE5DEV course?

    <p>Learn about data representation</p> Signup and view all the answers

    Which of the following is NOT a data format mentioned in the text?

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

    What are the categories of data mentioned in the text?

    <p>Experimental or observational</p> Signup and view all the answers

    What type of representation will be used in CSE5DEV labs?

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

    Which of the following data structures is NOT mentioned in the text?

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

    What is the purpose of data wrangling?

    <p>To organize data in a well-defined structure</p> Signup and view all the answers

    Which logical condition operator is used to select data based on the disp value that is equal to or less than 160 and hp less than 110?

    <p>&amp;</p> Signup and view all the answers

    Which function is used to extract data that satisfy certain criteria in R?

    <p>if statement</p> Signup and view all the answers

    Which R function is used to iterate over a vector?

    <p>for loop</p> Signup and view all the answers

    Which R function is used to repeat a block of code a specified number of times until a condition is met?

    <p>repeat loop</p> Signup and view all the answers

    Which R function is used to evaluate an expression as long as a stated condition is true?

    <p>while loop</p> Signup and view all the answers

    Which package in R is used for data wrangling and provides functions for select, filter, arrange, mutate, and summarise?

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

    Which of the following functions in R is used to show the first 6 rows of a data frame?

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

    What is the output of the following code in R?

    x <- c(3, 5, 1, 2, 7, 6, 4) x < 5

    <p>TRUE FALSE TRUE TRUE FALSE FALSE TRUE</p> Signup and view all the answers

    Which of the following logical operators in R compares vectors element by element and returns TRUE or FALSE?

    <p>., &amp;, |</p> Signup and view all the answers

    What is the output of the following code in R?

    x <- c(5, 3, 7, 9, 10) x > 5

    <p>TRUE FALSE TRUE TRUE TRUE</p> Signup and view all the answers

    Which of the following functions in R checks whether all entries of a logical vector are TRUE?

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

    What is the output of the following code in R?

    x <- c(3, 5, 1, 2, 7, 6, 4) which(x == 2)

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

    Which package needs to be installed and loaded in R to use the data wrangling functions filter(), arrange(), select(), and mutate()?

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

    What function is used to create a data frame in R?

    <p>data.frame()</p> Signup and view all the answers

    What is the purpose of the function filter() in data wrangling?

    <p>To filter rows based on specific conditions</p> Signup and view all the answers

    What is the purpose of the function arrange() in data wrangling?

    <p>To arrange the rows of a data frame</p> Signup and view all the answers

    What is the purpose of the function select() in data wrangling?

    <p>To select specific columns of a data frame</p> Signup and view all the answers

    What is the purpose of the function mutate() in data wrangling?

    <p>To create new columns in a data frame</p> Signup and view all the answers

    Which R package is required for data wrangling and provides functions for select, filter, arrange, and mutate?

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

    What is the purpose of the 'filter()' function in data wrangling?

    <p>To extract data that satisfy certain criteria</p> Signup and view all the answers

    Which function is used to create a data frame in R?

    <p>data.frame()</p> Signup and view all the answers

    What are the categories of data mentioned in the text?

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

    Which R function is used to evaluate an expression as long as a stated condition is true?

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

    Which logical condition operator is used to select data based on a specific condition in R?

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

    Which of the following is NOT a type of qualitative attribute?

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

    Which of the following operations can be applied to all types of attributes?

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

    Which R function is used to gather columns into a new pair of variables?

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

    Which R function is used to spread columns into a new pair of variables?

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

    Which R function is used to separate one column into multiple columns based on a separator character?

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

    Which of the following is NOT a technical format for storing tabular data?

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

    Which of the following functions in R is used to show the last 6 rows of a data frame?

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

    What is the output of the following code in R?

    x <- c(3, 5, 1, 2, 7, 6, 4) which(x < 5)

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

    Which of the following processes involves combining multiple columns into a single column in R?

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

    Which R function is used to check whether all entries of a logical vector are TRUE?

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

    What is the purpose of the function mutate() in data wrangling?

    <p>To create transformed or derived variables</p> Signup and view all the answers

    Which logical condition operator is used to select data based on the disp value that is equal to or less than 160 and hp less than 110?

    <p>&lt;=</p> Signup and view all the answers

    What are the two main topics covered in the CSE5DEV course?

    <p>Data representation and R programming</p> Signup and view all the answers

    What is the purpose of data wrangling?

    <p>To convert data from one format to another</p> Signup and view all the answers

    Which R function is used to import data from a text file into the R environment?

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

    Which of the following is NOT a type of data structure mentioned in the text?

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

    Which process involves separating one column into multiple columns based on a separator character?

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

    What is the purpose of the function mutate() in data wrangling?

    <p>To create new variables based on existing variables</p> Signup and view all the answers

    More Like This

    Use Quizgecko on...
    Browser
    Browser