rm(list=ls())
  library(rmarkdown)
  library(knitr)
  library(xtable)
  library(Luke)
  opts_chunk$set(tidy=TRUE, 
                 echo=TRUE, 
                 warning=FALSE, 
                 message=FALSE,
                 dev=c("png","pdf"),
                 fig.path='./Figures/')
  options(stringsAsFactors = FALSE)

Introduction

The Luke package is a loose collection of subfunctions that are repeatedly used in other packages.

Vector manipulation

Last element of a vector

In order to extract the last element of a vector, the function lastElement can be used

myVector <- sample(10)
myVector
lastElement(myVector)

Colours

The package contains also a set of Luke colours that can be used to follow the Luke branding. The colours are available as vectors and can be accessed like this

barplot(rep(300,7), col=lukeColours[1:7])
barplot(rep(300,7), col=lukeColours.dark[1:7])
barplot(rep(300,7), col=lukeColours.light[1:7])


fischuu/Luke documentation built on Aug. 30, 2022, 10:07 a.m.