jiangbeilu 发表于 2014-11-25 14:30 
楼主请把你的少量数据用xls贴出来,没有数据,没法为你解答。
ps:论坛不支持.csv格式数据。
另外附上你的 ...
IP (address) Cities Domains Customer Loyalty Visits Page Views
1.160.32.15 taichung (taichung, taiwan) hinet.net new 1 1
1.161.217.50 hsinchu (hsinchu, taiwan) hinet.net new 2 2
1.171.242.147 taoyuan (kaohsiung, taiwan) hinet.net new 1 3
1.172.114.210 kaohsiung (kaohsiung, taiwan) hinet.net new 2 2
1.173.172.153 chiayi (chiayi, taiwan) hinet.net new 3 5
1.180.39.82 baotou (nei mongol zizhiqu, china) new 1 1
1.180.56.131 baotou (nei mongol zizhiqu, china) new 1 1
1.182.48.17 baotou (nei mongol zizhiqu, china) new 1 2
1.192.169.142 zhengzhou (henan, china) new 1 3
1.192.251.143 zhengzhou (henan, china) new 1 1
1.193.123.117 zhengzhou (henan, china) new 1 1
1.193.64.135 zhengzhou (henan, china) new 1 6
1.197.214.161 zhengzhou (henan, china) new 1 6
代码:
A=read.csv("Report2.csv",sep = "\t",header=T);A
C=A[,c(2,3)];C
D=subset(A,Visits>1&Page.Views>1);D
错误代码:
> C=A[,c(2,3)];C
Error in `[.data.frame`(A, , c(2, 3)) : undefined columns selected
> D=subset(A,Visits>1&Page.Views>1);D
Error in eval(expr, envir, enclos) : object 'Visits' not found