{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# BIOS512 Assignment #1" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "This assignment will be submitted via GitHub. Once complete, download your notebook and upload it to your GitHub repository for the class.\n", "\n", "*Note:*\n", "- To download a notebook with Jupyter Lab, right click on the notebook in the sidebar file browser on the left and select `Download`.\n", "- To download a notebook in the Jupter Notebook interface, click `File > Download As > Notebook (.ipynb)`.\n", "\n" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Import the `tidyverse` into your R session." ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "name": "stderr", "output_type": "stream", "text": [ "── \u001b[1mAttaching packages\u001b[22m ─────────────────────────────────────── tidyverse 1.2.1 ──\n", "\n", "\u001b[32m✔\u001b[39m \u001b[34mggplot2\u001b[39m 3.2.0 \u001b[32m✔\u001b[39m \u001b[34mpurrr \u001b[39m 0.3.2\n", "\u001b[32m✔\u001b[39m \u001b[34mtibble \u001b[39m 2.1.3 \u001b[32m✔\u001b[39m \u001b[34mdplyr \u001b[39m 0.8.3\n", "\u001b[32m✔\u001b[39m \u001b[34mtidyr \u001b[39m 0.8.3 \u001b[32m✔\u001b[39m \u001b[34mstringr\u001b[39m 1.4.0\n", "\u001b[32m✔\u001b[39m \u001b[34mreadr \u001b[39m 1.3.1 \u001b[32m✔\u001b[39m \u001b[34mforcats\u001b[39m 0.4.0\n", "\n", "── \u001b[1mConflicts\u001b[22m ────────────────────────────────────────── tidyverse_conflicts() ──\n", "\u001b[31m✖\u001b[39m \u001b[34mdplyr\u001b[39m::\u001b[32mfilter()\u001b[39m masks \u001b[34mstats\u001b[39m::filter()\n", "\u001b[31m✖\u001b[39m \u001b[34mdplyr\u001b[39m::\u001b[32mlag()\u001b[39m masks \u001b[34mstats\u001b[39m::lag()\n", "\n" ] } ], "source": [ "library('tidyverse')" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "What `tidyverse` functions have conflicts with other functions in your R session? (Answer in a markdown cell using the bulleted list list syntax)" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "- filter()\n", "- lag()" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "Preview the `mpg` dataset." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
manufacturer | model | displ | year | cyl | trans | drv | cty | hwy | fl | class |
---|---|---|---|---|---|---|---|---|---|---|
<chr> | <chr> | <dbl> | <int> | <int> | <chr> | <chr> | <int> | <int> | <chr> | <chr> |
audi | a4 | 1.8 | 1999 | 4 | auto(l5) | f | 18 | 29 | p | compact |
audi | a4 | 1.8 | 1999 | 4 | manual(m5) | f | 21 | 29 | p | compact |
audi | a4 | 2.0 | 2008 | 4 | manual(m6) | f | 20 | 31 | p | compact |
audi | a4 | 2.0 | 2008 | 4 | auto(av) | f | 21 | 30 | p | compact |
audi | a4 | 2.8 | 1999 | 6 | auto(l5) | f | 16 | 26 | p | compact |
audi | a4 | 2.8 | 1999 | 6 | manual(m5) | f | 18 | 26 | p | compact |