Skip to content

Instantly share code, notes, and snippets.

@noqqe
Created May 9, 2014 08:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save noqqe/850a4a6177c1cbd78f4c to your computer and use it in GitHub Desktop.
Save noqqe/850a4a6177c1cbd78f4c to your computer and use it in GitHub Desktop.
Plotly R-API Debug
diff --git a/R/plotly.R b/R/plotly.R
index 26aef68..0dda866 100644
--- a/R/plotly.R
+++ b/R/plotly.R
@@ -67,6 +67,8 @@ plotly <- function(username=NULL, key=NULL){
priv <- list()
pub$makecall <- function(args, kwargs, origin) {
+ cat("Given filename: ")
+ print(kwargs$filename)
if (is.null(kwargs$filename))
kwargs$filename <- pub$filename
if (is.null(kwargs$fileopt))
@@ -78,6 +80,8 @@ plotly <- function(username=NULL, key=NULL){
collapse = ""), un = pub$username, key = pub$key, origin = origin, kwargs = toJSON(kwargs,
collapse = ""))
resp <- fromJSON(respst, simplify = FALSE)
+ cat("JSON response: ")
+ print(resp)
if (!is.null(resp$filename))
pub$filename <- resp$filename
if (!is.null(resp$error))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment