This repository was archived by the owner on Dec 12, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
dc7accc
commit e4da6bb
Showing
5 changed files
with
161 additions
and
1 deletion.
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,3 +3,5 @@ | |
| .Rhistory | ||
| .RData | ||
| *.html | ||
| Test.* | ||
| data/ | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,117 @@ | ||
| { | ||
| "cells": [ | ||
| { | ||
| "cell_type": "markdown", | ||
| "id": "9dd1774e-6446-4f7f-b3ee-3ac0dcd5a027", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "# R Notebook Prep\n", | ||
| "\n", | ||
| "This produces a large graphics. Clear all outputs before saving." | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "code", | ||
| "execution_count": null, | ||
| "id": "03dca8c7-f3a4-48c4-8a9e-17b6701ce59b", | ||
| "metadata": { | ||
| "scrolled": true | ||
| }, | ||
| "outputs": [], | ||
| "source": [ | ||
| "## Setup system - run only once\n", | ||
| "\n", | ||
| "# Configure mirror\n", | ||
| "options(repos = list(CRAN=\"http://cran.rstudio.com/\"))\n", | ||
| "\n", | ||
| "# Install basic packages\n", | ||
| "install.packages(c(\"tidyverse\", \"lubridate\", \"ratdat\"))\n", | ||
| "\n", | ||
| "# Install plotting packages\n", | ||
| "install.packages(\"ggplot2\")" | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "code", | ||
| "execution_count": null, | ||
| "id": "942ae10c-eec7-4ca0-be76-c268872c150f", | ||
| "metadata": {}, | ||
| "outputs": [], | ||
| "source": [ | ||
| "library(tidyverse)\n", | ||
| "library(lubridate)\n", | ||
| "library(ratdat)\n", | ||
| "library(ggplot2)" | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "code", | ||
| "execution_count": null, | ||
| "id": "7ade46ad-0ce2-4106-b0cd-5377e84d51b4", | ||
| "metadata": {}, | ||
| "outputs": [], | ||
| "source": [ | ||
| "ggplot(data = complete_old, mapping = aes(x = weight, y = hindfoot_length)) +\n", | ||
| " geom_point()" | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "code", | ||
| "execution_count": null, | ||
| "id": "6605dcea-b970-4591-82eb-7928512fcc4f", | ||
| "metadata": {}, | ||
| "outputs": [], | ||
| "source": [ | ||
| "myplot <- ggplot(data = complete_old, mapping = aes(x = plot_type, y = hindfoot_length)) +\n", | ||
| " geom_jitter(aes(color = plot_type), alpha = 0.2) +\n", | ||
| " geom_boxplot(outlier.shape = NA, fill = NA)\n", | ||
| "\n", | ||
| "myplot\n", | ||
| "\n", | ||
| "myplot +\n", | ||
| " theme_bw() +\n", | ||
| " theme(axis.title = element_text(size = 14), \n", | ||
| " legend.position = \"none\", \n", | ||
| " panel.grid.major.x = element_blank()) +\n", | ||
| " labs(title = \"Rodent size by plot type\",\n", | ||
| " x = \"Plot type\",\n", | ||
| " y = \"Hindfoot length (mm)\",\n", | ||
| " color = \"Plot type\") +\n", | ||
| " facet_wrap(vars(sex), ncol = 1)" | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "markdown", | ||
| "id": "b65f2312-4e9e-4e36-895e-e591f7c9db9b", | ||
| "metadata": {}, | ||
| "source": [ | ||
| "This produces a large graphics. Clear all outputs before saving." | ||
| ] | ||
| }, | ||
| { | ||
| "cell_type": "code", | ||
| "execution_count": null, | ||
| "id": "c26e0424-4115-48b2-a0d9-97dabee03875", | ||
| "metadata": {}, | ||
| "outputs": [], | ||
| "source": [] | ||
| } | ||
| ], | ||
| "metadata": { | ||
| "kernelspec": { | ||
| "display_name": "R", | ||
| "language": "R", | ||
| "name": "ir" | ||
| }, | ||
| "language_info": { | ||
| "codemirror_mode": "r", | ||
| "file_extension": ".r", | ||
| "mimetype": "text/x-r-source", | ||
| "name": "R", | ||
| "pygments_lexer": "r", | ||
| "version": "4.3.1" | ||
| } | ||
| }, | ||
| "nbformat": 4, | ||
| "nbformat_minor": 5 | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters