-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathREADME.Rmd
58 lines (42 loc) · 1.41 KB
/
README.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
55
56
57
58
---
output: github_document
---
<!-- README.md is generated from README.Rmd. Please edit that file -->
```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```
[![Build Status](https://travis-ci.org/CannaData/zintr.svg?branch=master)](https://travis-ci.org/CannaData/zintr)
[![Coverage Status](https://img.shields.io/codecov/c/github/CannaData/zintr/master.svg)](https://codecov.io/github/CannaData/zintr?branch=master)
# zintr
The goal of zintr is to provide barcode printing functionality to R using the Zint C library.
## Installation
You can install zintr from github with:
```{r gh-installation, eval = FALSE}
# install.packages("devtools")
devtools::install_github("CannaData/zintr")
```
But you will need to install Zint first. See [Zint documentation](http://www.zint.org.uk/Manual.aspx?type=p&page=2) for OS specific instructions. For Linux you can easily install with git and cmake:
```{bash, eval = FALSE}
git clone https://github.com/zint/zint.git zint
cd zint
mkdir build
cd build
cmake ..
make
sudo make install
sudo cp /usr/local/lib/libzint.* /usr/lib
```
## Example
This is a basic example which shows you how to solve a common problem:
```{r example, eval = FALSE}
library(zintr)
barcode_print(8675309, "barcode1.png")
barcode_print("Hello World", "barcode2.png")
```
![8675309](inst/examples/barcode1.png)
<br>
![Hello World](inst/examples/barcode2.png)