Gábor Csárdi
Five parts, 30 minutes each, 5 minutes for exercises.
Sort a data frame? correct solution? Depends.
dd[with(dd, order(-z, b)), ]
library(plyr)
arrange(dd, desc(z), b)
library(data.table)
data.table(dd)[order(-z, b)]
library(taRifx)
sort(dd, f= ~-z+b)
doBy::orderBy(~ - z + b, data = dd)
Programs must be written for people to read, and only incidentally for machines to execute.
Harold Abelson, Structure and Interpretation of Computer Programs
Files
Files
README.md
Commits
Commit ids
Browse files at another version
Browse files at another version
Diffs
Diffs
History of files
History of files
Blame
Blame
Star
Star
Star
Search: find users
Search: within repository
Search: all R code
Search: all CRAN packages
https://github.com/wch/r-source
https://github.com/bioconductor-mirror
remotes::install_github("gaborcsardi/praise")
Downloading GitHub repo gaborcsardi/praise@master
Installing package into ‘/Users/gaborcsardi/r_pkgs’
(as ‘lib’ is unspecified)
* installing *source* package ‘praise’ ...
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (praise)
praise::praise()
## [1] "You are finest!"
base <- "https://raw.githubusercontent.com/"
repo <- "MangoTheCat/remotes/"
file <- "master/install-github.R"
url <- paste0(base, repo, file)
source(url)$value("mangothecat/remotes")
Downloading GitHub repo mangothecat/remotes@master
Installing package into ‘/Users/gaborcsardi/r_pkgs’
(as ‘lib’ is unspecified)
* installing *source* package ‘remotes’ ...
** R
** inst
** preparing package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded
* DONE (remotes)
Remotes
field in DESCRIPTION
...
Suggests:
testthat
Imports:
description,
rcmdcheck
Remotes:
metacran/description,
mangothecat/rcmdcheck
...
❯ remotes::install_github("mangothecat/goodPractice")
Downloading GitHub repo mangothecat/goodPractice@master
Downloading GitHub repo metacran/description@master
...
remotes
.