Data Frame Operations in R

Data Frame Operations in R

6th - 10th Grade

10 Qs

quiz-placeholder

Similar activities

Module 9-Address Resolution Protocol

Module 9-Address Resolution Protocol

9th Grade - Professional Development

10 Qs

Power BI Series 3 Data Preparation

Power BI Series 3 Data Preparation

1st - 10th Grade

10 Qs

Arrays & Data frames

Arrays & Data frames

9th Grade

10 Qs

Microsoft Word 2016 Tables

Microsoft Word 2016 Tables

8th - 12th Grade

13 Qs

ICT Spreadsheets

ICT Spreadsheets

9th Grade

12 Qs

HTML Tables

HTML Tables

9th - 12th Grade

10 Qs

Network Fundamentals-Physical layer

Network Fundamentals-Physical layer

9th Grade - Professional Development

14 Qs

ICT 4 - Q4 - Review Quiz

ICT 4 - Q4 - Review Quiz

4th Grade - University

15 Qs

Data Frame Operations in R

Data Frame Operations in R

Assessment

Quiz

Computers

6th - 10th Grade

Hard

Created by

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

Create resources
Host any resource
Get auto-graded reports
or continue with
Microsoft
Apple
Others
By signing up, you agree to our Terms of Service & Privacy Policy
Already have an account?