unique_labels will generate a dataframe with color and plotting character specification out of a sample table definition.
unique_labels(sam =NULL, g =NULL)
Arguments
sam: Sample table.
g: Either column name from sam containing factor column or factor of same length as sam.
Returns
Dataframe with group levels names and their color and plotting character specification.
Details
If a color/symbol specification exists for a sample set containing replicate groups this function will help in retrieving this information per group which is useful in boxplot or legend functions (cf. examples).
Examples
sam <- MetabolomicsBasics::sam
unique_labels(sam = sam, g ="GT")