checking(SAFD)
checking()所属R语言包:SAFD
Checking correct data format
检查正确的数据格式
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The function checks if the input data is of the correct form of a polygonal fuzzy number, i.e. a dataframe with the columns "x" and "alpha" fulfilling the following conditions: (1) alpha-values have to be in [0,1] with the minimum alpha-level being 0 and maximum being 1, (2) the x-values have to be non-decreasing, (3) the alpha-levels have to increase from 0 to 1 and afterwards decrease from 1 to 0 in the same way (i.e. the alpha-column consists of an increasing vector from 0 to 1 plus the same vector in decreasing order). As a consequence the dataframe always has an even number of rows, see examples. The function is used internally in almost all the other functions to do a preliminary checking if the input data is of the correct form.
的功能的检查,如果输入的数据是正确的形式的一个多边形的模糊数,即数据框与列“x”和“α”满足以下条件:(1)α-值必须在[0 ,1]的最低α-电平为0,最大为1,(2)的x值非递减的,(3)的α-水平必须增加从0到1的事后减少从1到0中的相同的方式(即从0到1增加矢量加上以递减的顺序相同的向量由α-柱)。作为结果的数据框始终为偶数的行数,请参见实施例。该函数在内部使用的几乎所有的功能做了初步检查,如果输入的数据是正确的形式。
用法----------Usage----------
checking(X, com = 1)
参数----------Arguments----------
参数:X
...can be any data frame.
...可以是任何数据框。
参数:com
...numeric, if com=1 then, in case of an error, a comment is printed. By default com=1.
...数字,如果com= 1,那么,在一个错误的情况下,注释打印。默认情况下,com= 1。
Details
详细信息----------Details----------
See examples
请参见示例
值----------Value----------
The function returns the value 1 if the input fulfills all conditions, if not, 0 is returned.
该函数返回值为1,如果输入满足所有条件,如果没有,则返回0。
注意----------Note----------
In case you find (almost surely existing) bugs or have recommendations for improving the functions comments are welcome to the above mentioned mail addresses.
如果你发现改善的功能(几乎可以肯定存在的)错误,或有建议意见,欢迎上述电子邮件地址。
(作者)----------Author(s)----------
Wolfgang Trutschnig <wolfgang@trutschnig.net>, Asun Lubiano <lubiano@uniovi.es>
参见----------See Also----------
See Also as checking2, translator
请参见checking2,translator
实例----------Examples----------
data(XX)
a<-checking(XX[[1]],1)
a
#[]
X<-data.frame(cbind(y=c(-2,-0.75,-0.25,0.5,1),alpha=c(0,0.6,0.9,0.9,0)))
a<-checking(X)
a
#[]
X<-data.frame(cbind(x=c(-2,-0.75,-0.25,0.5,1),alpha=c(0,0.6,0.9,0.9,0)))
a<-checking(X)
a
#[]
X<-data.frame(cbind(x=c(-2,-0.75,-0.25,-0.5,1),alpha=c(0,0.6,1,1,0)))
a<-checking(X)
a
#[]
X<-data.frame(cbind(x=c(-2,-0.75,-0.25,0.5,1),alpha=c(0.3,0,1,0,0.3)))
a<-checking(X)
a
#[]
Y<-data.frame(cbind(x=c(-2,-0.75,-0.25,0.5,1),alpha=c(0,0.3,1,0,0.3)))
a<-checking(Y)
a
#[]
Z<-data.frame(cbind(x=c(-2,-0.75,-0.25,0.5,1),alpha=c(0,0.6,1,1,0)))
a<-checking(Z)
a
#[]
U<-data.frame(cbind(x=c(-1,0,1),alpha=c(0,1,0)))
a<-checking(U,)
a
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|