| dichot | R Documentation |
Function to dichotomize the input data for the semigroup construction with a cutoff value.
dichot(x, c = 1, diag)
x |
An array, matrix or other data in a numeric form. |
c |
A cutoff value to perform the dichotomization in |
diag |
(optional and logical, default |
This is a wrapper of the replace base function where in this case
is aimed to specify a cutoff value for the dichotomization of the data.
Values equal or higher to the cutoff are hence converted to 1, while the others are set to 0.
Notice that the cutoff value in c can be any real number, and labels are preserved after the dichotomization..
Binary values of the input data with the same format as x.
replace, mnplx, semigroup.
# create two binary relations among three elements
arr <- round( replace( array(runif(18), c(3,3,2)), array(runif(18),
c(3,3,2))>.5, 3 ) )
# dichotomize it with a cutoff value of two
dichot(arr, c = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.