According to subset() documentation and general R programming resources, subset() is better used interactively than in programs. This is due to its non-standard evaluation (need to understand more what it means).
Replace use of subset() in the package with [ and [[. $ is also not ideal, as it allows partial matching.