rcharts

rChart in R Markdown doesn't render

孤街浪徒 提交于 2019-12-04 10:01:35
问题 I am having issues rendering an rChart made with 'nPlot' when I knit an R Markdown document to html. I followed the solution discussed in this question, but it was unsuccessful. Here is my .Rmd code ```{r, echo=FALSE} library(knitr) ``` --- title: "Untitled" author: "Test" date: "01/23/2015" output: html_document --- This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown

nvd3 scatterPlot with rCharts in R: Increase Font size of labels?

泪湿孤枕 提交于 2019-12-03 20:18:46
I am trying to increase the font size of the x and y axis in the plot created using NVD3 and rCharts. Here is my code for the plot. Any help is appreciated. n1 <- nPlot(pValues~Chr,data=dat,type="scatterChart",height=400,width=750) n1$chart(tooltipContent= "#! function(key, x, y, e){ return '<b>ID:</b> ' + e.point.ID } !#") n1$chart(forceY = c(0,8)) n1$chart(forceX = c(0,10)) #n1$chart(color = '#! function(d){return d.pValues} !#') n1$xAxis(axisLabel = 'Chromosome') n1$yAxis(axisLabel = '-log P value') timelyportfolio Actually, I think I discovered a solution thanks to this stack overflow

adjusting axis labels NVD3 graph in rCharts

安稳与你 提交于 2019-12-03 13:49:10
I am using the rCharts nPlot() function to display stacked or grouped bar charts given contingency table type data. The "multiBarChart" is displayed in a shiny application. A piece of the code that I use in my shiny application is given below. graphData <- reactive({ as.data.frame(table(eval(inputVar1()),eval(inputVar2()))) }) output$myChart <- renderChart({ p1 <- nPlot(Freq ~ Var1, group="Var2", data=graphData(), type="multiBarChart") p1$addParams(dom='myChart') return(p1) }) In my dataset, one categorical variable has 16 levels. When this variable is displayed along the x-axis of the

rCharts-How to add axis lables and Headings to NVD3 chart

早过忘川 提交于 2019-12-03 10:48:46
I am exploriing rCharts. I got stuck while adding Lables to Y axis and Headings. I am new to rCharts. This is my sample code require(rCharts) n2 <- nPlot(Hours ~ Month, group = "Task", data = cars, type = "multiBarChart", height = 900, width = 1110) n2$xAxis(axisLabel = 'Year and Month') n2 Please help. answer supplemented with title examples 2013-12-05 I cannot remember why nvd3 with rCharts does this but we have discovered this in this issue . The method suggested in that issue works, but using margin is probably the more robust method. I have put a quick example together of both ways. Let

Add values to rCharts hPlot tooltip

元气小坏坏 提交于 2019-12-03 07:42:55
I would like to add some extra values to the standard Highcharts tooltip via rCharts. Example code: require(rCharts) df <- data.frame(x = c(1:5), y = c(5:1), z = c("A", "B", "C", "D", "E"), name = c("K", "L", "M", "N", "O")) h1 <- hPlot(x = "x", y = "y", data = df, type = "scatter", group = "z") This generates a tooltip with the x and y values. And the series name z as title. Now I also want the to add the name values to the tooltip. However I have no idea how this is done. After several years, I have an answer. It seems like these wrapper functions like hPlot() does not support additional

rChart in R Markdown doesn't render

对着背影说爱祢 提交于 2019-12-03 03:49:54
I am having issues rendering an rChart made with 'nPlot' when I knit an R Markdown document to html. I followed the solution discussed in this question , but it was unsuccessful. Here is my .Rmd code ```{r, echo=FALSE} library(knitr) ``` --- title: "Untitled" author: "Test" date: "01/23/2015" output: html_document --- This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>. When you click the **Knit** button a document will be generated that includes both

RMarkdown and RCharts

♀尐吖头ヾ 提交于 2019-12-02 18:59:34
问题 When I run this RMarkdown code: --- title: "test" output: html_document --- ```{r cache=FALSE} library(rCharts) library(knitr) opts_chunk$set(comment = NA, results = "asis", comment = NA, tidy = F) 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$show('inline', include_assets = TRUE, cdn = TRUE) ``` I get this: http://rpubs.com/rajesh06

Set chart area background color in rCharts/slidify/nvd3

南笙酒味 提交于 2019-12-02 07:09:13
For the following slidify deck, --- title : Foo framework : revealjs # {io2012, html5slides, shower, dzslides, ...} revealjs : {theme: solarized} highlighter : highlight.js # {highlight.js, prettify, highlight} hitheme : tomorrow # widgets : [] # {mathjax, quiz, bootstrap} mode : selfcontained # {standalone, draft} ext_widgets : [libraries/nvd3] --- ## NVD3 Plot Iframe ```{r nvd3plot2, results = 'asis', comment = NA, message = F, echo = F} require(rCharts) n1 <- nPlot(mpg ~ wt, data = mtcars, type = 'scatterChart') n1 ``` I want to set the background color of the chart to white. I can do this

How to set highchart global options IN R

被刻印的时光 ゝ 提交于 2019-12-01 13:59:46
I see a lot of examples in javascript but I cannot find an example to do it in R Here is the api link: http://api.highcharts.com/highcharts#global I am trying to set "timezoneOffset" and I have tried many different ways. When I do this in R: highChart$global(timezoneOffset=-300) I do not get any warning or error, but it's not working. Thanks a lot for the help! Here is a piece of code: library(rCharts) highChart <- Highcharts$new() highChart$global(timezoneOffset=-300) highChart$chart(zoomType = "xy") highChart$exporting(enabled = T) highChart$xAxis(type="datetime",list( title = list(text =

“ERROR: path[1]=”“: No such file or directory” when publishing Parallel Coordinates Chart with Shiny

穿精又带淫゛_ 提交于 2019-12-01 13:17:36
I have a problem that seems to be quiet common but for which I haven't found a solution yet: When trying to publish a webapp using rCharts Parcoords, I get this error: ERROR: path[1]="": No such file or directory And the strange thing is that the app runs perfectly well on my laptop... Below is a simple version/example of the code that I'm using. Please note that you need to have downloaded the parcoords library and put it into the file where you're working before you run the code. Its path is supposed to be: "libraries/widgets/parcoords" Thank you in advance! :) ui.R: library(shiny) library