Learn R Programming

SAFD (version 2.1)

translator: Translator

Description

The function first calls checking2 in order to check if the input data X defines a polygonal fuzzy number. If all conditions are satisfied the function transforms the input X into a dataframe with the chosen number nl of levels (default is nl=101) by doing linear interpolation, and returns this dataframe.

Usage

translator(X, nl = 101, pic = 0)

Arguments

X

...dataframe for which checking2 yields 1

nl

...number of levels of the output dataframe (fuzzy number), by default 101, must be at least 2.

pic

...numeric, if pic=1 then the poligonal fuzzy number X with nl alpha-levels is printed. By default pic=0.

Value

In case checking2(X)=1 translator returns a dataframe (fuzzy number) with nl number of alpha-levels, otherwise the input is returned unchanged.

Details

See examples

See Also

See Also as checking2, checking

Examples

Run this code
# NOT RUN {
#Example 1:
X<-data.frame(x=c(-2,-0.75,-0.25,0.5,1),alpha=c(0,0.6,1,1,0))
E<-translator(X,3)
E


#Example 2:
data(XX)
E<-translator(XX[[3]],11, pic=1)
E
# }

Run the code above in your browser using DataLab