These functions convert all pairwise ratio tests between the matrix format and the data.frame format
Mp.DFp(DFp, col.noms = c( 1, 2 ), col.p = 'p')
The results in the other format: a matrix for Mp.DFp
and a
3-columns data.frame for DFp.Mp
.
In the matrix form, components will be sorted by alphabetical order.
Results in the data.frame format.
A length two character vector giving the columns in the data.frame format that contain the names of the two components of which the ratio is tested. If converting from a data.frame, can be given by number.
A length one character vector giving the column containing the p-values of the test in the data.frame format. If converting from a data.frame, can be given by number.
When converting a data.frame to a matrix, there is no control that all possible combinations are present once, and only once, in the data.frame. Missing combinations will have 0 in the matrix; combinations present several time will have the value of the last replicate.
When converting a matrix to a data.frame, the diagonal is not included in the data.frame. The matrix is expected to be symmetric, and only the upper right part is used.
Emmanuel Curis (emmanuel.curis@parisdescartes.fr)
The matrix format is more convenient for manipulations like finding cut-off probabilities or building the hierarchical tree of the components. However, it can only store one value per couple and is more memory consuming.
The data.frame format is more efficient for computations, since it
allows to store several results at once. It can also be easily saved
and read using text-files and read.table
or
write.table
. However, finding the hierarchical tree of
components or building the graph is not so straightforward.
These utilitary functions allow to convert between the two formats.
creer.Mp
to create a matrix of p-values for all
possible ratios of a compositional vector.
creer.DFp
to create a data.frame of p-values for
all possible ratios of a compositional vector.
# load the potery data set data( poteries )
Run the code above in your browser using DataLab