删除警告消息

时间:2016-05-17 20:38:12

标签: r data-analysis

我是编码的新手。试图自动化一些工作。但面临一些问题..只是警告信息..

> First.Platoon<-c(6895)
> Second.Platoon<-c(6895)
> Third.Platoon<-c(6895)
> org_platoon_count=data.frame(First.Platoon,Second.Platoon,Third.Platoon)
> org_platoon_count
  First.Platoon Second.Platoon Third.Platoon
1          6895           6895          6895

现在我有一个像

这样的数据集
> table(borugh16thmay$Platoon)

 First Platoon Second Platoon  Third Platoon 
          6895           6895           6895 

当我试图通过所有命令比较两个数据时,它会发出类似..

的警告
> all(org_platoon_count,table(borugh16thmay$Platoon))
[1] TRUE
Warning message:
In all(c(6895, 6895, 6895), c(6895L, 6895L, 6895L), na.rm = FALSE) :
  coercing argument of type 'double' to logical

请帮我删除警告信息......

我试过

all.equal(org_platoon_count,table(borugh16thmay$Platoon)) 
[1] "Modes: list, numeric" 
[2] "Names: 3 string mismatches" 
[3] "Attributes: < Names: 1 string mismatch >" 
[4] "Attributes: < Length mismatch: comparison on first 2 components >" 
[5] "Attributes: < Component “class”: 1 string mismatch >" 
[6] "Attributes: < Component 2: Mean relative difference: 2 >" 
[7] "current is not list-like"

0 个答案:

没有答案