我正在使用R包RLastFM - 工作得非常好,但是对于某些角色,返回的数据带有“黑色钻石/白色问号”。我会尝试在下面发帖,看看是否显示:
e.g。 “像祷告Like”
我怀疑这是一个编码问题,但如何解决它是我所不知道的。有什么想法吗?
代码:
library(RLastFM)
lastkey <- "1234567890" #my last.fm key
track1 = data.frame(track.search("Like a Prayer","Madonna", key = lastkey, parse = TRUE))
输出:
track artist listeners
1 Like a Prayer Madonna 492340
2 Like A Prayer [Live] Madonna 3507
3 Like a Prayer 2008 Madonna 2624
4 Just like a prayer Madonna 2408
5 Like a Prayer (Churchapella) Madonna 2090
6 Madonna - Like A Prayer Madonna 2462
7 Like A Prayer 2008 - Live Madonna 2468
8 Like a Prayer (live) Madonna 1663
9 Like A Prayer (Album Version) Madonna 2314
10 like_a_prayer Madonna 157
11 Like A Prayer (Dance Remix) Madonna 1629
12 Like A Prayer Madonna 46
13 Like A Prayer. Madonna 46
14 Like A Prayer Madonna 30
15 "Like a Prayer" Madonna 28
16 like-a-prayer Madonna 15
17 Like A Prayer� �Madonna 14
18 Like a Prayer Madonna<U+3339> 12
...
会话信息:
R version 3.1.1 (2014-07-10)
Platform: x86_64-w64-mingw32/x64 (64-bit)
locale:
[1] LC_COLLATE=English_Australia.1252 LC_CTYPE=English_Australia.1252
[3] LC_MONETARY=English_Australia.1252 LC_NUMERIC=C
[5] LC_TIME=English_Australia.1252
attached base packages:
[1] stats graphics grDevices utils datasets methods base
other attached packages:
[1] RLastFM_0.1-5 RCurl_1.95-4.3 bitops_1.0-6 XML_3.98-1.1
loaded via a namespace (and not attached):
[1] tools_3.1.1
干杯 乙