An R package to create the Sankey or Ribbon plot.
Questions tagged [riverplot]
30 questions
1
vote
1 answer
Making a Sankey diagram in R for printing
I am trying to make a Sankey diagram using R for a printed report. I have currently used 2 methods to do this but neither is achieving quite what I wanted.
The first uses the Riverplot function and produces this:
My problems with this plot is that I…

B_Dabbler
- 183
- 8
1
vote
1 answer
modified sankey Plot with several edges between nodes
I would like to make a modified sankey plot in R, where it is possible to have several edges between nodes, to identify different paths. It is a bit hard to explain so I made sample picture in ppt :)
I know it is ugly :) but my point is that I…

user2335015
- 111
- 11
1
vote
0 answers
R River-Plot (Sankey Diagram) Not Displaying Correctly
I am investigating Sankey Diagrams via R's Riverplot package. However my output is not legible at all, and am sure am doing something wrong but am still quite new to R. Essentially, the data…

Tumaini Kilimba
- 195
- 2
- 15
1
vote
2 answers
Colors randomly assigned in R riverplot Sankey graph
I found the R riverplot package very handy to make Sankey/Minard charts. The output chart is great, including the position of the nodes and the width of the edges.
But, I have a problem with the colors. I assigned colors through a "col" column in…
Patrick Meyfroidt
1
vote
2 answers
Reshape data frame for consecutive years
I have data about thousands of customers who visited stores in the 3 past years.
For each customer, I have :
ID
Combination of a year and the first store visited in this year.
Customer_Id | Year_*_Store
1 2010_A
1 2011_B
1 …

Ophelie
- 713
- 1
- 6
- 11
0
votes
0 answers
riverplot on singlecell data gives the Error in edge_list[[nodes1[i]]]
I'm trying to create riverplot from two single-cell datasets, when I run the tutorial dataset it works but when I run my data I get the next error:
here is my code:
library(riverplot)
library(Seurat)
library(rliger)
output_path =…

Maya Ziv
- 1
0
votes
0 answers
How to create a river plot with numerical x axis
I would like to create a specific riverplot in R with a numerical x axis. The axis should be from 1 to 100 and the rivers of the "rivers" (which have categories connected to each other) would go until different numbers (in total 4 rivers each with 3…

eliza01
- 21
- 3
0
votes
0 answers
r: add text to plot without it getting cutoff
I'm playing with the riverplot package, and I'm trying to add text to the plot as labels for each period. I'd like to add the text at the bottom of the plot, but it gets cut off.
How can I add text near the parameter of a plot without it being…

PaulB
- 299
- 1
- 11
0
votes
1 answer
RiverPlot for biological Pathways
I am trying to plot a river plot to show how pathways are getting significant from disease stage-1 to stage-2 based on their p-value. I want to show the width of the flow of riverplot based on p-value in between two stages for the same pathway. For…

VIVEK RUHELA
- 11
- 3
0
votes
2 answers
Add title and axis labels to riverplot?
I'm trying to make a Sankey diagram using the riverplot package, and was wondering if it's possible to add a title and axis labels to the plot. To keep it simple I'll use one of the sample riverplots from the package:
nodes <- c( LETTERS[1:3]…

Mary
- 27
- 4
0
votes
2 answers
How to make my font size smaller in riverplot?
Finally figured out how to make my riverplot in R, now I'm wondering how to make my font size smaller?
library(riverplot)
#Bring in file of nodes and edges
nodes <- read_xlsx("riverplot_cell_p.xlsx", sheet = "nodes")
edges <-…

Shannon R
- 11
- 2
0
votes
1 answer
why is my riverplot so weird looking?
I'm trying to generate a riverplot, but the output that I have looks like the edges are coming from the wrong side of each bar which makes it difficult to interpret.
The data I'm using is:
edges:
N1 N2 Value
1 off off.1…

unknown
- 853
- 1
- 10
- 23
0
votes
1 answer
Error styles[[id]] : Indexing out of bounds in "riverplot" package
I am struggling to create a Sankey diagram using the package "riverplot". I did not manage to create a minimal toy example, so I have to include the riverplot object created by makeRiver() here. makeRiver did not throw any errors, so I thought it…

swolf
- 1,020
- 7
- 20
0
votes
2 answers
Sankey plot with the riverplot package
Enchanté.
EDIT: Solution
As pointed out by MartineJ and emilliman5, nodes should be uniquely labelled (below).
library("riverplot")
nodes<-structure(list(ID = c("2011+", "2011-", "2016+", "2016-"), x = c(20,
20, 30, 30), y = c(50, 40, 50, 40)),…

Darren Thomas
- 5
- 4
0
votes
2 answers
Sum items in sub-lists on categories they belong to, accross the main list
I would like to attach values to labels in a riverplot in R. This is the second (confusing) part of my problem that I decided to split to two questions first is: Sum each list of numerical values within a list
I have a list of lists of values, which…

Jacek Kotowski
- 620
- 16
- 49