Browse Source

hello ggplotly

pull/7/head
Carson Sievert 8 years ago
parent
commit
810be15752
  1. 2
      DESCRIPTION
  2. 3
      NAMESPACE
  3. 16
      R/geom2plotly.r
  4. 2
      R/stateface.r

2
DESCRIPTION

@ -28,6 +28,7 @@ Suggests:
knitr,
rmarkdown,
ggthemes,
plotly
Imports:
graphics,
grDevices,
@ -48,6 +49,7 @@ Collate:
'a-pokemon-colors.r'
'coord_proj.r'
'formatters.r'
'geom2plotly.r'
'geom_ash.r'
'geom_bkde.r'
'geom_bkde2d.r'

3
NAMESPACE

@ -38,6 +38,9 @@ export(stat_ash)
export(stat_bkde)
export(stat_bkde2d)
export(stat_xspline)
export(to_basic.GeomBkde2d)
export(to_basic.GeomStateface)
export(to_basic.GeomXspline)
import(KernSmooth)
import(MASS)
import(ash)

16
R/geom2plotly.r

@ -0,0 +1,16 @@
#' @export
to_basic.GeomXspline <- to_basic.GeomXspline2 <-
getFromNamespace("to_basic.GeomLine", asNamespace("plotly"))
#' @export
to_basic.GeomBkde2d <-
getFromNamespace("to_basic.GeomDensity2d", asNamespace("plotly"))
#' @export
to_basic.GeomStateface <- function(data, prestats_data, layout, params, p, ...) {
prefix_class(data, "GeomText")
}
prefix_class <- function(x, y) {
structure(x, class = unique(c(y, class(x))))
}

2
R/stateface.r

@ -22,7 +22,7 @@ show_stateface <- function() {
path <- normalizePath(file.path(system.file("fonts/", package="ggalt")))
print(path)
if (!interactive) return()
if (!interactive()) return()
if (.Platform$OS.type == "windows") {
shell(sprintf("explorer %s", path), intern=TRUE)

Loading…
Cancel
Save