Reduces a data.frame into a frequency table with prespecified entries. Uses a modified version of the count function which also accepts weights.
Zero-entries can be included or excluded and the variables can be coerced into factors if necessary.
An ordered integer vector containing the indices of the colums to keep.
freqvar
Optional name of a frequency variable in V.
keep.zero
A logical indicating whether to include zero-cases in the output.
allfactor
A logical indicating whether to convert all variables into factor variables. Integer variables will be applied a fitting (non-lexicographic) level order.
return.type
The function is able to convert the output to a data.frame or table. The default is to use the same type as the input had.
Value
A data.frame including a "Freq" variable.
Details
This function uses count as a workhorse and offers additional arguments keep.zero and allfactor. Both raw datasets, datasets with a frequency variable and tables can be handled.