在检查字符串向量中元素的等效性时,我陷入了困境
> head(vector_of_strings)
[1] " " "SC " " 2.6" "WT " " 1.0" "WT "
> is.character(vector_of_strings)
[1] TRUE
> "SC " %in% vector_of_strings
[1] FALSE
> "WT " %in% vector_of_strings
[1] FALSE
向量似乎具有等效的元素,但报告其他情况。我是否应该修改数据类型或以其他方式检查等效性?