這是我的數據幀的頭部看起來像SQL SELECT查詢不工作
head(d7)
Jurisdiction %_TOT2030 %_ENR2030 %_RE2030 %_OFF2030 %_OTH2030 %_HH2030
1 Baltimore City 7.6667589 0 7.773109 7.5530587 7.6866764 4.783365
2 Baltimore City 8.0038573 0 8.193277 7.9555175 7.9553903 6.583851
3 Baltimore City 35.4085603 0 37.037037 35.3146853 35.3608247 20.008643
4 Baltimore City 0.5071851 0 1.030928 0.4424779 0.6410256 28.629032
5 Baltimore City 7.5310559 0 8.108108 7.4790458 7.4634938 9.679767
6 Baltimore City 11.8785976 0 12.043011 11.8718593 11.8460613 9.690331
數據幀的數據類型爲如下 STR(D7)
'data.frame': 1588 obs. of 7 variables:
$ Jurisdiction: Factor w/ 59 levels "Accomack County",..: 7 7 7 7 7 7 7 7 7 7 ...
$ %_TOT2030 : num 7.667 8.004 35.409 0.507 7.531 ...
$ %_ENR2030 : num 0 0 0 0 0 0 0 0 0 0 ...
$ %_RE2030 : num 7.77 8.19 37.04 1.03 8.11 ...
$ %_OFF2030 : num 7.553 7.956 35.315 0.442 7.479 ...
$ %_OTH2030 : num 7.687 7.955 35.361 0.641 7.463 ...
$ %_HH2030 : num 4.78 6.58 20.01 28.63 9.68 ...
當我運行下面的查詢,它只是返回我d7沒有做任何改變,我不明白爲什麼!
d8 <- sqldf("Select * from d7 where '%_TOT2030' > 10")