R Language perguntas e respostas de entrevista
Pergunta 1. What is R?
R is a programming language and free software environment for statistical computing and graphics.
Example:
print('Hello, R!')
Pergunta 2. How do you assign a value to a variable in R?
You can use the assignment operator <- or =.
Example:
x <- 10
Pergunta 3. Explain what a data frame is in R.
A data frame is a two-dimensional, heterogeneous tabular data structure with rows and columns.
Example:
df <- data.frame(Name=c('John', 'Jane'), Age=c(25, 30))
Pergunta 4. What is the use of the 'attach()' function in R?
The attach() function is used to attach a data frame to the search path, making it easier to refer to variables in the data frame.
Example:
attach(df)
Pergunta 5. How can you install a package in R?
You can use the install.packages() function.
Example:
install.packages('packageName')
Mais uteis segundo os usuarios: