wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

Santhosh kumar G

Total questions: 25

Worksheet time: 14mins

Name
Class
Date
1.

Which is the less common assignment operator by programmers

a)

Simple Assignment

b)

Leftward Assignment

c)

Rightward Assignment

2.

R programming language is widely used for

a)

Statistical computing

b)

Data analysis

c)

Visualization

d)

All the above

e)

Both a and b

3.

In R programming comment line starts with a

a)

/*

b)

#

c)

*/

d)

None of the above

4.

Number of Operator in R programming

a)

4

b)

6

c)

5

d)

None of the above

5.

How can you combine multiple data frames in R?

a)

merge()

b)

cbind()

c)

rbind()

d)

All of the above

6.

What is the default separator used in the read.csv() function?

a)

space

b)
  • comma

c)

semicolon

d)

colon

7.

To check the bytes of the object

a)
  • class()

b)

type()

c)

check()

d)

typeof()

8.

Which function is used to merge two data frames by a common column in R?

a)

merge()

b)

join()

c)

bind()

d)

both a and c

9.

which function is not used to create a factor in R?

a)

create.factor()

b)

factor()

c)
  • as.factor()

d)

Both b and c

10.

How do you create a scatter plot in R?

a)

plot()

b)

scatter()

c)

plot.scatter()

d)

Both a and c

11.

What function is not used to apply a function to each element of a list in R?

a)

apply()

b)

lapply()

c)

sapply()

d)

Both b and c

12.

How do you create an empty list in R?

a)

list()

b)

[]

c)

null()

d)

empty_list()

13.

How do you check for missing values in a vector v in R?

a)
d)

is_missing(v)

14.

Which function is used to get the row names of a data frame in R?

a)
  • rownames()

b)

get.names()

c)

names()

d)

Both a and c

15.

Which of the following functions is used to calculate the quantile in R?

a)
  • quantile()

b)

pct()

c)

quant()

d)

percentile()

16.

What does the table() function return in R?

a)

A frequency table

b)

A data frame

c)

A summary of data

d)

A vector of sorted values

17.

How can you check the type of an object in R?

a)
  • typeof()

b)

class()

c)

type()

d)

All of the above

18.

Which function is used to calculate the standard deviation in R?

a)
  • sd()

b)

stdev()

c)

stddev()

d)

var()

19.

Syntax for rightward operator

(a)  

20.

Which of the following is the correct syntax to create a vector in R?

a)

v <- c(1, 2, 3)

b)
  • v <- vector(1, 2, 3)

c)

v = [1, 2, 3]

d)

both a and c

21.

In R, you must declare the data type of a variable

a)

true

b)

false

22.

Which operator can be used to compare two values?

a)

==  

b)

=

c)

<>

d)

><

23.

How do you start writing an if statement in R?

a)

if (x > y) 

b)

if x > y:

c)

if x > y then:

24.

Which statement is used to stop a loop?

a)

break

b)

stop

c)

exit

d)

return

25.

The following values: 10.5, 55 and 787, belongs to which data type?

(a)