lokheart
lokheart

Reputation: 24685

hidden variable in R

I am using the RLastFM package, and have some question about the function:

> tag.getTopArtists
function (tag, key = lastkey, parse = TRUE) 
{
    params = list(method = "tag.gettopartists", tag = tag, api_key = lastkey)
    ret = getForm(baseurl, .params = params)
    doc = xmlParse(ret, asText = TRUE)
    if (parse) 
        doc = p.tag.gettopartists(doc)
    return(doc)
}

the author included lastkey as the api_key, but I can't find it by using ls(), where is it?

Thanks.

Upvotes: 0

Views: 583

Answers (1)

Marek
Marek

Reputation: 50783

getAnywhere(lastkey) show you where it is and RLastFM:::lastkey gives you this value. The value isn't exported from namespace of package.

For more details check Writing R Extensions manual, Package name spaces section.

Upvotes: 3

Related Questions