What is R?
Example:
print('Hello, R!')
Save For Revision
Save For Revision
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
WithoutBook brings subject-wise interview questions, online practice tests, tutorials, and comparison guides into one responsive learning workspace.
Know the top R Language interview questions and answers for freshers and experienced candidates to prepare for job interviews.
Know the top R Language interview questions and answers for freshers and experienced candidates to prepare for job interviews.
Search a question to view the answer.
Example:
print('Hello, R!')
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
x <- 10
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
df <- data.frame(Name=c('John', 'Jane'), Age=c(25, 30))
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
attach(df)
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
install.packages('packageName')
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
str(my_data)
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
exists('my_variable')
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
library(ggplot2)
ggplot(data = my_data, aes(x = variable1, y = variable2)) + geom_point()
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
ls()
# or
objects()
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
my_data <- read.csv('file.csv')
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
setwd('/path/to/directory')
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
install.packages('my_package'); library('my_package')
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
summary(my_data)
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
apply(matrix, 1, sum)
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
merged_data <- merge(df1, df2, by='common_column')
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
gender <- factor(c('Male', 'Female', 'Male'), levels=c('Male', 'Female'))
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
cleaned_data <- na.omit(df)
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
library(dplyr)
filtered_data <- filter(df, Age > 25)
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
library(purrr)
map(my_list, my_function)
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
library(reshape2)
melted_data <- melt(my_data, id.vars=c('id', 'name'))
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
tryCatch({
# code that might cause an error
}, error = function(e) {
# code to handle the error
})
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
library(caret)
model <- train(y ~ ., data = my_data, method = 'lm')
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
vector1 <- c(1, 2, 3)
vector2 <- c(4, 5, 6)
result <- vector1 + vector2
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
lazy_function <- function() { print('Lazy function') }
# The function is not executed until called: lazy_function()
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
random_numbers <- runif(5)
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
library(shiny)
shinyApp(ui, server)
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
#include
// C++ code with Rcpp
// ...
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
library(dtplyr)
large_data %>% filter(Age > 30) %>% summarise(mean(Salary))
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
library(memoise)
my_function <- memoise(function(x) { # function body })
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.
Example:
closure_function <- function() {
x <- 10
function() { x + 1 }
}
Bookmark this item, mark it difficult, or place it in a revision set.
Log in to save bookmarks, difficult questions, and revision sets.