❯ usethis::use_pkgdown_travis()
✔ Setting active project to '/Users/gaborcsardi/works/ps'
✔ Adding 'docs/' to '.gitignore'
● Set up deploy keys by running `travis::use_travis_deploy()`
● Insert the following code in '.travis.yml'
before_cache: Rscript -e 'remotes::install_cran("pkgdown")'
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
| { | |
| "styler::style_active_file": "Ctrl+Y", | |
| "addmins::insert_dashes": "Ctrl+8", | |
| "xaringan::inf_mr": "Ctrl+M", | |
| "drake::rs_addin_loadd": "Ctrl+K", | |
| "browse::browse": "Ctrl+B" | |
| } |
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
| from pathlib import Path | |
| import jinja2 | |
| import yaml | |
| from conda.models.match_spec import MatchSpec | |
| import networkx as nx | |
| # import matplotlib.pyplot as plt | |
| import os, random, time, json | |
| import workerpool | |
| NO_BUILD_LOCAL_PKGS = True |
Key takeaways:
- everything inside
vars(...)is exactly the same as the stuff insideselect(...)!!! vars()is used for all scoped variants of dplyr verbs (I assume bc the variables need to “fit” into a single argument,.vars. Inselect(...), the ellipses take everything)vars_select()is probably more of a developer-facing function (seen inselect_helpersdocumentation)
Some "gotchas":
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
| --- | |
| title: "Tweet thread" | |
| author: "Elio Campitelli" | |
| output: github_document | |
| --- | |
| ```{r} | |
| knitr::opts_chunk$set(dev = "png", | |
| tweet_this = TRUE) |
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
| #!/bin/bash -e | |
| # Usage: | |
| # | |
| # 1. set $CIRCLE_API_TOKEN | |
| # 2. run `./trigger-build <account> <oroject> [<branch>]` | |
| # | |
| # For https://github.com/iambob/myfirstproject: | |
| # | |
| # trigger_build iambob myfirstproject |
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
| s = 'Python is awesome!' | |
| red = "#FA5882" | |
| a = eval("exec('import sys; import matplotlib.pyplot as plt; import numpy as np; print(s); t = np.arange(0,2*np.pi, 0.1); x = 16*np.sin(t)**3; y = 13*np.cos(t)-5*np.cos(2*t)-2*np.cos(3*t)-np.cos(4*t); plt.fill(x,y,color=red); plt.show(); sys.exit()')") | |
| print('R is great too!') | |
| X11() # Use windows() or qartz() if on Windows or Mac | |
| t = seq(0, 2*pi, by=0.1) | |
| x = 16*sin(t)^3 | |
| y = 13*cos(t) - 5*cos(2*t) - 2*cos(3*t) - cos(4*t) | |
| plot(x=x, y=y, type="n", xlab="", ylab="") | |
| polygon(x=x, y=y, col=red, border=red) |
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
| ``` r | |
| cran_db <- tools::CRAN_package_db() | |
| cran_db <- cran_db[, c("Package", "SystemRequirements", | |
| "Imports", "Depends", "Suggests")] | |
| java <- dplyr::filter(cran_db, | |
| stringr::str_detect(Imports, "rJava") | | |
| stringr::str_detect(Imports, "rJava") | | |
| stringr::str_detect(Depends, "rJava")| | |
| stringr::str_detect(SystemRequirements, "[Jj]ava")) |
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
| #!/bin/bash | |
| TODAY=`date +%Y-%m-%d` | |
| TODAY_MD=`date +%B\ %d,\ %Y` | |
| YEAR=`date +%Y` | |
| PACKAGENAME=$1 | |
| ## | |
| ## CHANGE ME!!! |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.