WorksheetsBAIG
Total questions: 11
Worksheet time: 2mins
Correct syntax to get "Hello World" in R ?
print("Hello World")
'Hello World'
All options
"Hello World"
How do you insert COMMENT in R?
/* Commenting
// Commenting
All options are correct
# Commenting
Syntax to assign the same value to multiple variables
v1, v2, v3 = 'Syntax'
v1, v2, v3 <- 'Syntax'
v1 <- v2 <- v3 <- 'Syntax'
v1 = v2 = v3 = 'Syntax'
What operator is used to compare 2 values?
=
==
<>
><
Syntax to create function
func <- function()
func <- function[]
func <- function{}
func = function()
Function to create data frame
data.frame()
dframe()
df()
dataframe()
To access one variable in dataset, (a) sign is used.
a = c(10,20,30,40,50)
b = c(1,3)
d = a + b
d
d = 111,23,33,43,51
d = 11,21,31,41,51
d = 11,23,31,43,51
d = 11,23,33,41,53
Which of these is not a data type in R ?
Vectors
Lists
Arrays
Tuples
Syntax to install a package
install.package("package_name")
install.packages("package_name")
install("package_name")
install.packages(package_name)
Correct syntax to get "Hello World" in R ?
print("Hello World")
'Hello World'
All options are correct
"Hello World"
