Introduction
I’m ashamed to admit it. I often forget the functions in my own package. You’d think that after spending hours creating it, hours more debugging it, and even more hours getting it to pass CRAN’s militant package checklist, I’d remember. But no, sadly. Was it string.to.color? Or strings.to.colors? Or StringsToColors? At first I assigned aliases (e.g., string.to.color and string.to.colors all point to the same documentation), but sometimes that wasn’t enough. I’d say something like, “I remember creating a function that….er…maybe it like rotates a plot or something? What was its name?”I used to type
ls("package:fifer")
But that got annoying (and I could never remember the command). So I created one called contents().
How to use it
To know what functions a package contains, type the following:
contents("packagename")
For example, to see what’s in MASS, type
contents("MASS")
To see what’s in fifer, type
contents("fifer")
or just
contents()
And bam! Yer done.