Description Usage Arguments Value
This function takes in a dataframe representing a single categorical/numerical group. based on the different types of data the input dataframe representing, it will perform different processure like cut, recode and etc and return a indicator matirx
1 | byType(dat, types, reqs)
|
dat |
a dataframe representing a single categorical or numerical group to be processed |
types |
representing the types of the input variable, possible values: "factor", "numeric","logic". if factor: recode the factors into different groups if numeric: cut the numeric variables into factors if logic(indicator matrix): group different factors if needed |
reqs |
rules as string for recode/cut/group based on the different types of input variable if factor: examples as "c(0)='No';c(1,2,3,4)='Yes'", recode 0 into 'No', recode 1,2,3,4 into 'Yes' if numeric: input the cuts if logic(indicator matrix): input the categories to be grouped together |
A dataframe of the indicator matrix
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.