Description Usage Arguments Details See Also Examples
print and summary method for "relate" class.
1 2 |
x |
an object of class "relate", usually, a result of a call to relate(). |
... |
further arguments passed to or from other methods. |
print.relate() tries to be smart about formatting four kinds of relate. summary.relate() tries to be smart about formatting four kinds of relate.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | ## Not run:
# If the target variable is a categorical variable
categ <- target_by(heartfailure, death_event)
# If the variable of interest is a categorical variable
cat_cat <- relate(categ, hblood_pressure)
# Print bins class object
cat_cat
summary(cat_cat)
## End(Not run)
# If the target variable is a categorical variable
categ <- target_by(heartfailure, death_event)
# If the variable of interest is a numerical variable
cat_num <- relate(categ, sodium)
cat_num
summary(cat_num)
# plot(cat_num)
# If the variable of interest is a categorical variable
cat_cat <- relate(categ, hblood_pressure)
cat_cat
summary(cat_cat)
# plot(cat_cat)
##---------------------------------------------------
# If the target variable is a numerical variable
num <- target_by(heartfailure, creatinine)
# If the variable of interest is a numerical variable
num_num <- relate(num, sodium)
num_num
summary(num_num)
# plot(num_num)
# If the variable of interest is a categorical variable
num_cat <- relate(num, smoking)
num_cat
summary(num_cat)
# plot(num_cat)
# Not allow typographic
# plot(num_cat, typographic = FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.