knitr::opts_chunk$set(echo = TRUE)

What is the compass R package?

The compass R package is a toy package made by Mauro Camara Escudero for the personal portfolio of the Statistical Computing 1 course delivered by Anthony Lee to first year PhD students in Computational Statistics and Data Science at the University of Bristol. What you are seeing now is an RMarkdown file that is part of the package repository and is deployed by Travis CI on GitHub Pages.

The repository is hosted here.

Installation

You can install the development version from GitHub with:

# install.packages("devtools")
devtools::install_github("MauroCE/compass")

Examples

The compass package is extremely powerful and flexible, so the following examples are here only to give a taster of its full capabilities. With the compass package we can sum the squares of two numbers

# Attach the package
library(compass)
# Find the sum of the squares of two numbers
z <- sumsquares(2, 4)
2^2 + 4^2

and transpose the head of a dataframe

# and tilt the head of a dataframe
df <- data.frame(matrix(1:30, 10, 3))
tilted_head <- tilt_head(df, 3)
t(head(data.frame(matrix(1:30, 10, 3)), 3))

and that's it.

License

This project is licensed under the terms of the MIT license. The full license can be found here.



MauroCE/compass documentation built on Oct. 30, 2019, 9:22 p.m.