I get the following error using the steamgraph package
library(streamgraph)
streamgraph(data, "Keys" ,"Box.Office", date = 11-11-2011, interactive=TRUE)
Error in .subset(x, j) : invalid subscript type 'list'
Sample of the data:
days;Box.Office;Key
1; 2324234;Lucy
2; 123123;Lucy
3; 898989;Lucy
.....
1; 231231;Interstellar
2; 32423;Interstellar
First thing first, there is a typo in your code:
Keysshould beKeyand theinteractiveargument is set toTRUEby default, you do not need to specify it.Most likely the problem is that
streamgraphdoes not know how to deal with thedayscolumn, in fact if you change thedayscolumn with something (numeric or character) that can be converted toas.Dateit works well.The example of the official page show that all example do have column (numeric or character) that can be interpreted as valid date, furthermore you can explore the body of the function with just typing
streamgraphin R and you'll see more closely what it does.With the provided data, to allow function work you need other informations. Here is an example where I have converted the
dayscolumn to dates. It works well and produce the plot.just use this data: