Description Usage Arguments Value Examples
This is a simple function that creates a simple feature line from the horizont coordinates.
1 | line_mod(df_geom, line_attri, seed = 33)
|
df_geom |
A long table with the columns named "name", "x" and "y" (Id and coordinates) for each horizont. For example created by the cord_setting function |
line_attri |
A datan frame with the information about the lines which divide the horizons. The following columns must exist:
|
seed |
For replicable examples a seed can be set here |
This function returns a linestring simple feature. Each line represents the upper horizontal limit of the corresponding id.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## Example data
data_example <- data.frame(name = c(1, 2),
from1 = c(0,20),
to1 = c(20, 40)
)
##Coordination setting
cord_example <- cord_setting(data_example, plot_width = 3)
## Line attributes data frame:
lattri_example <- data.frame(name= unique(cord_example$name),
numberX = c(2, 10),
sd = c(1,1),
sm = c(TRUE, TRUE)
)
## Apply the line_mod fuction
line_example <- line_mod(df_geom = cord_example, line_attri = lattri_example)
## Plot simple feature geometry
plot(line_example$geometry)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.