Podcast
Questions and Answers
What function is used to remove all objects from the R workspace?
What function is used to remove all objects from the R workspace?
- ls()
- getwd()
- rm() (correct)
- setwd()
How can you load a saved workspace in R?
How can you load a saved workspace in R?
- read('workspace.Rdata')
- load('workspace.Rdata') (correct)
- import('workspace.Rdata')
- load.image('workspace.Rdata')
Which command is used to assign a value to a variable in R?
Which command is used to assign a value to a variable in R?
- define x=1
- x<-1
- x=1 (correct)
- x:=1
What is the function used to calculate the mean of a vector while ignoring NA values?
What is the function used to calculate the mean of a vector while ignoring NA values?
How can you create a subset of a dataframe based on a condition?
How can you create a subset of a dataframe based on a condition?
What does the command 'head(nobel)' do?
What does the command 'head(nobel)' do?
In R, which operator is used for binding rows of matrices together?
In R, which operator is used for binding rows of matrices together?
What is the output of mean(y) if y contains NA values and na.rm is set to FALSE?
What is the output of mean(y) if y contains NA values and na.rm is set to FALSE?
What is the primary purpose of the function 'setwd()' in R?
What is the primary purpose of the function 'setwd()' in R?
The command 'rm(list=ls(all=TRUE))' removes all objects in the current R environment.
The command 'rm(list=ls(all=TRUE))' removes all objects in the current R environment.
What does the function 'mean()' do in R?
What does the function 'mean()' do in R?
To import a text file in R, you would use the function 'read.table()' and specify the file name as ______.
To import a text file in R, you would use the function 'read.table()' and specify the file name as ______.
Match the following R functions with their primary functionality:
Match the following R functions with their primary functionality:
Which command is used to create a matrix by binding two vectors together vertically?
Which command is used to create a matrix by binding two vectors together vertically?
How do you calculate the average age of high creativity for Nobel laureates in the late period?
How do you calculate the average age of high creativity for Nobel laureates in the late period?
The expression 'nobel_no_na = subset(nobel, subset=!is.na(duree))' filters out NAs from the 'duree' column.
The expression 'nobel_no_na = subset(nobel, subset=!is.na(duree))' filters out NAs from the 'duree' column.
Flashcards
ls()
ls()
Lists all objects in the current R environment.
rm(list=ls(all=TRUE))
rm(list=ls(all=TRUE))
Removes all objects from the R environment.
getwd()
getwd()
Displays the current working directory in R.
setwd()
setwd()
Signup and view all the flashcards
save.image()
save.image()
Signup and view all the flashcards
load()
load()
Signup and view all the flashcards
x <- 1
x <- 1
Signup and view all the flashcards
class(x)
class(x)
Signup and view all the flashcards
y <- c(1, 5, 4, 8)
y <- c(1, 5, 4, 8)
Signup and view all the flashcards
matrix
matrix
Signup and view all the flashcards
rbind()
rbind()
Signup and view all the flashcards
cbind()
cbind()
Signup and view all the flashcards
?mean
?mean
Signup and view all the flashcards
mean(y, na.rm = TRUE)
mean(y, na.rm = TRUE)
Signup and view all the flashcards
read.table()
read.table()
Signup and view all the flashcards
data.frame
data.frame
Signup and view all the flashcards
dim()
dim()
Signup and view all the flashcards
rownames()
rownames()
Signup and view all the flashcards
colnames()
colnames()
Signup and view all the flashcards
head()
head()
Signup and view all the flashcards
subset()
subset()
Signup and view all the flashcards
R workspace
R workspace
Signup and view all the flashcards
Saving a workspace in R
Saving a workspace in R
Signup and view all the flashcards
Loading a workspace
Loading a workspace
Signup and view all the flashcards
Creating a vector in R
Creating a vector in R
Signup and view all the flashcards
Creating a matrix in R
Creating a matrix in R
Signup and view all the flashcards
rbind() function
rbind() function
Signup and view all the flashcards
cbind() function
cbind() function
Signup and view all the flashcards
mean(y, na.rm = TRUE)
mean(y, na.rm = TRUE)
Signup and view all the flashcards
Data frame
Data frame
Signup and view all the flashcards
dim(nobel)
dim(nobel)
Signup and view all the flashcards
Analyzing Dataframes
Analyzing Dataframes
Signup and view all the flashcards
Reading text files
Reading text files
Signup and view all the flashcards
Subset a dataframe
Subset a dataframe
Signup and view all the flashcards
Calculating average lifespan
Calculating average lifespan
Signup and view all the flashcards
Handling missing values (NA)
Handling missing values (NA)
Signup and view all the flashcards
Data generation
Data generation
Signup and view all the flashcards