-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwebsite.Rmd
54 lines (44 loc) · 1.81 KB
/
website.Rmd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
---
title: "The Compass R Package"
output:
html_document:
toc: true
toc_float: true
toc_depth: 4
---
```{r setup, include=FALSE}
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](https://github.com/MauroCE) for the personal portfolio of the [Statistical Computing 1](https://awllee.github.io/sc1-2019/) course delivered by [Anthony Lee](http://www.bristol.ac.uk/maths/people/anthony-w-lee/index.html) to first year PhD students in [Computational Statistics and Data Science](COMPASS) at the [University of Bristol](www.bris.ac.uk). What you are seeing now is an RMarkdown file that is part of the package repository and is deployed by [Travis CI](https://travis-ci.com) on [GitHub Pages](https://pages.github.com/).
The repository is hosted [here](https://github.com/MauroCE/compass).
### Installation
You can install the development version from [GitHub](https://github.com/) with:
```{r, eval=FALSE}
# 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
```{r, eval=FALSE}
# Attach the package
library(compass)
# Find the sum of the squares of two numbers
z <- sumsquares(2, 4)
```
```{r, echo=FALSE}
2^2 + 4^2
```
and transpose the head of a dataframe
```{r, eval=FALSE}
# and tilt the head of a dataframe
df <- data.frame(matrix(1:30, 10, 3))
tilted_head <- tilt_head(df, 3)
```
```{r, echo=FALSE}
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](LICENSE.md).