sudo apt-get update
sudo apt-get upgrade
## Based on https://github.com/kjhealy/rmd-starter/blob/master/Makefile | |
## All Rmarkdown files in the working directory | |
SRC = $(wildcard *.Rmd) | |
FILES = $(wildcard *_files) | |
PDFS = $(SRC:.Rmd=.pdf) | |
HTML = $(SRC:.Rmd=.html) | |
TEX = $(SRC:.Rmd=.tex) |
## All Rmarkdown files in the working directory | |
SRCDIR = source | |
OUTDIR = docs | |
RMD = $(wildcard $(SRCDIR)/*.Rmd) | |
# HTML = $(RMD:.Rmd=.html) | |
TMP = $(RMD:.Rmd=.html) | |
HTML = ${subst $(SRCDIR),$(OUTDIR),$(TMP)} |
# Makefile for generating R packages. | |
# 2011 Andrew Redd | |
# | |
# Assumes Makefile is in a folder where package contents are in a subfolder pkg. | |
# Roxygen uses the roxygen2 package, and will run automatically on check and all. | |
PKG_VERSION=$(shell grep -i ^version pkg/DESCRIPTION | cut -d : -d \ -f 2) | |
PKG_NAME=$(shell grep -i ^package pkg/DESCRIPTION | cut -d : -d \ -f 2) | |
R_FILES := $(wildcard pkg/R/*.R) |
--- | |
title: "test" | |
author: "Rainer M Krug" | |
date: "3/27/2019" | |
output: | |
html_document: default | |
--- | |
```{r setup, include=FALSE} | |
knitr::opts_chunk$set(echo = TRUE) |
PLANTUML_JAR_URL = https://sourceforge.net/projects/plantuml/files/plantuml.jar/download | |
DIAGRAMS_SRC := $(wildcard diagrams/*.plantuml) | |
DIAGRAMS_PNG := $(addsuffix .png, $(basename $(DIAGRAMS_SRC))) | |
DIAGRAMS_SVG := $(addsuffix .svg, $(basename $(DIAGRAMS_SRC))) | |
# Default target first; build PNGs, probably what we want most of the time | |
png: plantuml.jar $(DIAGRAMS_PNG) | |
# SVG are nice-to-have but don't need to build by default | |
svg: plantuml.jar $(DIAGRAMS_SVG) |
## R parts based on https://github.com/yihui/knitr/blob/master/Makefile | |
PKGNAME := $(shell sed -n "s/^Package: *\([^ ]*\)/\1/p" DESCRIPTION) | |
PKGVERS := $(shell sed -n "s/^Version: *\([^ ]*\)/\1/p" DESCRIPTION) | |
PKGSRC := $(shell basename `pwd`) | |
########### Package ########### | |
#### |
--- | |
title: "plantuml test" | |
author: "Rainer M Krug" | |
date: "6/17/2020" | |
output: html_document | |
--- | |
```{r setup, include=FALSE} | |
library(plantuml) | |
knitr::knit_engines$set( |
## See https://stackoverflow.com/a/11206700/632423 | |
## adjust when different | |
SUBDIRS := $(wildcard */.) # e.g. "foo/. bar/." | |
TARGETS := all build build-cran check clean clean_check clean_readme deps docs drat files # whatever else, but must not contain '/' | |
## | |
# foo/.all bar/.all foo/.clean bar/.clean | |
SUBDIRS_TARGETS := \ | |
$(foreach t,$(TARGETS),$(addsuffix $t,$(SUBDIRS))) |
SHELL = /bin/bash | |
# run targets pipeline | |
build: | |
Rscript -e "targets::tar_make()" | |
vis: visualise | |
visualise: | |
Rscript -e "targets::tar_visnetwork()" |