Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
corrected mistake with n1 and added code to embed in slidify
  • Loading branch information
elmerehbi committed May 8, 2015
commit b4b8d15b64e9859faa743675f32988bbf017761e
10 changes: 7 additions & 3 deletions 9_DEVDATAPROD/Developing Data Products Course Notes HTML.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -335,12 +335,16 @@ grid.raster(readPNG("figures/5.png"))
* rChart objects have various attributes/functions that you can use when saved `n1 <- nplot(...)`
- `n1$` + TAB in R Console brings up list of all functions contained in the object
- `n1$html()` = prints out the HTML for the plot
- `n1$save(filename)` = embeds code into slidify document
- `n1$save("filename.html")` = saves result to a file named "filename.html"
- `cat(embeds code into slidify document
- `n1$print()` = print out the JavaScript
- `n1$show("inline", include_assets = TRUE, cdn = F)` = embed HTML/JS code directly with in Rmd file (for HTML output)
- `n1$publish('plotname', host = 'gist'/'rpubs')` = publishes the plot under the specified `plotname` as a `gist` or to `rpubs`
* to use with ***slidify***, the following YAML (Yet Another Markup Language/YAML Ain't Markup Language) must be added
- `yaml ext_widgets : {rCharts: ["libraries/nvd3"]}`
* to use with ***slidify***,
- the following YAML (Yet Another Markup Language/YAML Ain't Markup Language) must be added
- `yaml ext_widgets : {rCharts: ["libraries/nvd3"]}`
- `cat('<iframe src="map3.html" width=100%, height=600></iframe>')` to embed a map or chart form a saved file (saved with: `map3$save('map3.html', cdn = TRUE)`)


### Example

Expand Down
8 changes: 5 additions & 3 deletions 9_DEVDATAPROD/Developing Data Products Course Notes.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -334,12 +334,14 @@ $\pagebreak$
* rChart objects have various attributes/functions that you can use when saved `n1 <- nplot(...)`
- `n1$` + TAB in R Console brings up list of all functions contained in the object
- `n1$html()` = prints out the HTML for the plot
- `n1$save(filename)` = embeds code into slidify document
- `n1$save("filename.html")` = saves result to a file named "filename.html"
- `n1$print()` = print out the JavaScript
- `n1$show("inline", include_assets = TRUE, cdn = F)` = embed HTML/JS code directly with in Rmd file (for HTML output)
- `n1$publish('plotname', host = 'gist'/'rpubs')` = publishes the plot under the specified `plotname` as a `gist` or to `rpubs`
* to use with ***slidify***, the following YAML (Yet Another Markup Language/YAML Ain't Markup Language) must be added
- `yaml ext_widgets : {rCharts: ["libraries/nvd3"]}`
* to use with ***slidify***,
- the following YAML (Yet Another Markup Language/YAML Ain't Markup Language) must be added
- `yaml ext_widgets : {rCharts: ["libraries/nvd3"]}`
- `cat('<iframe src="map3.html" width=100%, height=600></iframe>')` to embed a map or chart form a saved file (saved with: `map3$save('map3.html', cdn = TRUE)`)

### Example

Expand Down