Description Usage Arguments Author(s) See Also Examples
View source: R/fill_ecogen_with_pop.R
This function imports into an ecogen object the population data contained in a series of data frames. These data frames can be used to fill the slots XY, P, E and C.
1 2 3 4 5 6 7 8 9 10 |
from |
ecogen object |
pop |
Name of the column of the slot S with populations. |
pop_levels |
Vector with the name of the populations for each row of the input data frames. These populations must correspond to the levels of the column of the slot S used for the argument pop. |
XY |
Population data for slot XY. Defaul NULL. |
P |
Population data for slot P. Defaul NULL. |
E |
Population data for slot E. Defaul NULL. |
C |
Population data for slot C. Defaul NULL. |
bind_columns |
Bind columns of the generated tables with the preexisting in the ecogen slots? Default FALSE (overwrite the slot). |
Leandro Roser learoser@gmail.com
eco.fill_ecogen_with_ecopop
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | ## Not run:
data(eco.test)
# create some population data
to_ecopop <- ecogen2ecopop(eco, "pop")
XY_pop <- to_ecopop[["XY"]]
P_pop <- to_ecopop[["P"]]
E_pop <- to_ecopop[["E"]]
# Add only XY data to the ecogen object
object_with_pop_data <- eco.fill_ecogen_with_df(eco, "pop", c(1,2,3,4),
XY = XY_pop)
# Add all the population data to the ecogen object
object_with_pop_data <- eco.fill_ecogen_with_df(eco, "pop", c(1,2,3,4),
XY = XY_pop, P = P_pop, E = E_pop)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.