PSTAT 10 FINAL EXAM LATEST
QUESTIONS AND
ANSWERS 2026 - 2027
x<-7:10 - ANSWERS-creates a vector 7 through
7 8 9 10
2^(0:10) - ANSWERS-2 to the power of all values in a vector from 0 to
10
rm(x) - ANSWERS-removes object x
q() - ANSWERS-quit Rstudio
x<-c(3,7,9) - ANSWERS-c is combine function
379
1) x<-c("hello","world")
2) paste("hello", "world") - ANSWERS-1) "hello" "world"
2 " hello world"
END OF
PAGE
1
, PSTAT 10 FINAL EXAM LATEST
QUESTIONS AND
ANSWERS 2026 - 2027
date() - ANSWERS-gives today's time and date
?paste
help(paste) - ANSWERS-help function
getwd() - ANSWERS-get work directory
setwd() - ANSWERS-set working directory
data("CO2")
View(CO2) - ANSWERS-indicates data set of interest
view CO2 in top left pane
(CAPITAL V)
CO2$uptake - ANSWERS-only takes data from uptake column in CO2
data
END OF
PAGE
2
, PSTAT 10 FINAL EXAM LATEST
QUESTIONS AND
ANSWERS 2026 - 2027
5 basic object classes in R - ANSWERS-logical(T,F)
integer(1,2,3,4)
numeric(2.2 3.355, 3,pi)
complex(i, 3i, 4i)
character("A", "APPLE")
Data structures - ANSWERS-vector
matrix
data frame
factors
tables
Vector Syntax - ANSWERS-vector(class of object, length)
typeof(z) - ANSWERS-gives class of vector
"character", "numeric"
END OF
PAGE
3
QUESTIONS AND
ANSWERS 2026 - 2027
x<-7:10 - ANSWERS-creates a vector 7 through
7 8 9 10
2^(0:10) - ANSWERS-2 to the power of all values in a vector from 0 to
10
rm(x) - ANSWERS-removes object x
q() - ANSWERS-quit Rstudio
x<-c(3,7,9) - ANSWERS-c is combine function
379
1) x<-c("hello","world")
2) paste("hello", "world") - ANSWERS-1) "hello" "world"
2 " hello world"
END OF
PAGE
1
, PSTAT 10 FINAL EXAM LATEST
QUESTIONS AND
ANSWERS 2026 - 2027
date() - ANSWERS-gives today's time and date
?paste
help(paste) - ANSWERS-help function
getwd() - ANSWERS-get work directory
setwd() - ANSWERS-set working directory
data("CO2")
View(CO2) - ANSWERS-indicates data set of interest
view CO2 in top left pane
(CAPITAL V)
CO2$uptake - ANSWERS-only takes data from uptake column in CO2
data
END OF
PAGE
2
, PSTAT 10 FINAL EXAM LATEST
QUESTIONS AND
ANSWERS 2026 - 2027
5 basic object classes in R - ANSWERS-logical(T,F)
integer(1,2,3,4)
numeric(2.2 3.355, 3,pi)
complex(i, 3i, 4i)
character("A", "APPLE")
Data structures - ANSWERS-vector
matrix
data frame
factors
tables
Vector Syntax - ANSWERS-vector(class of object, length)
typeof(z) - ANSWERS-gives class of vector
"character", "numeric"
END OF
PAGE
3