Closed friendly closed 8 years ago
Hmm, one of three things should happen here
1) Change to a different regex to avoid matching these functions
2) Remove exportPattern
so that @export
can be added to functions that should be exported explicitly, or
3) Document these functions for front-end users (FEUs)
I like 2) the most, it's probably the most general compared to 1). And 3) doesn't seem too useful to FEUs, because why would they ever want a printMatrix or formatNumbers function?
-----Original Message----- From: Phil Chalmers [mailto:notifications@github.com] Sent: Thursday, October 13, 2016 10:57 AM To: friendly/matlib matlib@noreply.github.com Subject: Re: [friendly/matlib] util.R functions undocumented (#15)
Hmm, one of three things should happen here
1) Changed to a different regex to avoid matching these functions 2) Removed exportPattern so that @export can be added to functions that should be exported explicitly, or 3) Document these functions for front-end users (FEUs)
I like 2) the most, it's probably the most general compared to 1). And
I also prefer 2).
3) doesn't seem too useful to FEUs, because why would they ever want a printMatrix or formatNumbers function?
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/friendly/matlib/issues/15#issuecomment-253538222 , or mute the thread https://github.com/notifications/unsubscribe- auth/ANcgQsepL7M15vBsZZbgz4leGxmqPoVoks5qzka_gaJpZM4KV_AQ . https://github.com/notifications/beacon/ANcgQkZ_Fl0JiUaWDJ1FedIavJiz8KG nks5qzka_gaJpZM4KV_AQ.gif
exportPattern
was probably a holdover from the initial version. Let's remove it, but make sure that @export
is used in all functions we intend to export. e.g., I just fixed that for Solve()
.
Good job. Now checks w/o warnings.
Thanks. I also checked the rendered HTML docs with the following makefile and the functions all look to be exported correctly.
PKGNAME := $(shell sed -n "s/Package: *\([^ ]*\)/\1/p" DESCRIPTION)
knitdocs:
rm -rf html/
Rscript -e "library('knitr',quietly=TRUE);knit_rd('$(PKGNAME)')"
mkdir html
mv *.html html/
rm R.css
git checkout -- .
I wouldn't generally use this though as rgl
objects don't get embedded in the output (I asked whether this is possible on SO a while back, but it doesn't look to be).
Moving
printMatrix
andformatNumbers
toutil.R
now generates a warning,This is because
NAMESPACE
containsexportPattern("^[[:alpha:]]+")
. If they are generally useful enough to be exported, they should be documented.