Description Usage Arguments Value Note Author(s) See Also Examples
This function calculates best fit plotting coordinates to enable rivers to be shown on river charts. The output is a list, which can be used when plotting the river chart and the information on the river chart. It provides an opportunity to change the coordinates and other plotting parameters before actually plotting.
1 2 | RiverLayout(river, length, parent, position, distance, row = NA,
direction = 1, margin = 0.5)
|
river |
a vector of river names. |
length |
a vector of river lengths. |
parent |
a vector of river parents. The parent of a river is the river into which it flows. The parent of the main stream is "NA". |
position |
a vector of river positions. The river position indicates its position relative to its parent - whether it is a left bank river, right bank river or main stream. The left bank river is on the left when looking downstream of its parent. The right bank river is on the right when looking downstream of its parent. The value of position can be "R", "L" or "M". For the main stream, the value is "M". |
distance |
a vector of distances denotes the distance between the mouths of each river and the mouths of each river's parent. |
row |
a vector of row numbers. The main stream is on row 0. In the river chart, rivers with negative row numbers are plotted below the main stream while rivers with positive row numbers are plotted above the main stream. If a value for row is provided, the rivers will be plotted according to the provided row numbers. If a value for row is not provided, a vector of best fit row numbers will be calculated before plotting. |
direction |
a value. In the river chart, rivers flow from right to left
( |
margin |
a value. The margin height between rivers in the topological
plot. By default, |
The RiverLayout
returns a list containing the data for river
chart plotting. The list includes,
riverdata |
a data frame. This
contains input vectors |
H.MAX |
the number of river rows. |
H.SIZE |
the height of each river row in the topological plot. |
W.MAX |
the width of river layout, in the same units
as |
W.SIZE |
the reciprocal of
|
X1 |
normalised x-coordinate of river mouths. |
X2 |
normalised x-coordinate of river sources. |
Y |
normalised y-coordinate of rivers. |
direction |
flow direction. Rivers flow from
right to left ( |
There is one and only one mainstream input for each function call.
Feng Mao
1 2 3 4 5 6 7 8 9 10 11 12 13 | data(Ballinderry)
# River flows right
riverlayout <- RiverLayout(B.river$River,B.river$Length,
B.river$Parent,B.river$Position,
B.river$Distance, direction = -1)
# River flows left
riverlayout.left <- RiverLayout(B.river$River,B.river$Length,
B.river$Parent,B.river$Position,
B.river$Distance)
str(riverlayout)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.