A htmlwidget wrapper around Highcharts and Highstock APIs
JavaScript R
Switch branches/tags
Nothing to show
Clone or download
Latest commit e41c885 Jan 30, 2015
Permalink
Failed to load latest commit information.
R additions Jan 30, 2015
inst additions Jan 30, 2015
man additions Jan 30, 2015
.DS_Store first commit Jan 30, 2015
.gitignore first commit Jan 30, 2015
DESCRIPTION add htmlwidgets dependency Jan 30, 2015
DESCRIPTION~ first commit Jan 30, 2015
NAMESPACE additions Jan 30, 2015
NAMESPACE~ first commit Jan 30, 2015
README.md Add README.md Jan 30, 2015
README.md~ Add README.md Jan 30, 2015
highcharts.Rproj first commit Jan 30, 2015

README.md

highchartR

This is an early development version of the highchartR library, which is a htmlwidget wrapper around Highcharts and Highstock javascript graphing libraries (http://www.highcharts.com/demo).

Installation

The package is currently not available at CRAN, so you need devtools package for the installation. You can install the package as follows:

devtools::install_github('jcizel/highchartR')

There are two functions in the package that do most of the work: highcharts, which acts as a wrapper around the Highcharts library (http://api.highcharts.com/highcharts), and highstocks wraps the Highstock library (http://api.highcharts.com/highstock).

Examples

To be expanded..

Highcharts

data = mtcars
x = 'wt'
y = 'mpg'
group = 'cyl'

highcharts(
    data = data,
    x = x,
    y = y,
    group = group,
	type = 'scatter'
)

Highstock

library(data.table)
library(pipeR)
library(rlist)
library(quantmod)
library(dplyr)

symbols <- c("MSFT","C","AAPL")

symbols %>>%
list.map(
    get(getSymbols(.))
) %>>%
list.map(
    . %>>%
    as.data.frame %>>%
    mutate(
        name = .name,
        date = rownames(.)
    ) %>>%
    select(
        name,
        date,
        price = contains("close")
    ) %>>%
    data.table  
) %>>%
rbindlist ->
    data

highstocks(
    data = data,
    x = 'date',
    y = 'price',
    group = 'name'
)