R Programming Quizzes
Variables & Operators
Question 1
Which of the following is the most widely-used and preferred assignment operator in R?
Question 2
Select all the valid variable names in R.
Question 3
What is the output of the R expression 10 %% 3?
Question 4
What will be the value of z after executing the following R code: x <- 5; y <- 10; z <- x > 8 || y > 8?
Question 5
In R, the operator for integer division is _____.
Question 6
Select all the operators that perform element-wise logical operations on vectors.
Question 7
What is the result of the R expression TRUE & NA?
Question 8
The %___% operator is used to check if an element is present within a vector in R.
Question 9
Select all the true statements regarding special values in R.
Question 10
Consider x <- 5 and y <- 5L. What is the result of x == y?
End of Quiz
Your final score is: 0 / 0
List of Questions
Question 1: Which of the following is the most widely-used and preferred assignment operator in R?
Answers: <-.
Question 2: Select all the valid variable names in R.
Answers: var.1, .my_var.
Question 3: What will be the value of `z` after executing the following R code: `x <- 5; y <- 10; z <- x > 8 || y > 8`?
Answers: TRUE.
Question 4: Select all the operators that perform element-wise logical operations on vectors.
Answers: &, |, !.
Question 5: What is the result of the R expression `TRUE & NA`?
Answers: NA.
Question 6: Select all the true statements regarding special values in R.
Answers: `NA` represents 'Not Available' or a missing value., `NaN` stands for 'Not a Number' and is the result of undefined mathematical operations like `0/0`..
Question 7: Consider `x <- 5` and `y <- 5L`. What is the result of `x == y`?
Answers: TRUE.