我在运行下面的脚本时遇到错误。我需要在indicator3数据框中过滤意大利和阿根廷国家的数据。
#ItalyAng<-indicator3%>%
# filter(country==Italy)
ItalyAng<- filter(indicator3,country %in% c('Italy','Argentina'))
filter()
中的错误:
!无法转换具有重复名称的数据框。
回溯:
您可以有两列同名。 你可以检查一下
which(duplicated(names(indicator3)))