Search Header Logo

Intro to R Day 1 Quiz

Authored by John Rabanal

Computers

University

Used 2+ times

Intro to R Day 1 Quiz
AI

AI Actions

Add similar questions

Adjust reading levels

Convert to real-world scenario

Translate activity

More...

    Content View

    Student View

10 questions

Show all answers

1.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is a correct syntax to output "Hello World" in R?

'Hello World'

"Hello World"

print("Hello World")

All of the answers are correct.

2.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you insert COMMENTS in R code?

# This is a comment

// This is a comment

/* This is a comment

3.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

How do you create a variable named x with the numeric value 5?


x <- 5

x == 5

int x = 5

x : 5

4.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to create a vector of strings?

fruits <- v("banana", "apple", "orange")

fruits <- listOf("banana", "apple", "orange")

fruits <- c("banana", "apple", "orange")

fruits <- list("banana", "apple", "orange")

5.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

What is the correct way to create a list of strings?

fruits <- vectorOf("banana", "apple", "orange")

fruits <- v("banana", "apple", "orange")

fruits <- list("banana", "apple", "orange")

fruits <- c("banana", "apple", "orange")

6.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

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

add()

join()

append_item()

cbind()

7.

MULTIPLE CHOICE QUESTION

30 sec • 1 pt

Which function is used to find the amount of rows and columns in an matrix/array?

length()

dim_len()

dim()

nchar()

Access all questions and much more by creating a free account

Create resources

Host any resource

Get auto-graded reports

Google

Continue with Google

Email

Continue with Email

Classlink

Continue with Classlink

Clever

Continue with Clever

or continue with

Microsoft

Microsoft

Apple

Apple

Others

Others

Already have an account?