R/gadget.R

Defines functions createGoogleGadget

Documented in createGoogleGadget

createGoogleGadget <- function(gvis){

  if(!"gvis" %in% class(gvis)){
    stop("A gvis object is as input required.")
  }
sprintf('<?xml version="1.0" encoding="UTF-8" ?> 
<Module>
  <ModulePrefs title="%s" />
  <Content type="html">
  <![CDATA[ 
   %s
  ]]> 
  </Content>
</Module>
',  gvis$chartid, paste(gvis$html$chart, collapse="\n") ) 
  
}

Try the googleVis package in your browser

Any scripts or data that you put into this service are public.

googleVis documentation built on March 7, 2023, 7:40 p.m.