r语言中,with,which用法的问题,b b b[1] 101 102> with(subset(recommendation[user==1,]),which(item==101))[1] 1> with(subset(recommendation[user==1,]),which(item==102))[1] 3> with(subset(recommendation[user==1,]),which(b%in%item))[1] 1 2应该输
来源:学生作业帮助网 编辑:作业帮 时间:2024/08/27 01:56:39
r语言中,with,which用法的问题,b b b[1] 101 102> with(subset(recommendation[user==1,]),which(item==101))[1] 1> with(subset(recommendation[user==1,]),which(item==102))[1] 3> with(subset(recommendation[user==1,]),which(b%in%item))[1] 1 2应该输
r语言中,with,which用法的问题,
b b b
[1] 101 102
> with(subset(recommendation[user==1,]),which(item==101))
[1] 1
> with(subset(recommendation[user==1,]),which(item==102))
[1] 3
> with(subset(recommendation[user==1,]),which(b%in%item))
[1] 1 2
应该输出1和3呀怎么是2
r语言中,with,which用法的问题,b b b[1] 101 102> with(subset(recommendation[user==1,]),which(item==101))[1] 1> with(subset(recommendation[user==1,]),which(item==102))[1] 3> with(subset(recommendation[user==1,]),which(b%in%item))[1] 1 2应该输
这个是which(item.x==101)),不是which(item==101))吧
还有which(b%in%item.x))
一开始有item.x这一列元素的,后面怎么都是item了呀?
你能把信息再补充多一点吗?譬如把 m 给出来看一下.