Skip to content

Commit

Permalink
Code clean up for CRAN
Browse files Browse the repository at this point in the history
  • Loading branch information
bwlewis committed Apr 26, 2017
1 parent 227fcdd commit d25d0e4
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 10 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Title: Interactive 3D Scatter Plots, Networks and Globes
Description: Create interactive 3D scatter plots, network plots, and
globes using the 'three.js' visualization library ("http://threejs.org").
Version: 0.3.0
Date: 2016-12-30
Date: 2017-04-26
Authors@R: c(
person("B. W.", "Lewis", role=c("aut","cre"), email="[email protected]"),
person(given="Three.js authors", role="cph", comment="three.js JavaScript library"),
Expand Down
2 changes: 2 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ export(scatterplot3js)
export(scatterplotThreeOutput)
export(texture)
importFrom(base64enc,dataURI)
importFrom(grDevices,col2rgb)
importFrom(grDevices,rgb)
importFrom(htmlwidgets,shinyRenderWidget)
importFrom(htmlwidgets,shinyWidgetOutput)
importFrom(igraph,E)
Expand Down
2 changes: 1 addition & 1 deletion R/globe.R
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@
#' arcsHeight=0.3, arcsLwd=2, arcsColor="#ffff00", arcsOpacity=0.15,
#' atmosphere=TRUE, color="#00aaff", pointsize=0.5)
#'
#' \dontrun{
#' # Plot populous world cities from the maps package.
#' library(threejs)
#' library(maps)
Expand All @@ -111,7 +112,6 @@
#' lat=cities$lat, long=cities$long,
#' value=value, color=col)
#'
#' \dontrun{
#' # Plot a high-resolution NASA MODIS globe, setting colors to more closely reproduce
#' # the natural image colors. Note that this example can can take a while to download!
#' globejs("http://goo.gl/GVjxJ")
Expand Down
4 changes: 2 additions & 2 deletions R/scatterplot.R
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@
#' \item{"from"}{ A numeric vector of indices of line starting vertices corresponding to entries in \code{x}.}
#' \item{"to"}{ A numeric vector exactly as long as \code{from} of indices of line ending vertices corresponding
#' to entries in \code{x}.}
#' \item{"lcol"}{ Either a single color value or vector of values as long as \code{from}; line colors
#' \item{"lcol"}{ Either a single color value or vector of values as long as from; line colors
#' default to interpolating their vertex point colors.}
#' \item{"lwd"}{ A single numeric value of line width (for all lines), defaults to 1.}
#' \item{"linealpha"}{ A single numeric value between 0 and 1 inclusive setting the transparency of all plot lines,
Expand Down Expand Up @@ -443,7 +443,7 @@ points3d <- function(s, ...)
#' @param s A scatterplot object returned by \code{\link{scatterplot3js}}.
#' @param from A vector of integer indices of starting points.
#' @param to A vector of integer indices of ending points of the same length as \code{from}.
#' @param color Either a single color value or vector of values as long as from of line colors; line colors default to interpolating their vertex point colors.
#' @param color Either a single color value or vector of values as long as \code{from} of line colors; line colors default to interpolating their vertex point colors.
#' @param lwd A single numeric value of line width (applies to all lines).
#' @param alpha A single numeric value of line alpha (applies to all lines).
#' @return A new scatterplot htmlwidget object.
Expand Down
6 changes: 4 additions & 2 deletions R/utilities.R
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,10 @@ gopts <- function(g)
ans
}

# internal color format parser
# return a list of 3-hex-digit color values and scalar numeric alpha values
#' A basic internal color format parser
#' @param x a character-valued color name
#' @return a list of 3-hex-digit color values and scalar numeric alpha values
#' @importFrom grDevices col2rgb rgb
gcol <- function(x)
{
if (is.null(x)) return(list(color=NULL, alpha=NULL))
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,5 @@ For detailed help on the widgets and additional examples, see
<img src="https://travis-ci.org/bwlewis/rthreejs.svg?branch=master" alt="Travis CI status"></img>
</a>
[![codecov.io](https://codecov.io/github/bwlewis/rthreejs/coverage.svg?branch=master)](https://codecov.io/github/bwlewis/rthreejs?branch=master)
[![CRAN version](http://www.r-pkg.org/badges/version/threejs)](https://cran.r-project.org/packages=threejs)
[![CRAN version](http://www.r-pkg.org/badges/version/threejs)]
![](http://cranlogs.r-pkg.org/badges/threejs)
2 changes: 1 addition & 1 deletion man/globejs.Rd

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

2 changes: 1 addition & 1 deletion man/lines3d.Rd

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

2 changes: 1 addition & 1 deletion man/scatterplot3js.Rd

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

0 comments on commit d25d0e4

Please sign in to comment.