Skip to content

Instantly share code, notes, and snippets.

View sharonsunpeng's full-sized avatar

Maodoumama sharonsunpeng

  • Christchurch, New Zealand
View GitHub Profile
@sharonsunpeng
sharonsunpeng / ipak.R
Created June 29, 2021 06:07 — forked from stevenworthington/ipak.R
Install and load multiple R packages at once
# ipak function: install and load multiple R packages.
# check to see if packages are installed. Install them if they are not, then load them into the R session.
ipak <- function(pkg){
new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])]
if (length(new.pkg))
install.packages(new.pkg, dependencies = TRUE)
sapply(pkg, require, character.only = TRUE)
}
@sharonsunpeng
sharonsunpeng / latex-cheatsheet-template.tex
Created November 20, 2021 04:37 — forked from alexander-yakushev/latex-cheatsheet-template.tex
Beautiful cheatsheet template for key bindings, compiled with XeLaTeX
%% Copyright 2020 Alexander Yakushev
%
% This work may be distributed and/or modified under the
% conditions of the LaTeX Project Public License, either version 1.3
% of this license or (at your option) any later version.
% The latest version of this license is in
% http://www.latex-project.org/lppl.txt
% and version 1.3 or later is part of all distributions of LaTeX
% version 2005/12/01 or later.
%