vignette() in the console, see this fix. tldr:
you need to run
devtools::install(build_vignettes=TRUE)Due Wednesday 12/21 at 3pm, as described on projects page
vignettes(), then
vignettes(package = "IPEDS")README is a quickstart guide vs vignette is an
instruction manualusethis::use_vignette() wrapper
function
vignette(). tldr: you
need to run devtools::install(build_vignettes=TRUE)R CMD CHECK
Warning: invalid gid value replaced by that for user 'nobody'
means. I encounter it all the time, but it’s never been a problem when
I’ve submitted CRAN packagesabbott demo example, one error found: No testsIPEDS tests
that AJ definedabbott demo example
usethis::use_test("apples")tests/testthat/test-apples.RR CMD CHECKBefore class starts, ensure you can load these packages
library(tidyverse)
library(moderndive)
library(scales)
library(janitor)Added clarification to instructions for Project Phase 2
Start using R packages book as a reference (not a great learning tool IMO). Today’s reference chapter is Chapter 8 on Data.
Example of adding a dataset to an R package:
moderndive::DD_vs_SB by Middlebury College ’17 grad Delaney
Moran.
View(DD_vs_SB)?DD_vs_SBdata-raw/process_data_sets.R
for
usethis::use_data(). This
creates the output data/DD_vs_SB.rda
which is a compressed data file that you shouldn’t directly modify.R/datasets
for documenting data set using roxygen2 code. This creates
the output man/DD_vs_SB.Rd
which is a R help file that you shouldn’t directly modify.apples.csv from Slackroxygen2 documentation is updatedusethis::use_raw_data()R/datasets.R documentation file for
the first time. I’m going copy and paste thisDESCRIPTION file, R/ folder, etc.README.Rmd source document doesn’t exist already,
create it by running usethis::use_readme_rmd(). Remember to
only edit README.Rmd and knit it to create the
README.md cover page for your repodevtools::install_github(). In other words, the code
in the master branch should always work. That way we can do
spot-checks for frequent and low-stakes (ungraded) check-ins.devtools::install_github() or
remotes::install_github()install_github() on IPEDSDESCRIPTION file, R/ folder, etc.README.Rmd source document doesn’t exist already,
create it by running usethis::use_readme_rmd(). Remember to
only edit README.Rmd and knit it to create the
README.md cover page for your repodevtools::install_github(). In other words, the code
in the master branch should always workmap_int(c(100, 53), what_do_i_return) is not a good
example of error generation because two errors are genererated at once:
100 returns “100”, and 53 returns 53 which is a double, not an intmap()
family of functions (not graded)README.Rmd
files that generate the README.md cover page of your repos:
#general about GEM program for American
Indian/Native, African American/Black, or Hispanic American/Latino
students interested in graduate studies in STEMThe only way to write good code is to write tons of shitty code first. Feeling shame about bad code stops you from getting to good code
— Hadley Wickham (@hadleywickham) April 17, 2015
devtools and roxygen2
packagesreprex R packagelibrary(ggplot2)
library(dplyr)
library(lobstr)
# How do I compute average price?
diamonds %>%
summarize(avg_price = avg(price))
library(reprex)reprex()ggplot2
packageThis occurs when there are unsynced changes of the same line of code. In your project groups:
sds270 which
you could not directly edit.
sds270 owners: Me and Swaha?gapminder R package
gapminder package?gapmindergdpPercap variablesds270 GitHub Organization for this course: Click
on GitHub icon on top right of webpageIn-class demo on how to applying GitHub terminology and terminology we covered in Lec 06. Going forward, I will post screencasts of all in-class demos here.
test270. Set:
description as “testing”, Public, add a README file, add a
.gitignore file using the R template, no license.README.mdgit-demo repos on your
computer to avoid confusion)git-demo
remote repo that only Swaha and I can editREADME.md as a markdown hyperlink to
your GitHub profile pagegit-demo
repo. i.e. Send a request to Swaha and me to merge your changes in the
master copy.dusty-carpet
repo that you can all editfirstname-lastname
i.e. compartmentalize your changes to keep master branch
pristine for nowfirstname-lastname branchREADME.md Change flip_switch_1 from
0 to 1 next to your name. Be sure to only edit
the single character.firstname-lastname branch, not master
branchmaster branch. i.e. Create a
request to merge your changes in the master branchfirstname-lastname branchComplete above three GitHub exercises, posting all links in the students Google Sheet
sds270 GitHub organization for this class:
In order from least to most stressful:
— Kelsey 😷 Krippaehne (@krippopotamus) September 20, 2022
- code works
- code doesn't work
- code doesn't work, don't know why
- code works, don't know why
sds270 GitHub
organization#questionsusethis packageusethis packageusethis#course-questions - Ask questions about
class here: syllabus questions, due dates, etc.#oh-shit-git - Ask questions about
Git/GitHub here#tech-questions to
#r-questions - Ask questions about R here.Before Tuesday, do your best to “clone” this GitHub repository locally i.e. download a copy of this repo onto your computer:
#oh-shit-git slack channel and see if anyone has
encountered the same issue
#questions (so we’re
organized)
tidyverse (so there
is no confusion due to versions)git. If you don’t
get an error message, you’re good.