PSTAT MIDTERM 1 TEST LATEST
UPDATED
multiply function - ANSWER *
exponent function - ANSWER ^
divided function - ANSWER /
vectors - ANSWER are variables with an ordered list of values
square root function - ANSWER sqrt()
can a vector be labeled with a digit followed by a digit? - ANSWER no
can a vector be labeled by a digit followed by a period? - ANSWER no
are vector names case sensitive? - ANSWER yes
code to print the sequence of numbers 2 3 4 5 - ANSWER >seq(2,5)
or
>2:5
result of
>(x<-seq(2,5)) - ANSWER [1] 2 3 4 5
the extra parentheses make the instruction send to screen
function to output as a list of current objects - ANSWER objects()
>x<-(("Hello"))
, >y<-(("World"))
>W<-c(x,y)
what's the answer? - ANSWER [1] "Hello" "World"
>x<-(("Hello"))
>y<-(("World"))
>paste(x,y) - ANSWER [1] "Hello World"
>date() - ANSWER returns current date and time
>function to access a data set and inform R that it is the data set of interest -
ANSWER data()
>function to display a data set in top left window - ANSWER View()
>symbol used to access a specific variable in a data set - ANSWER $
example: you would like to see the uptake variable in the data set CO2
>CO2$uptake
5 basic data types in R - ANSWER Logical
Integer
Numeric
Complex
Character
5 basic data structures in R - ANSWER vectors
matrixes
data frames
factors
tables
function to return the data type of a vector - ANSWER >typeof(z)
returns data type of z
function to find the length of a vector - ANSWER >length(z)
UPDATED
multiply function - ANSWER *
exponent function - ANSWER ^
divided function - ANSWER /
vectors - ANSWER are variables with an ordered list of values
square root function - ANSWER sqrt()
can a vector be labeled with a digit followed by a digit? - ANSWER no
can a vector be labeled by a digit followed by a period? - ANSWER no
are vector names case sensitive? - ANSWER yes
code to print the sequence of numbers 2 3 4 5 - ANSWER >seq(2,5)
or
>2:5
result of
>(x<-seq(2,5)) - ANSWER [1] 2 3 4 5
the extra parentheses make the instruction send to screen
function to output as a list of current objects - ANSWER objects()
>x<-(("Hello"))
, >y<-(("World"))
>W<-c(x,y)
what's the answer? - ANSWER [1] "Hello" "World"
>x<-(("Hello"))
>y<-(("World"))
>paste(x,y) - ANSWER [1] "Hello World"
>date() - ANSWER returns current date and time
>function to access a data set and inform R that it is the data set of interest -
ANSWER data()
>function to display a data set in top left window - ANSWER View()
>symbol used to access a specific variable in a data set - ANSWER $
example: you would like to see the uptake variable in the data set CO2
>CO2$uptake
5 basic data types in R - ANSWER Logical
Integer
Numeric
Complex
Character
5 basic data structures in R - ANSWER vectors
matrixes
data frames
factors
tables
function to return the data type of a vector - ANSWER >typeof(z)
returns data type of z
function to find the length of a vector - ANSWER >length(z)