Skip to content

Commit

Permalink
minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
javierluraschi committed Oct 23, 2017
1 parent ded6c1c commit 55aeb19
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 14 deletions.
5 changes: 3 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
Package: pixels
Type: Package
Title: Tools for working with Pixels in R
Title: Tools for Working with Pixels in R
Version: 0.1.0
Authors@R: c(
person("Javier", "Luraschi", email = "[email protected]", role = c("aut", "cre")),
person(family = "RStudio", role = c("cph"))
)
Maintainer: Javier Luraschi <[email protected]>
Description: Provides tools to show and collect pixels in R.
Description: Provides tools to show and collect pixels using HTML widgets and
Shiny applications.
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
Expand Down
1 change: 1 addition & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Generated by roxygen2: do not edit by hand

export(get_pixels)
export(shiny_pixels_output)
export(shiny_render_pixels)
export(show_pixels)
import(htmlwidgets)
Expand Down
9 changes: 5 additions & 4 deletions R/pixels.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#' Show Pixels Widget
#' Show Pixels
#'
#' Creates an HTMLWidget to interact with pixels.
#' Creates an HTMLWidget to show pixels.
#'
#' @param pixels The pixels to render as a 1-dimensional vector, row-first
#' order expected.
Expand Down Expand Up @@ -66,6 +66,7 @@ show_pixels <- function(
#' @param width The width for this widget.
#' @param height The height for this widget.
#'
#' @export
shiny_pixels_output <- function(outputId, width = "100%", height = "400px") {
shinyWidgetOutput(outputId, "pixels", width, height, package = "pixels")
}
Expand All @@ -84,9 +85,9 @@ shiny_render_pixels <- function(expr, env = parent.frame(), quoted = FALSE) {
shinyRenderWidget(expr, shiny_pixels_output, env, quoted = TRUE)
}

#' Gets Pixels using a Shiny Gadget
#' Gets Pixels
#'
#' Creates an ShinyGadget to retrieve pixels as a vector.
#' Creates an ShinyGadget to retrieve pixels.
#'
#' @param pixels The pixels to render as a 1-dimensional vector, row-first
#' order expected.
Expand Down
2 changes: 1 addition & 1 deletion README.Rmd
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
title: "Tools for working with Pixels in R"
title: "Tools for Working with Pixels in R"
output:
github_document:
fig_width: 9
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Tools for working with Pixels in R
Tools for Working with Pixels in R
================

This package provides an `htmlwidget` and `shinywidget` to render and draw pixels with ease.
This package provides an [htmlwidget](http://www.htmlwidgets.org/) and [Shiny Gadget](https://shiny.rstudio.com/articles/gadgets.html) to render and draw pixels with ease.

To draw pixels run `get_pixels()` which will start a [Shiny Gadget](https://shiny.rstudio.com/articles/gadgets.html) to retrieve an array of numeric values representing each pixel in the image:
To draw pixels run `get_pixels()` which will start the gadget to retrieve an array of numeric values representing each pixel in the image:

``` r
library(pixels)
Expand Down
4 changes: 2 additions & 2 deletions man/get_pixels.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/show_pixels.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 55aeb19

Please sign in to comment.