暂无描述

Carl Ganz 00414f8df1 Fix readme 6 年之前
R 89bb47cf2b actually fix 7 年之前
inst 13e9a67299 rename shinyBarcode 7 年之前
man 65b93a2015 roxygen 7 年之前
.Rbuildignore cc860ad656 appveyor 7 年之前
.gitignore 645587e085 init 7 年之前
.travis.yml a511e7a998 travis 7 年之前
DESCRIPTION 76877b5d2b fix name 7 年之前
LICENSE 645587e085 init 7 年之前
NAMESPACE 65b93a2015 roxygen 7 年之前
README.Rmd 59a5123577 fix badges 7 年之前
README.md 00414f8df1 Fix readme 6 年之前
appveyor.yml cc860ad656 appveyor 7 年之前

README.Rmd

---
output: github_document
---



[![Travis-CI Build Status](https://travis-ci.org/CannaData/shinyBarcode.svg?branch=master)](https://travis-ci.org/CannaData/shinyBarcode)[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/CannaData/shinyBarcode?branch=master&svg=true)](https://ci.appveyor.com/project/CannaData/shinyBarcode)

```{r, echo = FALSE}
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>",
fig.path = "README-"
)
```

# shinyBarcode

The goal of `shinyBarcode` is to wrap the [JsBarcode](https://github.com/lindell/JsBarcode) library, written by Johan Lindell, for R. This enables rendering of barcodes in R Markdown and Shiny. This enables generating receipts in markdown, which can compiled to HTML with `rmarkdown`, and then printed using Google Cloud Print using [`googlePrintr`](https://github.com/CannaData/googlePrintr).

## Installation

You can install CannaBarcode from github with:

```{r gh-installation, eval = FALSE}
# install.packages("devtools")
devtools::install_github("CannaData/shinyBarcode")
```

## Example

### Shiny

```{R, eval = FALSE}
library(shiny)
library(CannaBarcode)

ui <- fluidPage(
# must include javascript dependencies
CannaBarcode::includeJsBarcode(cdn = TRUE),
numericInput("value", "Input a positive integer", 8675309, 0, 1000000),
CannaBarcode::barcodeOutput("barcode")
)

server <- function(input, output, session) {
output$barcode <- CannaBarcode::renderBarcode(
input$value
)
}

shinyApp(ui = ui, server = server)
```