nlsAddLines | R Documentation |
Adds lines of specific countries into the plot of the function nlsregression. nlsregression has to be based on magpie objects for x,y,weight
nlsAddLines(
y,
x,
countries = 1:5,
weight = NULL,
x_log10 = FALSE,
colors = "black",
labels = TRUE
)
y |
magpie object with y values |
x |
magpie object with x values |
countries |
Choice of countries |
weight |
magpie object with weight |
x_log10 |
same as in nlsregression |
colors |
colors of the lines |
labels |
If TRUE, the region, staryear and endyear will be plotted to each line. |
vector with ISO-countrycodes
Benjamin Leon Bodirsky
nlsregression
## Not run:
data(population_magpie)
nlsregression(y=population_magpie[,,1],x=population_magpie[,,2],
weight = population_magpie[,,1],func = y~a*x+b)
nlsAddLines(y=population_magpie[,,1],x=population_magpie[,,2],
weight = population_magpie[,,1],countries=1:3,colors=1:3)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.