
Data Frame Operations in R

Quiz
•
Computers
•
6th - 10th Grade
•
Hard
Hieba Mahmod
Used 2+ times
FREE Resource
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which function combines data frames row-wise?
combine()
rbind()
addrow()
cbind()
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you rename a column?
df$1 <- 'name'
colnames(df)[1] <- 'name'
names(df)[1] <- 'name'
rename(df, 'name')
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What function do you use to bind columns from two data frames?
rbind()
cbind()
merge()
addcol()
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which code removes the second column from a data frame df?
df[, -2]
df[-2, ]
remove(df, 2)
drop(df, 2)
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you view the first few rows of a data frame in R?
top(df)
head(df)
preview(df)
df[1:5, ]
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
If df <- df[-1, ], what happens?
First row removed
First column removed
Row added
Nothing
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do you add a new column to a data frame?
new<- cbind(df, num=c(1,2,3))
add(df, 1,2,3)
merge(df)
update(df)
Create a free account and access millions of resources
Similar Resources on Wayground
10 questions
Understanding Digital Animation Concepts

Quiz
•
6th Grade - University
10 questions
Adobe Animate intro

Quiz
•
9th - 12th Grade
14 questions
Scratch Basics 2

Quiz
•
6th - 8th Grade
10 questions
Soal Visual Basic

Quiz
•
9th Grade
11 questions
VET IT - Year 10 - Video file characteristics

Quiz
•
10th Grade
10 questions
Photography Basic Techniques Quiz

Quiz
•
8th Grade
12 questions
Types of Computers - Super - Desktop

Quiz
•
9th Grade
12 questions
Share with Care Unit 1 Vocabulary

Quiz
•
6th Grade
Popular Resources on Wayground
10 questions
Video Games

Quiz
•
6th - 12th Grade
20 questions
Brand Labels

Quiz
•
5th - 12th Grade
15 questions
Core 4 of Customer Service - Student Edition

Quiz
•
6th - 8th Grade
15 questions
What is Bullying?- Bullying Lesson Series 6-12

Lesson
•
11th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
22 questions
Adding Integers

Quiz
•
6th Grade
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
Discover more resources for Computers
10 questions
Exploring Digital Citizenship Essentials

Interactive video
•
6th - 10th Grade
20 questions
typing

Quiz
•
6th Grade
18 questions
Company Logos

Quiz
•
6th - 8th Grade
10 questions
Proper Keyboarding Techniques

Interactive video
•
6th - 10th Grade
14 questions
Inputs and Outputs: Computer Science Intro

Lesson
•
5th - 9th Grade
20 questions
Input, Output, Processing or Storage

Quiz
•
5th - 6th Grade
10 questions
Understanding Computers: Hardware, Software, and Operating Systems

Interactive video
•
7th - 12th Grade
29 questions
AP CSP Unit 2 Review (Code.org)

Quiz
•
10th - 12th Grade