SlideShare a Scribd company logo
1 of 19
Some Examples in R- [Data Visualization--R graphics]
and others..
library(rpart.plot),library(rCharts),library(plyr),library(knitr),
library(reshape2),library(scales)
Reference:
https://github.com/ramnathv/rCharts/tree/master/inst/libraries
http://www.rpubs.com/dnchari/rcharts
rCharts package by Ramnath Vaidyanathan
Prepared by Volkan OBAN
CODES:
require(rCharts)##Example 1
names(iris)=gsub(".","",names(iris))
rPlot(SepalLength~SepalWidth|Species,data= iris,color= 'Species',type = 'point')
Example2-
## Example 2 FacettedBarplot
hair_eye = as.data.frame(HairEyeColor)
rPlot(Freq~Hair | Eye,color = 'Eye', data = hair_eye,type = 'bar')
Example3-
require(rCharts)
> names(iris) = gsub(".", "", names(iris))
> rPlot(SepalLength ~ SepalWidth | Species, data = iris, color = 'Speci
es', type = 'point')
> ## Example 2 Facetted Barplot
> hair_eye = as.data.frame(HairEyeColor)
> rPlot(Freq ~ Hair | Eye, color = 'Eye', data = hair_eye, type = '
bar')
> hair_eye = as.data.frame(HairEyeColor)
> p2 <- nPlot(Freq ~ Hair, group = 'Eye',
+ data = subset(hair_eye, Sex == "Female"),
+ type = 'multiBarChart'
+ )
> p2$chart(color = c('brown', 'blue', '#594c26', 'green'))
> p2
Example 4:
p <- nPlot(~ cyl, data = mtcars, type = 'pieChart')
> p$chart(donut = TRUE
> p5
Example 5:
data(economics, package = 'ggplot2')
> p <- nPlot(uempmed ~ date, data = economics, type = 'lineChart')
> p
Example6:
dat <- data.frame(
t = rep(0:23, each= 4),
var = rep(LETTERS[1:4],4),
val = round(runif(4*24,0,50)) )
p<- nPlot(val ~t,group = 'var', data = dat, type = 'stackedAreaChart',id='chart' )
p
Example 7:
require(rCharts)
> p1 <- rPlot(SOG ~ yearID, data = team_data,
+ type = "point",
+ size = list(const = 2),
+ color = list(const = "#888"),
+ tooltip = "#! function(item){
+ return item.SOG + ' ' + item.name + ' ' + item.yearID
+ } !#"
+ )
> p1
> myteam = "Boston Red Sox"
> p1$layer(data = team_data[team_data$name == myteam,],
+ color = list(const = 'red'),
+ copy_layer = T)
> p1$set(dom = 'chart3')
> p1
>
Example 8:
>
> library(rCharts)
> library(plyr)
> library(knitr)
> library(reshape2)
> library(scales)
> options(RCHART_WIDTH = 600, RCHART_HEIGHT = 400)
> knitr::opts_chunk$set(comment = NA, results = 'asis', tidy = F, message =
F)
> data(tips, package = 'reshape2')
p= rPlot(x = 'day', y = 'box(tip)', data = tips, type = 'box')
> p
nba = read.csv('http://datasets.flowingdata.com/ppg2008.csv')
> nba.m = ddply(melt(nba), .(variable), transform, rescale = rescale(value)
)
> p= rPlot(Name ~ variable, color = 'rescale', data = nba.m, type = 'tile',
height = 600)
> p
Example:
haireye = as.data.frame(HairEyeColor)
> dat = subset(haireye, Sex == "Female" & Eye == "Blue")
> haireye = as.data.frame(HairEyeColor)
> dat = subset(haireye, Sex == "Female" & Eye == "Blue")
> p1 = mPlot(x = 'Hair', y = list('Freq'), data = dat, type = 'Bar', labels = list("Cou
> p1
dat = subset(haireye, Sex == "Female")
p2 = mPlot(Freq ~ Eye, group = "Hair", data = dat, type = "Bar", labels = 1
:4)
p2
Example:
data(economics, package = 'ggplot2')
dat = transform(economics, date = as.character(date))
p3 <- mPlot(x = "date", y = list("psavert", "uempmed"), data = dat, type =
'Line',
pointSize = 0, lineWidth = 1)
p3$set(xLabelFormat = "#! function (x) {
return x.toString(); }
!#")
p3$set(type = 'Area')
p3
Example:
ecm = reshape2::melt(economics[,c('date', 'uempmed', 'psavert')], id = 'dat
e')
p7 = nPlot(value ~ date, group = 'variable', data = ecm, type = 'lineWithFo
cusChart')
p7$xAxis( tickFormat="#!function(d) {return d3.time.format('%b %Y')(new Dat
e( d * 86400000 ));}!#" )
p7
Example:
library(rpart.plot)
h= hPlot(x = "Wr.Hnd", y = "NW.Hnd", data = MASS::survey,
+ type = c("line", "bubble", "scatter"), group = "Clap", size =
"Age")
h
> map3 = Leaflet$new()
> map3$setView(c(41.7627, -72.6743), zoom = 13)
> map3$marker(c(41.7627, -72.6743), bindPopup = "<p> Hi. I am a popup </p>"
)
> map3$marker(c(41.70, -72.60), bindPopup = "<p> Hi. I am another popup </p
>")
> map3
> map3 = Leaflet$new()
> map3$setView(c(41.7627, -72.6743), zoom = 13)
> map3$marker(c(41.7627, -72.6743), bindPopup = "<p> Hi. I am a popup </p>"
)
> map3$marker(c(41.70, -72.60), bindPopup = "<p> Hi. I am another popup </p
>")
> map3
Example:
> map3 = Leaflet$new()
> map3$setView(c(41.7627, -72.6743), zoom = 13)
> map3$marker(c(41.7627, -72.6743), bindPopup = "<p> Hi. I am a popup </p>"
)
> map3$marker(c(41.70, -72.60), bindPopup = "<p> Hi. I am another popup </p
>")
> map3
Reference:
https://github.com/ramnathv/rCharts/tree/master/inst/libraries
http://www.rpubs.com/dnchari/rcharts
rCharts package by Ramnath Vaidyanathan

More Related Content

What's hot

Advanced Data Visualization Examples with R-Part II
Advanced Data Visualization Examples with R-Part IIAdvanced Data Visualization Examples with R-Part II
Advanced Data Visualization Examples with R-Part IIDr. Volkan OBAN
ย 
Cache and Drupal
Cache and DrupalCache and Drupal
Cache and DrupalKornel Lugosi
ย 
Wat.tf - Nati Cohen - DevOpsDays Tel Aviv 2018
Wat.tf - Nati Cohen - DevOpsDays Tel Aviv 2018Wat.tf - Nati Cohen - DevOpsDays Tel Aviv 2018
Wat.tf - Nati Cohen - DevOpsDays Tel Aviv 2018DevOpsDays Tel Aviv
ย 
Prgiลกฤe Lispa
Prgiลกฤe LispaPrgiลกฤe Lispa
Prgiลกฤe LispaSimon Belak
ย 
ะšะฐะบ ะฟะพะบะฐะทะฐั‚ัŒ 90 ะผะปะฝ ะบะฐั€ั‚ะธะฝะพะบ ะธ ัะพั…ั€ะฐะฝะธั‚ัŒ ะถะธะทะฝัŒ ะดะธัะบัƒ
ะšะฐะบ ะฟะพะบะฐะทะฐั‚ัŒ 90 ะผะปะฝ ะบะฐั€ั‚ะธะฝะพะบ ะธ ัะพั…ั€ะฐะฝะธั‚ัŒ ะถะธะทะฝัŒ ะดะธัะบัƒะšะฐะบ ะฟะพะบะฐะทะฐั‚ัŒ 90 ะผะปะฝ ะบะฐั€ั‚ะธะฝะพะบ ะธ ัะพั…ั€ะฐะฝะธั‚ัŒ ะถะธะทะฝัŒ ะดะธัะบัƒ
ะšะฐะบ ะฟะพะบะฐะทะฐั‚ัŒ 90 ะผะปะฝ ะบะฐั€ั‚ะธะฝะพะบ ะธ ัะพั…ั€ะฐะฝะธั‚ัŒ ะถะธะทะฝัŒ ะดะธัะบัƒะะฝะดั€ะตะน ะจะพั€ะธะฝ
ย 
ะšะฐะบ ะฟะพะบะฐะทะฐั‚ัŒ 90 ะผะปะฝ ะบะฐั€ั‚ะธะฝะพะบ ะธ ัะพั…ั€ะฐะฝะธั‚ัŒ ะถะธะทะฝัŒ ะดะธัะบัƒ
ะšะฐะบ ะฟะพะบะฐะทะฐั‚ัŒ 90 ะผะปะฝ ะบะฐั€ั‚ะธะฝะพะบ ะธ ัะพั…ั€ะฐะฝะธั‚ัŒ ะถะธะทะฝัŒ ะดะธัะบัƒะšะฐะบ ะฟะพะบะฐะทะฐั‚ัŒ 90 ะผะปะฝ ะบะฐั€ั‚ะธะฝะพะบ ะธ ัะพั…ั€ะฐะฝะธั‚ัŒ ะถะธะทะฝัŒ ะดะธัะบัƒ
ะšะฐะบ ะฟะพะบะฐะทะฐั‚ัŒ 90 ะผะปะฝ ะบะฐั€ั‚ะธะฝะพะบ ะธ ัะพั…ั€ะฐะฝะธั‚ัŒ ะถะธะทะฝัŒ ะดะธัะบัƒCEE-SEC(R)
ย 
Advanced Data Visualization in R- Somes Examples.
Advanced Data Visualization in R- Somes Examples.Advanced Data Visualization in R- Somes Examples.
Advanced Data Visualization in R- Somes Examples.Dr. Volkan OBAN
ย 
LINE iOS้–‹็™บใงๅฎŸ่ทตใ—ใฆใ„ใ‚‹Git tips
LINE iOS้–‹็™บใงๅฎŸ่ทตใ—ใฆใ„ใ‚‹Git tipsLINE iOS้–‹็™บใงๅฎŸ่ทตใ—ใฆใ„ใ‚‹Git tips
LINE iOS้–‹็™บใงๅฎŸ่ทตใ—ใฆใ„ใ‚‹Git tipsLINE Corporation
ย 
Zf Zend Db by aida
Zf Zend Db by aidaZf Zend Db by aida
Zf Zend Db by aidawaraiotoko
ย 
R seminar dplyr package
R seminar dplyr packageR seminar dplyr package
R seminar dplyr packageMuhammad Nabi Ahmad
ย 
้‡ๅ›žๅธฐ่ทไบบใฎๆœใฏๆ—ฉใ„
้‡ๅ›žๅธฐ่ทไบบใฎๆœใฏๆ—ฉใ„้‡ๅ›žๅธฐ่ทไบบใฎๆœใฏๆ—ฉใ„
้‡ๅ›žๅธฐ่ทไบบใฎๆœใฏๆ—ฉใ„Masahiro Hayashi
ย 
Py lecture5 python plots
Py lecture5 python plotsPy lecture5 python plots
Py lecture5 python plotsYoshiki Satotani
ย 
Hive Poster
Hive PosterHive Poster
Hive Posterragho
ย 
pROgRAN C++ ApLiKaSI Binery tree
pROgRAN C++ ApLiKaSI Binery treepROgRAN C++ ApLiKaSI Binery tree
pROgRAN C++ ApLiKaSI Binery treeNaufal R Pradana
ย 
JSDC 2014 - functional java script, why or why not
JSDC 2014 - functional java script, why or why notJSDC 2014 - functional java script, why or why not
JSDC 2014 - functional java script, why or why notChengHui Weng
ย 
Building a horizontally scalable API in php
Building a horizontally scalable API in phpBuilding a horizontally scalable API in php
Building a horizontally scalable API in phpWade Womersley
ย 

What's hot (20)

Advanced Data Visualization Examples with R-Part II
Advanced Data Visualization Examples with R-Part IIAdvanced Data Visualization Examples with R-Part II
Advanced Data Visualization Examples with R-Part II
ย 
Cache and Drupal
Cache and DrupalCache and Drupal
Cache and Drupal
ย 
Chapter7
Chapter7Chapter7
Chapter7
ย 
Wat.tf - Nati Cohen - DevOpsDays Tel Aviv 2018
Wat.tf - Nati Cohen - DevOpsDays Tel Aviv 2018Wat.tf - Nati Cohen - DevOpsDays Tel Aviv 2018
Wat.tf - Nati Cohen - DevOpsDays Tel Aviv 2018
ย 
Prgiลกฤe Lispa
Prgiลกฤe LispaPrgiลกฤe Lispa
Prgiลกฤe Lispa
ย 
ะšะฐะบ ะฟะพะบะฐะทะฐั‚ัŒ 90 ะผะปะฝ ะบะฐั€ั‚ะธะฝะพะบ ะธ ัะพั…ั€ะฐะฝะธั‚ัŒ ะถะธะทะฝัŒ ะดะธัะบัƒ
ะšะฐะบ ะฟะพะบะฐะทะฐั‚ัŒ 90 ะผะปะฝ ะบะฐั€ั‚ะธะฝะพะบ ะธ ัะพั…ั€ะฐะฝะธั‚ัŒ ะถะธะทะฝัŒ ะดะธัะบัƒะšะฐะบ ะฟะพะบะฐะทะฐั‚ัŒ 90 ะผะปะฝ ะบะฐั€ั‚ะธะฝะพะบ ะธ ัะพั…ั€ะฐะฝะธั‚ัŒ ะถะธะทะฝัŒ ะดะธัะบัƒ
ะšะฐะบ ะฟะพะบะฐะทะฐั‚ัŒ 90 ะผะปะฝ ะบะฐั€ั‚ะธะฝะพะบ ะธ ัะพั…ั€ะฐะฝะธั‚ัŒ ะถะธะทะฝัŒ ะดะธัะบัƒ
ย 
ะšะฐะบ ะฟะพะบะฐะทะฐั‚ัŒ 90 ะผะปะฝ ะบะฐั€ั‚ะธะฝะพะบ ะธ ัะพั…ั€ะฐะฝะธั‚ัŒ ะถะธะทะฝัŒ ะดะธัะบัƒ
ะšะฐะบ ะฟะพะบะฐะทะฐั‚ัŒ 90 ะผะปะฝ ะบะฐั€ั‚ะธะฝะพะบ ะธ ัะพั…ั€ะฐะฝะธั‚ัŒ ะถะธะทะฝัŒ ะดะธัะบัƒะšะฐะบ ะฟะพะบะฐะทะฐั‚ัŒ 90 ะผะปะฝ ะบะฐั€ั‚ะธะฝะพะบ ะธ ัะพั…ั€ะฐะฝะธั‚ัŒ ะถะธะทะฝัŒ ะดะธัะบัƒ
ะšะฐะบ ะฟะพะบะฐะทะฐั‚ัŒ 90 ะผะปะฝ ะบะฐั€ั‚ะธะฝะพะบ ะธ ัะพั…ั€ะฐะฝะธั‚ัŒ ะถะธะทะฝัŒ ะดะธัะบัƒ
ย 
Advanced Data Visualization in R- Somes Examples.
Advanced Data Visualization in R- Somes Examples.Advanced Data Visualization in R- Somes Examples.
Advanced Data Visualization in R- Somes Examples.
ย 
strings and objects in JavaScript
strings and  objects in JavaScriptstrings and  objects in JavaScript
strings and objects in JavaScript
ย 
LINE iOS้–‹็™บใงๅฎŸ่ทตใ—ใฆใ„ใ‚‹Git tips
LINE iOS้–‹็™บใงๅฎŸ่ทตใ—ใฆใ„ใ‚‹Git tipsLINE iOS้–‹็™บใงๅฎŸ่ทตใ—ใฆใ„ใ‚‹Git tips
LINE iOS้–‹็™บใงๅฎŸ่ทตใ—ใฆใ„ใ‚‹Git tips
ย 
Database api
Database apiDatabase api
Database api
ย 
Zf Zend Db by aida
Zf Zend Db by aidaZf Zend Db by aida
Zf Zend Db by aida
ย 
R seminar dplyr package
R seminar dplyr packageR seminar dplyr package
R seminar dplyr package
ย 
้‡ๅ›žๅธฐ่ทไบบใฎๆœใฏๆ—ฉใ„
้‡ๅ›žๅธฐ่ทไบบใฎๆœใฏๆ—ฉใ„้‡ๅ›žๅธฐ่ทไบบใฎๆœใฏๆ—ฉใ„
้‡ๅ›žๅธฐ่ทไบบใฎๆœใฏๆ—ฉใ„
ย 
Py lecture5 python plots
Py lecture5 python plotsPy lecture5 python plots
Py lecture5 python plots
ย 
Hive Poster
Hive PosterHive Poster
Hive Poster
ย 
R meets Hadoop
R meets HadoopR meets Hadoop
R meets Hadoop
ย 
pROgRAN C++ ApLiKaSI Binery tree
pROgRAN C++ ApLiKaSI Binery treepROgRAN C++ ApLiKaSI Binery tree
pROgRAN C++ ApLiKaSI Binery tree
ย 
JSDC 2014 - functional java script, why or why not
JSDC 2014 - functional java script, why or why notJSDC 2014 - functional java script, why or why not
JSDC 2014 - functional java script, why or why not
ย 
Building a horizontally scalable API in php
Building a horizontally scalable API in phpBuilding a horizontally scalable API in php
Building a horizontally scalable API in php
ย 

Similar to Some Examples in R- [Data Visualization--R graphics]

A Shiny Example-- R
A Shiny Example-- RA Shiny Example-- R
A Shiny Example-- RDr. Volkan OBAN
ย 
library(sparkline)
library(sparkline)library(sparkline)
library(sparkline)Dr. Volkan OBAN
ย 
Implementing virtual machines in go & c 2018 redux
Implementing virtual machines in go & c 2018 reduxImplementing virtual machines in go & c 2018 redux
Implementing virtual machines in go & c 2018 reduxEleanor McHugh
ย 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with ClojureDmitry Buzdin
ย 
A Survey Of R Graphics
A Survey Of R GraphicsA Survey Of R Graphics
A Survey Of R GraphicsDataspora
ย 
Perl6 Regexen: Reduce the line noise in your code.
Perl6 Regexen: Reduce the line noise in your code.Perl6 Regexen: Reduce the line noise in your code.
Perl6 Regexen: Reduce the line noise in your code.Workhorse Computing
ย 
Spark_Documentation_Template1
Spark_Documentation_Template1Spark_Documentation_Template1
Spark_Documentation_Template1Nagavarunkumar Kolla
ย 
ggtimeseries-->ggplot2 extensions
ggtimeseries-->ggplot2 extensions ggtimeseries-->ggplot2 extensions
ggtimeseries-->ggplot2 extensions Dr. Volkan OBAN
ย 
Php functions
Php functionsPhp functions
Php functionsJIGAR MAKHIJA
ย 
Big Data Analytics with Scala at SCALA.IO 2013
Big Data Analytics with Scala at SCALA.IO 2013Big Data Analytics with Scala at SCALA.IO 2013
Big Data Analytics with Scala at SCALA.IO 2013Samir Bessalah
ย 
Implementing Software Machines in C and Go
Implementing Software Machines in C and GoImplementing Software Machines in C and Go
Implementing Software Machines in C and GoEleanor McHugh
ย 
JBUG 11 - Scala For Java Programmers
JBUG 11 - Scala For Java ProgrammersJBUG 11 - Scala For Java Programmers
JBUG 11 - Scala For Java ProgrammersTikal Knowledge
ย 
R (Shiny Package) - Server Side Code for Decision Support System
R (Shiny Package) - Server Side Code for Decision Support SystemR (Shiny Package) - Server Side Code for Decision Support System
R (Shiny Package) - Server Side Code for Decision Support SystemMaithreya Chakravarthula
ย 
PHP record- with all programs and output
PHP record- with all programs and outputPHP record- with all programs and output
PHP record- with all programs and outputKavithaK23
ย 
Spark by Adform Research, Paulius
Spark by Adform Research, PauliusSpark by Adform Research, Paulius
Spark by Adform Research, PauliusVasil Remeniuk
ย 
Achieving Parsing Sanity In Erlang
Achieving Parsing Sanity In ErlangAchieving Parsing Sanity In Erlang
Achieving Parsing Sanity In ErlangSean Cribbs
ย 
Imugi: Compiler made with Python
Imugi: Compiler made with PythonImugi: Compiler made with Python
Imugi: Compiler made with PythonHan Lee
ย 
Abap basics 01
Abap basics 01Abap basics 01
Abap basics 01yours4ever002
ย 

Similar to Some Examples in R- [Data Visualization--R graphics] (20)

A Shiny Example-- R
A Shiny Example-- RA Shiny Example-- R
A Shiny Example-- R
ย 
library(sparkline)
library(sparkline)library(sparkline)
library(sparkline)
ย 
Implementing virtual machines in go & c 2018 redux
Implementing virtual machines in go & c 2018 reduxImplementing virtual machines in go & c 2018 redux
Implementing virtual machines in go & c 2018 redux
ย 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with Clojure
ย 
A Survey Of R Graphics
A Survey Of R GraphicsA Survey Of R Graphics
A Survey Of R Graphics
ย 
Joclad 2010 d
Joclad 2010 dJoclad 2010 d
Joclad 2010 d
ย 
Perl6 Regexen: Reduce the line noise in your code.
Perl6 Regexen: Reduce the line noise in your code.Perl6 Regexen: Reduce the line noise in your code.
Perl6 Regexen: Reduce the line noise in your code.
ย 
Spark_Documentation_Template1
Spark_Documentation_Template1Spark_Documentation_Template1
Spark_Documentation_Template1
ย 
ggtimeseries-->ggplot2 extensions
ggtimeseries-->ggplot2 extensions ggtimeseries-->ggplot2 extensions
ggtimeseries-->ggplot2 extensions
ย 
Php functions
Php functionsPhp functions
Php functions
ย 
Big Data Analytics with Scala at SCALA.IO 2013
Big Data Analytics with Scala at SCALA.IO 2013Big Data Analytics with Scala at SCALA.IO 2013
Big Data Analytics with Scala at SCALA.IO 2013
ย 
Implementing Software Machines in C and Go
Implementing Software Machines in C and GoImplementing Software Machines in C and Go
Implementing Software Machines in C and Go
ย 
JBUG 11 - Scala For Java Programmers
JBUG 11 - Scala For Java ProgrammersJBUG 11 - Scala For Java Programmers
JBUG 11 - Scala For Java Programmers
ย 
R for you
R for youR for you
R for you
ย 
R (Shiny Package) - Server Side Code for Decision Support System
R (Shiny Package) - Server Side Code for Decision Support SystemR (Shiny Package) - Server Side Code for Decision Support System
R (Shiny Package) - Server Side Code for Decision Support System
ย 
PHP record- with all programs and output
PHP record- with all programs and outputPHP record- with all programs and output
PHP record- with all programs and output
ย 
Spark by Adform Research, Paulius
Spark by Adform Research, PauliusSpark by Adform Research, Paulius
Spark by Adform Research, Paulius
ย 
Achieving Parsing Sanity In Erlang
Achieving Parsing Sanity In ErlangAchieving Parsing Sanity In Erlang
Achieving Parsing Sanity In Erlang
ย 
Imugi: Compiler made with Python
Imugi: Compiler made with PythonImugi: Compiler made with Python
Imugi: Compiler made with Python
ย 
Abap basics 01
Abap basics 01Abap basics 01
Abap basics 01
ย 

More from Dr. Volkan OBAN

Conference Paper:IMAGE PROCESSING AND OBJECT DETECTION APPLICATION: INSURANCE...
Conference Paper:IMAGE PROCESSING AND OBJECT DETECTION APPLICATION: INSURANCE...Conference Paper:IMAGE PROCESSING AND OBJECT DETECTION APPLICATION: INSURANCE...
Conference Paper:IMAGE PROCESSING AND OBJECT DETECTION APPLICATION: INSURANCE...Dr. Volkan OBAN
ย 
Covid19py Python Package - Example
Covid19py  Python Package - ExampleCovid19py  Python Package - Example
Covid19py Python Package - ExampleDr. Volkan OBAN
ย 
Object detection with Python
Object detection with Python Object detection with Python
Object detection with Python Dr. Volkan OBAN
ย 
Python - Rastgele Orman(Random Forest) Parametreleri
Python - Rastgele Orman(Random Forest) ParametreleriPython - Rastgele Orman(Random Forest) Parametreleri
Python - Rastgele Orman(Random Forest) ParametreleriDr. Volkan OBAN
ย 
Linear Programming wiฬ‡th R - Examples
Linear Programming wiฬ‡th R - ExamplesLinear Programming wiฬ‡th R - Examples
Linear Programming wiฬ‡th R - ExamplesDr. Volkan OBAN
ย 
"optrees" package in R and examples.(optrees:finds optimal trees in weighted ...
"optrees" package in R and examples.(optrees:finds optimal trees in weighted ..."optrees" package in R and examples.(optrees:finds optimal trees in weighted ...
"optrees" package in R and examples.(optrees:finds optimal trees in weighted ...Dr. Volkan OBAN
ย 
k-means Clustering in Python
k-means Clustering in Pythonk-means Clustering in Python
k-means Clustering in PythonDr. Volkan OBAN
ย 
Naive Bayes Example using R
Naive Bayes Example using  R Naive Bayes Example using  R
Naive Bayes Example using R Dr. Volkan OBAN
ย 
R forecasting Example
R forecasting ExampleR forecasting Example
R forecasting ExampleDr. Volkan OBAN
ย 
k-means Clustering and Custergram with R
k-means Clustering and Custergram with Rk-means Clustering and Custergram with R
k-means Clustering and Custergram with RDr. Volkan OBAN
ย 
Data Science and its Relationship to Big Data and Data-Driven Decision Making
Data Science and its Relationship to Big Data and Data-Driven Decision MakingData Science and its Relationship to Big Data and Data-Driven Decision Making
Data Science and its Relationship to Big Data and Data-Driven Decision MakingDr. Volkan OBAN
ย 
Data Visualization with R.ggplot2 and its extensions examples.
Data Visualization with R.ggplot2 and its extensions examples.Data Visualization with R.ggplot2 and its extensions examples.
Data Visualization with R.ggplot2 and its extensions examples.Dr. Volkan OBAN
ย 
Scikit-learn Cheatsheet-Python
Scikit-learn Cheatsheet-PythonScikit-learn Cheatsheet-Python
Scikit-learn Cheatsheet-PythonDr. Volkan OBAN
ย 
Python Pandas for Data Science cheatsheet
Python Pandas for Data Science cheatsheet Python Pandas for Data Science cheatsheet
Python Pandas for Data Science cheatsheet Dr. Volkan OBAN
ย 
Pandas,scipy,numpy cheatsheet
Pandas,scipy,numpy cheatsheetPandas,scipy,numpy cheatsheet
Pandas,scipy,numpy cheatsheetDr. Volkan OBAN
ย 
ReporteRs package in R. forming powerpoint documents-an example
ReporteRs package in R. forming powerpoint documents-an exampleReporteRs package in R. forming powerpoint documents-an example
ReporteRs package in R. forming powerpoint documents-an exampleDr. Volkan OBAN
ย 
ReporteRs package in R. forming powerpoint documents-an example
ReporteRs package in R. forming powerpoint documents-an exampleReporteRs package in R. forming powerpoint documents-an example
ReporteRs package in R. forming powerpoint documents-an exampleDr. Volkan OBAN
ย 
R-ggplot2 package Examples
R-ggplot2 package ExamplesR-ggplot2 package Examples
R-ggplot2 package ExamplesDr. Volkan OBAN
ย 
R Machine Learning packages( generally used)
R Machine Learning packages( generally used)R Machine Learning packages( generally used)
R Machine Learning packages( generally used)Dr. Volkan OBAN
ย 
treemap package in R and examples.
treemap package in R and examples.treemap package in R and examples.
treemap package in R and examples.Dr. Volkan OBAN
ย 

More from Dr. Volkan OBAN (20)

Conference Paper:IMAGE PROCESSING AND OBJECT DETECTION APPLICATION: INSURANCE...
Conference Paper:IMAGE PROCESSING AND OBJECT DETECTION APPLICATION: INSURANCE...Conference Paper:IMAGE PROCESSING AND OBJECT DETECTION APPLICATION: INSURANCE...
Conference Paper:IMAGE PROCESSING AND OBJECT DETECTION APPLICATION: INSURANCE...
ย 
Covid19py Python Package - Example
Covid19py  Python Package - ExampleCovid19py  Python Package - Example
Covid19py Python Package - Example
ย 
Object detection with Python
Object detection with Python Object detection with Python
Object detection with Python
ย 
Python - Rastgele Orman(Random Forest) Parametreleri
Python - Rastgele Orman(Random Forest) ParametreleriPython - Rastgele Orman(Random Forest) Parametreleri
Python - Rastgele Orman(Random Forest) Parametreleri
ย 
Linear Programming wiฬ‡th R - Examples
Linear Programming wiฬ‡th R - ExamplesLinear Programming wiฬ‡th R - Examples
Linear Programming wiฬ‡th R - Examples
ย 
"optrees" package in R and examples.(optrees:finds optimal trees in weighted ...
"optrees" package in R and examples.(optrees:finds optimal trees in weighted ..."optrees" package in R and examples.(optrees:finds optimal trees in weighted ...
"optrees" package in R and examples.(optrees:finds optimal trees in weighted ...
ย 
k-means Clustering in Python
k-means Clustering in Pythonk-means Clustering in Python
k-means Clustering in Python
ย 
Naive Bayes Example using R
Naive Bayes Example using  R Naive Bayes Example using  R
Naive Bayes Example using R
ย 
R forecasting Example
R forecasting ExampleR forecasting Example
R forecasting Example
ย 
k-means Clustering and Custergram with R
k-means Clustering and Custergram with Rk-means Clustering and Custergram with R
k-means Clustering and Custergram with R
ย 
Data Science and its Relationship to Big Data and Data-Driven Decision Making
Data Science and its Relationship to Big Data and Data-Driven Decision MakingData Science and its Relationship to Big Data and Data-Driven Decision Making
Data Science and its Relationship to Big Data and Data-Driven Decision Making
ย 
Data Visualization with R.ggplot2 and its extensions examples.
Data Visualization with R.ggplot2 and its extensions examples.Data Visualization with R.ggplot2 and its extensions examples.
Data Visualization with R.ggplot2 and its extensions examples.
ย 
Scikit-learn Cheatsheet-Python
Scikit-learn Cheatsheet-PythonScikit-learn Cheatsheet-Python
Scikit-learn Cheatsheet-Python
ย 
Python Pandas for Data Science cheatsheet
Python Pandas for Data Science cheatsheet Python Pandas for Data Science cheatsheet
Python Pandas for Data Science cheatsheet
ย 
Pandas,scipy,numpy cheatsheet
Pandas,scipy,numpy cheatsheetPandas,scipy,numpy cheatsheet
Pandas,scipy,numpy cheatsheet
ย 
ReporteRs package in R. forming powerpoint documents-an example
ReporteRs package in R. forming powerpoint documents-an exampleReporteRs package in R. forming powerpoint documents-an example
ReporteRs package in R. forming powerpoint documents-an example
ย 
ReporteRs package in R. forming powerpoint documents-an example
ReporteRs package in R. forming powerpoint documents-an exampleReporteRs package in R. forming powerpoint documents-an example
ReporteRs package in R. forming powerpoint documents-an example
ย 
R-ggplot2 package Examples
R-ggplot2 package ExamplesR-ggplot2 package Examples
R-ggplot2 package Examples
ย 
R Machine Learning packages( generally used)
R Machine Learning packages( generally used)R Machine Learning packages( generally used)
R Machine Learning packages( generally used)
ย 
treemap package in R and examples.
treemap package in R and examples.treemap package in R and examples.
treemap package in R and examples.
ย 

Recently uploaded

Call Girls Bannerghatta Road Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Ser...amitlee9823
ย 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
ย 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusTimothy Spann
ย 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Researchmichael115558
ย 
Call Girls Indiranagar Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Service B...
Call Girls Indiranagar Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Service B...Call Girls Indiranagar Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Service B...
Call Girls Indiranagar Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Service B...amitlee9823
ย 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% SecurePooja Nehwal
ย 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
ย 
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxBPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxMohammedJunaid861692
ย 
Vip Model Call Girls (Delhi) Karol Bagh 9711199171โœ”๏ธBody to body massage wit...
Vip Model  Call Girls (Delhi) Karol Bagh 9711199171โœ”๏ธBody to body massage wit...Vip Model  Call Girls (Delhi) Karol Bagh 9711199171โœ”๏ธBody to body massage wit...
Vip Model Call Girls (Delhi) Karol Bagh 9711199171โœ”๏ธBody to body massage wit...shivangimorya083
ย 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxolyaivanovalion
ย 
Call Girls Hsr Layout Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Service Ba...amitlee9823
ย 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxolyaivanovalion
ย 
Call Girls in Sarai Kale Khan Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9205541914 ๐Ÿ”( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9205541914 ๐Ÿ”( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9205541914 ๐Ÿ”( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9205541914 ๐Ÿ”( Delhi) Escorts S...Delhi Call girls
ย 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxJohnnyPlasten
ย 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...SUHANI PANDEY
ย 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionfulawalesam
ย 
Chintamani Call Girls: ๐Ÿ“ 7737669865 ๐Ÿ“ High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: ๐Ÿ“ 7737669865 ๐Ÿ“ High Profile Model Escorts | Bangalore ...Chintamani Call Girls: ๐Ÿ“ 7737669865 ๐Ÿ“ High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: ๐Ÿ“ 7737669865 ๐Ÿ“ High Profile Model Escorts | Bangalore ...amitlee9823
ย 
Zuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptxZuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptxolyaivanovalion
ย 

Recently uploaded (20)

Call Girls Bannerghatta Road Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Ser...
ย 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
ย 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and Milvus
ย 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
ย 
Call Girls Indiranagar Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Service B...
Call Girls Indiranagar Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Service B...Call Girls Indiranagar Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Service B...
Call Girls Indiranagar Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Service B...
ย 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
ย 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
ย 
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptxBPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
BPAC WITH UFSBI GENERAL PRESENTATION 18_05_2017-1.pptx
ย 
Vip Model Call Girls (Delhi) Karol Bagh 9711199171โœ”๏ธBody to body massage wit...
Vip Model  Call Girls (Delhi) Karol Bagh 9711199171โœ”๏ธBody to body massage wit...Vip Model  Call Girls (Delhi) Karol Bagh 9711199171โœ”๏ธBody to body massage wit...
Vip Model Call Girls (Delhi) Karol Bagh 9711199171โœ”๏ธBody to body massage wit...
ย 
Mature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptxMature dropshipping via API with DroFx.pptx
Mature dropshipping via API with DroFx.pptx
ย 
Call Girls Hsr Layout Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call ๐Ÿ‘— 7737669865 ๐Ÿ‘— Top Class Call Girl Service Ba...
ย 
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
ย 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptx
ย 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
ย 
Call Girls in Sarai Kale Khan Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9205541914 ๐Ÿ”( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9205541914 ๐Ÿ”( Delhi) Escorts S...Call Girls in Sarai Kale Khan Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9205541914 ๐Ÿ”( Delhi) Escorts S...
Call Girls in Sarai Kale Khan Delhi ๐Ÿ’ฏ Call Us ๐Ÿ”9205541914 ๐Ÿ”( Delhi) Escorts S...
ย 
Log Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptxLog Analysis using OSSEC sasoasasasas.pptx
Log Analysis using OSSEC sasoasasasas.pptx
ย 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
ย 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interaction
ย 
Chintamani Call Girls: ๐Ÿ“ 7737669865 ๐Ÿ“ High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: ๐Ÿ“ 7737669865 ๐Ÿ“ High Profile Model Escorts | Bangalore ...Chintamani Call Girls: ๐Ÿ“ 7737669865 ๐Ÿ“ High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: ๐Ÿ“ 7737669865 ๐Ÿ“ High Profile Model Escorts | Bangalore ...
ย 
Zuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptxZuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptx
ย 

Some Examples in R- [Data Visualization--R graphics]

  • 1. Some Examples in R- [Data Visualization--R graphics] and others.. library(rpart.plot),library(rCharts),library(plyr),library(knitr), library(reshape2),library(scales) Reference: https://github.com/ramnathv/rCharts/tree/master/inst/libraries http://www.rpubs.com/dnchari/rcharts rCharts package by Ramnath Vaidyanathan Prepared by Volkan OBAN
  • 2. CODES: require(rCharts)##Example 1 names(iris)=gsub(".","",names(iris)) rPlot(SepalLength~SepalWidth|Species,data= iris,color= 'Species',type = 'point') Example2- ## Example 2 FacettedBarplot hair_eye = as.data.frame(HairEyeColor) rPlot(Freq~Hair | Eye,color = 'Eye', data = hair_eye,type = 'bar')
  • 3. Example3- require(rCharts) > names(iris) = gsub(".", "", names(iris)) > rPlot(SepalLength ~ SepalWidth | Species, data = iris, color = 'Speci es', type = 'point') > ## Example 2 Facetted Barplot > hair_eye = as.data.frame(HairEyeColor) > rPlot(Freq ~ Hair | Eye, color = 'Eye', data = hair_eye, type = ' bar') > hair_eye = as.data.frame(HairEyeColor) > p2 <- nPlot(Freq ~ Hair, group = 'Eye', + data = subset(hair_eye, Sex == "Female"), + type = 'multiBarChart' + ) > p2$chart(color = c('brown', 'blue', '#594c26', 'green')) > p2
  • 4. Example 4: p <- nPlot(~ cyl, data = mtcars, type = 'pieChart') > p$chart(donut = TRUE > p5
  • 5. Example 5: data(economics, package = 'ggplot2') > p <- nPlot(uempmed ~ date, data = economics, type = 'lineChart') > p
  • 6. Example6: dat <- data.frame( t = rep(0:23, each= 4), var = rep(LETTERS[1:4],4), val = round(runif(4*24,0,50)) ) p<- nPlot(val ~t,group = 'var', data = dat, type = 'stackedAreaChart',id='chart' ) p
  • 7.
  • 8.
  • 9. Example 7: require(rCharts) > p1 <- rPlot(SOG ~ yearID, data = team_data, + type = "point", + size = list(const = 2), + color = list(const = "#888"), + tooltip = "#! function(item){ + return item.SOG + ' ' + item.name + ' ' + item.yearID + } !#" + ) > p1
  • 10. > myteam = "Boston Red Sox" > p1$layer(data = team_data[team_data$name == myteam,], + color = list(const = 'red'), + copy_layer = T) > p1$set(dom = 'chart3') > p1 >
  • 11. Example 8: > > library(rCharts) > library(plyr) > library(knitr) > library(reshape2) > library(scales) > options(RCHART_WIDTH = 600, RCHART_HEIGHT = 400) > knitr::opts_chunk$set(comment = NA, results = 'asis', tidy = F, message = F) > data(tips, package = 'reshape2') p= rPlot(x = 'day', y = 'box(tip)', data = tips, type = 'box') > p
  • 12. nba = read.csv('http://datasets.flowingdata.com/ppg2008.csv') > nba.m = ddply(melt(nba), .(variable), transform, rescale = rescale(value) ) > p= rPlot(Name ~ variable, color = 'rescale', data = nba.m, type = 'tile', height = 600) > p
  • 13. Example: haireye = as.data.frame(HairEyeColor) > dat = subset(haireye, Sex == "Female" & Eye == "Blue") > haireye = as.data.frame(HairEyeColor) > dat = subset(haireye, Sex == "Female" & Eye == "Blue") > p1 = mPlot(x = 'Hair', y = list('Freq'), data = dat, type = 'Bar', labels = list("Cou > p1
  • 14. dat = subset(haireye, Sex == "Female") p2 = mPlot(Freq ~ Eye, group = "Hair", data = dat, type = "Bar", labels = 1 :4) p2
  • 15. Example: data(economics, package = 'ggplot2') dat = transform(economics, date = as.character(date)) p3 <- mPlot(x = "date", y = list("psavert", "uempmed"), data = dat, type = 'Line', pointSize = 0, lineWidth = 1) p3$set(xLabelFormat = "#! function (x) { return x.toString(); } !#") p3$set(type = 'Area') p3
  • 16. Example: ecm = reshape2::melt(economics[,c('date', 'uempmed', 'psavert')], id = 'dat e') p7 = nPlot(value ~ date, group = 'variable', data = ecm, type = 'lineWithFo cusChart') p7$xAxis( tickFormat="#!function(d) {return d3.time.format('%b %Y')(new Dat e( d * 86400000 ));}!#" ) p7
  • 17. Example: library(rpart.plot) h= hPlot(x = "Wr.Hnd", y = "NW.Hnd", data = MASS::survey, + type = c("line", "bubble", "scatter"), group = "Clap", size = "Age") h > map3 = Leaflet$new() > map3$setView(c(41.7627, -72.6743), zoom = 13) > map3$marker(c(41.7627, -72.6743), bindPopup = "<p> Hi. I am a popup </p>" ) > map3$marker(c(41.70, -72.60), bindPopup = "<p> Hi. I am another popup </p >") > map3 > map3 = Leaflet$new() > map3$setView(c(41.7627, -72.6743), zoom = 13) > map3$marker(c(41.7627, -72.6743), bindPopup = "<p> Hi. I am a popup </p>" ) > map3$marker(c(41.70, -72.60), bindPopup = "<p> Hi. I am another popup </p >") > map3
  • 18. Example: > map3 = Leaflet$new() > map3$setView(c(41.7627, -72.6743), zoom = 13) > map3$marker(c(41.7627, -72.6743), bindPopup = "<p> Hi. I am a popup </p>" ) > map3$marker(c(41.70, -72.60), bindPopup = "<p> Hi. I am another popup </p >") > map3