Comments (10)
Fix now updating setDataProvider
method.
from ramcharts.
@bthieurmel I still found this error when I use the latest dev version, could you take a another look?
`R version 3.2.1 (2015-06-18)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1
locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252
[3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C
[5] LC_TIME=English_United States.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] digest_0.6.8 rAmCharts_1.1.3 httr_1.1.0 jsonlite_0.9.16
[5] taucharts_0.4.4.9000 ADAP.Util_0.5.0 tidyr_0.4.1 dplyr_0.4.3.9001
[9] shinyBS_0.61 shinydashboard_0.5.1 shinyAce_0.2.1 DT_0.1.45
[13] rpivotTable_0.1.5.9 shiny_0.13.1.9000
loaded via a namespace (and not attached):
[1] Rcpp_0.12.3 pipeR_0.6.0.6 RColorBrewer_1.1-2 RJDBC_0.2-4
[5] tools_3.2.1 RSQLite_1.0.0 lattice_0.20-31 DBI_0.3.1
[9] rstudioapi_0.5 yaml_2.1.13 curl_0.9.2 rJava_0.9-6
[13] knitr_1.12.3 htmlwidgets_0.5.2 devtools_1.6.1 grid_3.2.1
[17] data.table_1.9.6 R6_2.0.1 magrittr_1.5 htmltools_0.3
[21] rlist_0.4.5.1 assertthat_0.1 mime_0.3 xtable_1.7-4
[25] httpuv_1.3.3 lazyeval_0.1.10 chron_2.3-45 zoo_1.7-11 `
from ramcharts.
Clean & restart your session to be sure that the package is updated.
Normally, all of this working :
require(rAmCharts)
require(dplyr)
require(data.table)
data(data_gdp)
amPieChart(valueField = 'gdp', titleField = 'country',
dataProvider = data_gdp)
amPieChart(valueField = 'gdp', titleField = 'country',
dataProvider = data.table(data_gdp))
amPieChart(valueField = 'gdp', titleField = 'country',
dataProvider = tbl_df(data_gdp))
amPieChart(valueField = 'gdp', titleField = 'country') %>%
setDataProvider(data_gdp)
amPieChart(valueField = 'gdp', titleField = 'country') %>%
setDataProvider(data.table(data_gdp))
amPieChart(valueField = 'gdp', titleField = 'country') %>%
setDataProvider(tbl_df(data_gdp))
from ramcharts.
In R/tools_amTests.R you have the following code, which is causing such problem I guess
stop(paste0("class(", arg, ") is not in c('data.frame', 'data.table', 'tbl')"))
should be tbl_df not just tbl
In addition, I learned that instead of using not %in%, inherits(data, 'data.frame') is a cleaner solution.
from ramcharts.
This code is just the error message, not the control. Every thing seems to work for me with current version, using amFunctions
or not, and data.frame
, data.table
, tbl_df
or tbl_dt
.
If not, using the latest version, please send us a concrete example on which you have an error.
from ramcharts.
I reinstalled the dev version, please find the below minimal example that fail:
library(dplyr)
library(tidyr)
library(rAmCharts)
src <- frame_data(
~Quarter,~Stage,~Qty,
'01','A',0,
'02','A',0,
'03','A',3,
'01','B',13,
'02','B',200,
'03','B',41
) %>% spread(Stage,Qty,fill = 0)
amBarplot(x='Quarter',y= c('A','B'),data = src, stack_type = 'regular')
Error msg:
Error in .testFormatData(data) : class(data) is not in c('data.frame', 'data.table', 'tbl')
Note once data frame ran through spread() function, it lost the 'tbl' in its class
from ramcharts.
Thanks. This example work for me with dplyr_0.4.3
and tidyr_0.4.1
. This packages cause numerous bugs with classes and functions S4. In my case, src have class "tbl_df" "tbl" "data.frame"
after spread()
function
from ramcharts.
Mine is on tidyr_0.4.1.9000 dplyr_0.4.3.9001
That's why using inherit(dat,'data.frame') seems to be safer.
from ramcharts.
I think (I hope...!) the problem is now resolved for both version of dplyr
.
from ramcharts.
Thanks, new release works on the code I provided.
from ramcharts.
Related Issues (20)
- Setting Axis via minimum and maximum properties not working HOT 7
- amTimeSeries, different hours are grouped at the same hour on the x-axis ? HOT 2
- pieChart with broken slices
- Functionality to create Time-lapse animation in rAmCharts HOT 3
- Display message when amCharts renders a chart onto screen HOT 1
- Compatibility with IE HOT 1
- jquery slider with rAmChart HOT 1
- amBoxplot with formula in shiny not working HOT 2
- Issue with amTimeSeries (groupToPeriods) HOT 1
- Example of stacked area / line chart? HOT 4
- amTimeSeries dont work with time < minute HOT 1
- multiple value axes HOT 1
- [Question] hyperlink on waterfall chart
- Default handling of date/time basis dataset for amStockMultiSet
- amchart v4 ? HOT 3
- how to apply my paid license on rAmchart
- [Question] Number formatting ? HOT 1
- Number formatting for amAngularGauge() HOT 1
- Error when calling plot()
- donut pie legend entries: sorting doesn't work
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ramcharts.