Online Exam Quiz

questionQuestion  1 to 30

Which function is used to apply a function over the margins of an array or matrix in R?

  • apply()
  • apply.func()
  • func.apply()
  • apply.over()
Mark for review

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

  • HELLO WORLD
  • hello world
  • Hello World
  • hELLO wORLD
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

How can you check for missing values in a data frame in R?

  • na.check()
  • is.na()
  • check.na()
  • has.na()
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 cumulative sum in R?

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

Which function is used to calculate the median in R?

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

Which operator is used for exponentiation in R?

  • ^
  • **
  • ^^
  • ^
Mark for review

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

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

What is the output of 3 ^ 2 in R?

  • 9
  • 6
  • 1.5
  • 6.25
Mark for review

What does the read.csv() function do in R?

  • Reads data from a CSV file
  • Creates a CSV file
  • Deletes a CSV file
  • Modifies a CSV file
Mark for review

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

  • Logical
  • Character
  • Numeric
  • Complex
Mark for review

Which function is used to calculate the factorial in R?

  • fact()
  • factorial()
  • fact.calc()
  • calc.factorial()
Mark for review

What does the rep() function do in R?

  • Repeat elements of a vector
  • Replace elements of a vector
  • Reverse elements of a vector
  • Remove elements of a vector
Mark for review

What does the any() function do in R?

  • Checks if any element in a vector is true
  • Checks if all elements in a vector are true
  • Checks if any element in a vector is false
  • Checks if all elements in a vector are false
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

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

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

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

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

What does the tolower() function do in R?

  • Converts strings to lowercase
  • Converts strings to uppercase
  • Converts strings to title case
  • Removes spaces from strings
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

What does the unique() function do in R?

  • Removes duplicate elements from a vector
  • Sorts elements of a vector
  • Adds unique identifiers to elements of a vector
  • Creates a vector of unique elements
Mark for review

What does the grep() function do in R?

  • Finds the position of a substring in a string
  • Replaces occurrences of a substring in a string
  • Removes occurrences of a substring from a string
  • Converts a string to lowercase
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

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

  • std()
  • stdev()
  • sd()
  • stddev()
Mark for review

What is the output of ceiling(3.2) in R?

  • 3
  • 4
  • 3.5
  • 4.5
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 calculate the absolute value in R?

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

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

  • Sorts elements of a vector
  • Converts factors to characters
  • Displays the structure of an object
  • Searches for a substring in a character vector
Mark for review

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

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

Which function is used to generate random numbers in R?

  • rand()
  • random()
  • runif()
  • rnorm()
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