Learn R Programming

EcoGenetics (version 1.2.1-3)

int.order: Ordering the rows of the data frames contained in an ecogen or ecopop object

Description

Ordering the rows of the data frames contained in an ecogen or ecopop object

Usage

int.order(eco)

Arguments

eco

Object of class "ecogen".

Details

This program generates an ecogen/ecopop object with the rows of all the data frames ordered using a reference row names vector. This is useful when the data frames are loaded into the n object, but were not ordered previously. Also, this tool can be useful for reorder rows when is needed. The program used the row names data that was set during the construction of the object. Then, the program then aligns all the data frames by coincidence of row names of the reference vector.

Examples

Run this code
# NOT RUN {
# }
# NOT RUN {
data(eco.test)
eco1 <- eco
eco1[["P"]] <- eco[["P"]][sample(1:225), ]  #object with shuffled rows
eco1[["E"]] <- eco[["E"]][sample(1:225), ]
ordered <- int.order(eco1)
head(ordered[["P"]]); head(eco[["P"]])

# }
# NOT RUN {
# }

Run the code above in your browser using DataLab