Online Exam Quiz

questionQuestion  1 to 30

What is the output of floor(3.8) in R?

  • 3
  • 4
  • 3.5
  • 4.5
Mark for review

Which function is used to calculate the absolute value in R?

  • abs()
  • absolute()
  • value.abs()
  • abs.value()
Mark for review

What does the rev() function do in R?

  • Reverses the order of elements in a vector
  • Removes duplicate elements from a vector
  • Reshapes a vector
  • Computes the reciprocal of elements in a vector
Mark for review

What does the mean() function in R do?

  • Calculates the median
  • Calculates the mode
  • Calculates the arithmetic mean
  • Calculates the standard deviation
Mark for review

Which function is used to calculate the correlation coefficient in R?

  • cor()
  • correlation()
  • cor.coefficient()
  • correlation.coefficient()
Mark for review

How can you comment out a line in R?

  • //
  • --
  • #
  • /*
Mark for review

Which package is used for creating plots and graphs in R?

  • plyr
  • ggplot2
  • reshape2
  • dplyr
Mark for review

What does the acronym 'CRAN' stand for in the context of R programming?

  • Comprehensive R Archive Network
  • Central Repository for Advanced Numerics
  • Core R Application Network
  • Combined Repository of Advanced Numerical tools
Mark for review

Which function is used to create a sequence of numbers in R?

  • sequence()
  • seq()
  • create()
  • range()
Mark for review

Which function is used to convert a matrix to a data frame in R?

  • as.data.frame()
  • to.data.frame()
  • convert.data.frame()
  • matrix.to.data.frame()
Mark for review

What is the output of mean(c(1, 2, NA, 4, 5), na.rm = TRUE) in R?

  • NA
  • 3
  • 3.33
  • 3.5
Mark for review

What does the sum() function do in R?

  • Calculates the sum of elements in a vector
  • Calculates the product of elements in a vector
  • Calculates the mean of elements in a vector
  • Calculates the median of elements in a vector
Mark for review

Which function is used to sort a vector in R?

  • order()
  • sort()
  • arrange()
  • sort.vector()
Mark for review

Which function is used to rename columns in a data frame in R?

  • rename()
  • names()
  • colnames()
  • setnames()
Mark for review

Which function is used to calculate the exponential in R?

  • exp()
  • exponential()
  • exp.calc()
  • calc.exp()
Mark for review

Which function is used to calculate the cumulative product in R?

  • cumprod()
  • prod()
  • cumulate()
  • accumulate()
Mark for review

Which function is used to generate a vector of evenly spaced numbers in R?

  • evenly()
  • linspace()
  • seq()
  • range()
Mark for review

What is the output of typeof(TRUE) in R?

  • Logical
  • Numeric
  • Character
  • Complex
Mark for review

Which function is used to calculate the median in R?

  • median()
  • med()
  • median.calc()
  • calc.median()
Mark for review

What does the nrow() function do in R?

  • Counts the number of columns in a data frame
  • Counts the number of rows in a data frame
  • Counts the number of elements in a vector
  • Counts the number of unique values in a vector
Mark for review

Which operator is used for element-wise multiplication in R?

  • *
  • **
  • %%
  • %%
Mark for review

Which function is used to calculate the cumulative sum in R?

  • cumsum()
  • sum()
  • cumulate()
  • accumulate()
Mark for review

How can you convert a factor to a character vector in R?

  • as.character()
  • to.character()
  • char()
  • convert.character()
Mark for review

What is the output of tolower("Hello World") in R?

  • HELLO WORLD
  • hello world
  • Hello World
  • hELLO wORLD
Mark for review

Which function is used to check if a value is finite in R?

  • isfinite()
  • finite()
  • fin()
  • is.finite()
Mark for review

What is the output of sqrt(16) in R?

  • 2
  • 4
  • 8
  • 16
Mark for review

What does R stand for in R programming?

  • Research
  • Regression
  • Rapid
  • Recursive
Mark for review

What does the which.max() function do in R?

  • Finds the maximum value in a vector
  • Returns the index of the maximum value in a vector
  • Finds the minimum value in a vector
  • Returns the index of the minimum value in a vector
Mark for review

In R, what does the paste() function do?

  • Concatenates vectors
  • Splits a string into substrings
  • Replaces elements in a vector
  • Sorts elements in a vector
Mark for review

What does the as.numeric() function do in R?

  • Converts a vector to numeric values
  • Converts a vector to character values
  • Converts a vector to logical values
  • Converts a vector to factor values
Mark for review

blinkerOnline

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • Answered
  • Not Answered
  • Marked for Review