| dat2fre | R Documentation |
Given a dataset this function returns a (response) pattern frequencies table representation of it.
dat2fre( x, katorder = FALSE, caseorder = TRUE, kat = NULL, codes = NULL, wgt = NULL, ... )
x |
an object of class "matrix" or "data.frame". If |
katorder |
logical with default set to |
caseorder |
logical with default set to |
kat |
ignored when |
codes |
a list with character vectors containing coding for integers in matrix (if |
wgt |
a numerical vector of survey weights to weight the cases (rows) in |
... |
other parameters passed through to |
To use survey weights a vector of positive numeric values with length matching the number of rows in x must be assigned to the argument wgt. The individual case weights are then aggregated (respective sum of weights) for each pattern observed in the data (assigned to argument x).
An object of class c("data.frame","Pfreq") containing the (response) pattern frequencies table representation of the given dataset in the argument x.
No references in the moment
####################################### data(suicide)# loading data in data frame (702 cases) representation dat2fre(suicide) # converting it into a pattern frequencies table ########### ####################################### data(LienertLSD)# loading example pattern frequencies table .. test<-fre2dat(LienertLSD)# and coverting it into a simple (data) matrix test<-test[sample(c(1:65),65),] # making a messy order ############ dat2fre(test) # making a proper ordered pattern frequencies table again ##### try it with a data.frame too! #######################################
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.