Closed andrewpbray closed 5 months ago
Ahh, perhaps this was the original reason?
Simply speaking, it's because MatchIt
only needs optmatch
if you are using optimal or full matching, which are not necessarily the right methods to use for a given application. Any packages that are not required for all methods (or for the default method) are in Suggests
and not Imports
because we should not require users to install every package when they are only using one matching method. This also keeps the package robust in case a package is removed from CRAN, which has happened in the past. I believe the package would be fully compliant if any of the Suggest
ed packages were removed from CRAN; one could still build the package and use the matching methods that do not depend on that package.
The help page for each matching methods lists the packages that are required for that method to work.
That's helpful - thanks.
Hello, thanks for your work on this wonderful package!
We're using on a project that runs inside a docker container. Traditionally, as we add packages to our project, we add them to the dockerfile and that pretty much works. I was surprised today to see that our project wasn't able to build within a container because of this snippet of code:
It's an easy enough problem to solve - we can add
optmatch
to the dockerfile as well - but I'm curious what drove the decision to putoptmatch
as aSuggests
instead ofImports
. This is a question I've thought about for other projects that I've worked on, so I'm interested to hear how y'all are thinking about it.Thanks!