EcoGenetics (version 1.2.1-6)

eco.fill_ecogen_with_ecopop: Importation of ecopop to ecogen

Description

This function imports into an ecogen object the population data contained in ecopop object. The function assign the values of the data to each individual, according to the population of the individual.

Usage

eco.fill_ecogen_with_ecopop(
  from,
  to,
  pop,
  what = c("all", "XY", "P", "E", "C"),
  bind_columns = FALSE
)

Arguments

from

ecopop object.

to

ecogen object.

pop

Column in slot S of ecogen object, with the population of each individual.

what

Data frames to add into the the ecogen object. Can be one of c("all", "XY", "P", "E", "C")

bind_columns

Bind columns of the generated tables with the preexisting in the ecogen slots?

See Also

eco.fill_ecogen_with_df

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
data(eco.test)

# Example 1: add population data to ecogen object
result <- eco.fill_ecogen_with_ecopop(my_ecopop, eco, "pop")

# Example 2: Create ecogen object only with population data
out <- ecogen(S = eco[["S"]])
out <- eco.fill_ecogen_with_ecopop(my_ecopop, out, "pop")

# add the allele frequency data into the slot C with the function eco.add_popdata_into_ecogen
out <- eco.fill_ecogen_with_df(eco, "pop", c(1,2,3,4),  C = my_ecopop[["C"]])



# }
# NOT RUN {
# }

Run the code above in your browser using DataLab