我正在从文件中读取一些映射。那么,在使用这个值的时候会出现一个奇怪的现象:
k <- 66
mapp[k,]
> 66 61 2.345
mapp[k,1] == 66
> TRUE
dat[1,66]
> 5
dat[1, as.numeric(mapp[k,1])]
> 7
So, for some strange reason everything points to the fact that mapp[k,1] has the value 66, but when selecting the column of the matrix it is not recognizes as this value!? 为什么?我尝试通过尝试参数“stringsAsFactors”来读取映射,但这没有帮助。
有人知道吗?