allequal(GWASTools)
allequal()所属R语言包:GWASTools
Test if two objects have the same elements
测试,如果两个对象具有相同的元素
译者:生物统计家园网 机器人LoveR
描述----------Description----------
allequal tests if two objects have all the same elements, including whether they have NAs in the same place.
allequal测试,如果两个对象有相同的元素,包括他们是否有在同一个地方NA的。
用法----------Usage----------
allequal(x, y)
参数----------Arguments----------
参数:x
first object to compare
第一个对象比较
参数:y
second object to compare
第二个对象比较
Details
详情----------Details----------
Unlike all(x == y), allequal will return FALSE if either object is NULL. Does not check class types, so allequal will return TRUE in some cases where identical will return FALSE (e.g. if two objects are identical when coerced to the same class). allequal always retuns a logical value, so it can be used safely in if expressions.
不像all(x == y),allequal将返回FALSE如果两个对象是:NULL。不检查类的类型,所以allequal将返回TRUE在某些情况下identical将返回FALSE(例如,如果两个对象是相同的,强制同一类)。 allequal总是retuns逻辑的价值,所以它可以安全地使用if表达。
值----------Value----------
Returns TRUE if x and y exist and all elements are equal, FALSE if some elements are unequal. If there are NA values, returns TRUE if is.na(x) == is.na(y) and all other elements are equal. Returns FALSE if is.na(x) != is.na(y). Retuns FALSE if x or y (but not both) is NULL.
返回TRUEx和y,如果存在,所有元素都是平等的,FALSE如果某些元素是不平等的。如果有NA值,回报TRUE,如果is.na(X)== is.na(y)和所有其他元素都是平等的。返回FALSE如果is.na(X)!= is.na(Y)。 retunsFALSE如果X或Y(但不能同时)是:NULL。
作者(S)----------Author(s)----------
Stephanie Gogarten
参见----------See Also----------
identical, all, all.equal
identical,all,all.equal
举例----------Examples----------
x <- c(1,2,NA,4); y <- c(1,2,NA,4);
allequal(x, y) ## TRUE[#真]
allequal(1, as.integer(1)) ## TRUE[#真]
allequal(1, "1") ## TRUE[#真]
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|