Description Usage Arguments Author(s) Examples
These functions converts the genetic data of an ecogen object in a gstudio data frame or viceversa.
1 2 3 4 5 6 7 8 9 | ecogen2gstudio(from, type = c("codominant", "dominant"))
gstudio2ecogen(
from,
ID = "ID",
lat = "Latitude",
lon = "Longitude",
struct = NULL
)
|
from |
Input object of class "ecogen" or "gstudio" (depending the direction of conversion) |
type |
The type of data: "codominant" (for codominant data); "dominant" for presence - absence data. |
ID |
name of the column with ID (default "ID") |
lat |
name of the column with latitude (default "Latitude") |
lon |
name of the column with longitude (default "Longitude") |
struct |
vector with name of the columns with structures (default NULL) |
Leandro Roser learoser@gmail.com
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
data(eco.test)
togstudio <- ecogen2gstudio(eco, type = "codominant")
togstudio
toeco <- gstudio2ecogen(togstudio, ID = "ID", lat = "Latitude",
lon = "Longitude", struct = "pop")
toeco
# as ID, Latitude and Longitude are column names in the <togstudio> data frame
# (that match default parameter values for gstudio2ecogen),
# the latter is identical to this:
toeco <- gstudio2ecogen(togstudio, struct = "pop")
toeco
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.