translator {SAFD} | R Documentation |
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.
translator(X, nl = 101)
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. |
See examples
comp1 |
In case checking2(X)=1 translator returns a dataframe (fuzzy number) with nl number of alpha-levels, otherwise the input is returned unchanged. |
In case you find (almost surely existing) bugs or have recommendations for improving the functions comments are welcome to the above mentioned mail addresses.
Wolfgang Trutschnig <wolfgang.trutschnig@softcomputing.es>, Asun Lubiano <lubiano@uniovi.es>
See Also as checking2
, checking
#example1: X<-data.frame(cbind(x=c(-2,-0.75,-0.25,0.5,1),alpha=c(0,0.3,1,0,0.3))) E<-translator(X,4) #example2 X<-data.frame(cbind(x=c(-2,-0.75,-0.25,0.5,1),alpha=c(0,0.6,1,1,0))) E<-translator(X,3) plot(X,type="l") lines(E,type="l",col="red") #example3 data(XX) E<-translator(XX[[3]],11) plot(XX[[3]],type="l") lines(E,type="l",col="red")