title: Problem Set fill_in_test output: html_document: keep_md: yes toc: yes
# Load libraries and source extra code library(dplyr) library(RTutor) # Options for rendering data frames # If you knit to a Word docx file, try # # data.frame.theme="word" # # (needs RStudio > 1.2.1) # # You can also set the options like # table.max.cols as chunk options # Makes sense if there are too many, too wide # columns in some chunks RTutor::set.knit.print.opts(data.frame.theme="code", table.max.rows=25, table.max.cols=NULL, round.digits=5, signif.digits=8) # continue knitting even if there is an error knitr::opts_chunk$set(error = TRUE)
Note: Always save your solution files with UTF-8 Encoding!
Adapt the working directory below and run the setup chunk in RStudio. This creates the problem set files and the sample solution from this solution file.
a)
x = c(1,NA,5) # # Compute the mean ignoring NA # mean(x,___) mean(x, na.rm = TRUE)
Great you solved the test!
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.