track.getTopFans {RLastFM}R Documentation

API call to track.getTopFans

Description

API call to track.getTopFans

Usage

track.getTopFans(track = NA, artist = NA, mbid = NA, key = lastkey, parse = TRUE)

Arguments

track track title
artist artist name
mbid optionally, artist MBID
key API key, defaults to global variable lastkey
parse Parse the returned XML into a list?

Value

If parse = TRUE,

username username
weight match weight


If parse = FALSE, a object of type "XMLInternalDocument" and "XMLAbstractDocument"

Note

API is sensitive to spelling.

Author(s)

Greg Hirson <ghirson@ucdavis.edu>

References

http://www.last.fm/api/show?service=312

Examples


genres = c("jazz", "rock", "rap")
tracks = do.call("rbind", lapply(genres, function(x)do.call("cbind", tag.getTopTracks(x))[1,]))
weight = apply(tracks, 1, function(x)track.getTopFans(x[1], x[2])$weight)
##Not Run - Plot weights by genre
#matplot(w, type = "l", xlab = "rank", ylab = "match", col ="black", lty =1:3)
#legend("topright", labels = genres, col = "black", lty =1:3)


[Package RLastFM version 0.1-4 Index]