Skip to content

Instantly share code, notes, and snippets.

###############
#### GIST: Makefile targets
#### https://gist.github.com/rkrug/9005f4b7169e65b6c51866209370c599
###############
SHELL = /bin/bash
# run targets pipeline
build:
Rscript -e "targets::tar_make()"
###############
#### GIST: Makefile targets
#### https://gist.github.com/rkrug/9005f4b7169e65b6c51866209370c599
###############
SHELL = /bin/bash
# run targets pipeline
build:
Rscript -e "targets::tar_make()"
###############
#### GIST: Makefile targets
#### https://gist.github.com/rkrug/9005f4b7169e65b6c51866209370c599
###############
SHELL = /bin/bash
# run targets pipeline
build:
Rscript -e "targets::tar_make()"
@rkrug
rkrug / Makefile targets
Last active September 16, 2024 07:57
Makefile for R projects using the `targets` package.
SHELL = /bin/bash
# run targets pipeline
build:
Rscript -e "targets::tar_make()"
# visnetwork
vis: visualise
visualise:
Rscript -e "targets::tar_visnetwork()"
@rkrug
rkrug / Makefile targets
Created September 16, 2024 07:55
Makefie for R project wi=using the `targets` package
SHELL = /bin/bash
# run targets pipeline
build:
Rscript -e "targets::tar_make()"
vis: visualise
visualise:
Rscript -e "targets::tar_visnetwork()"
@rkrug
rkrug / scrip.md
Last active March 27, 2025 16:42
Creating RStudio Server from Ubuntu Installation

Update Installation

sudo apt-get update
sudo apt-get upgrade

basic tools

@rkrug
rkrug / Makefile
Created August 20, 2020 06:53
Makefile to recursively run all makefiles in subfolders with specified targets
## 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)))
---
title: "plantuml test"
author: "Rainer M Krug"
date: "6/17/2020"
output: html_document
---
```{r setup, include=FALSE}
library(plantuml)
knitr::knit_engines$set(
## 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 ###########
####
@rkrug
rkrug / Makefile
Created September 19, 2019 11:24 — forked from hjst/Makefile
Makefile for use with PlantUML diagrams
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)