File: repr_plotly.r

package info (click to toggle)
r-cran-repr 1.1.7-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 356 kB
  • sloc: sh: 10; makefile: 2
file content (16 lines) | stat: -rw-r--r-- 468 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#' Representation as \link[plotly:plotly_json]{Plotly JSON}.
#' 
#' @param obj  The \link[plotly]{plot_ly} plot or \link[ggplot2]{ggplot} to create a representation for
#' @param ...  ignored
#' 
#' @name repr_plotly1.*
NULL

#' @importFrom jsonlite fromJSON
#' @name repr_plotly1.*
#' @export
repr_plotly1.plotly <- function(obj, ...) fromJSON(plotly::plotly_json(obj, jsonedit = FALSE))

#' @name repr_plotly1.*
#' @export
repr_plotly1.ggplot <- repr_plotly1.plotly