gmbecker / switchr

An R package for managing and seamlessly switching between sets of installed R packages.
http://google.com AND http://blabla.com
59 stars 6 forks source link

R CMD check fix where subdir slot is character(0) #10

Closed cicdguy closed 7 years ago

cicdguy commented 7 years ago

R CMD check was failing while looking for the subdir slot in the 'source' S4 object. The value being displayed for this slot was character(0). Now, if that slot's value defaults to character(0), I'm setting it to ".". This resolved the R CMD check error.

gmbecker commented 7 years ago

Thanks for identifying the problem here.

On looking at it a bit more closely, I decided to generalize the protection in case other code uses (or eventually will use) subdir, so I made the default value of the slot "."(via the prototype argument in the class definition), so that things will just work elsewhere as well.

I just committed that fix, so we shouldn't need the if in makePkgDir. The package passes check for me locally now.