To begin, please follow the links in the course syllabus to download R, RStudio, and R Markdown. You should edit this .Rmd using RStudio, then click Knit in the menu bar of the source window (above the text of this .Rmd). Remember, you must submit your knitted PDF file through Canvas in order to receive full credit!
# Your code here
# Your code here (two lines)
# Your code here
# Your code here
round(6.6)
and
as.integer(6.6)
the same?# Your code here (Hint: the output should be TRUE/FALSE)
numeric
.# Your code here (output should be TRUE/FALSE)
# Your code here (Two lines)
NA
?# Your code here (Two lines)
Look at the documentation of the following R functions
seq
, factorial
, and choose
. Use
at least two ways in R to achieve the followings.
# Your code here (At least two lines)
$7 \choose 4$
).# Your code here (At least two lines)
Run the following command to create an object.
## Run it before proceeding to the questions
x <- c(1, 8, -3.2, 5, -1, 15.3)
Use R to do the followings:
x
.# Your code here
x
.# Your code here
x
.# Your code here (Hint: the output has the same length as x.)
x
that is >1.5.
Hint: look at the documentation of which()
.# Your code here
x
.# Your code here
x
from low to high.# Your code here