fre2dat {confreq} | R Documentation |
Given a (response) pattern frequencies table this function returns a dataset representation of it.
fre2dat(x, fact = FALSE, ...)
x |
an object of class "matrix" which is a (response) pattern frequencies table. It is assumed, that the last column of the object |
fact |
logical, default is |
... |
additional parameters passed trough. This is an option to assign factor labels to the resulting WARNING using this option will only work correct when all 'pattern' columns (variables) in the frequencies table share the same number of categories |
No details
An object of class "matrix" or "data.frame" (depending on the argument fact
) containing the dataset representation of the (response) pattern frequencies table give in the argument x
.
No references in the moment
#######################################
data(LienertLSD)# loading example pattern frequencies table
fre2dat(LienertLSD)# coverting it into a (data) matrix
# for a matrix without colnames
colnames(LienertLSD)<-NULL # first removing the colnames
fre2dat(LienertLSD) # conversion with automatic new colnames
# requesting a data.frame using factor levels
fre2dat(LienertLSD,fact=TRUE,labels=c("yes","no"))