chrisaberson / pwr2ppl

pwr2ppl: Power analyses for a wide range common behavioral science research designs
https://github.com/chrisaberson/pwr2ppl
17 stars 7 forks source link

Initial Build Problematic Dependencies #1

Closed chrisaberson closed 6 years ago

chrisaberson commented 6 years ago

Fixing dependency issues. Were not correctly added to DESCRIPTION file.

chrisaberson commented 6 years ago

still testing on different machines. Figuring out how to make required packages install along with the package (thought that was handled in NAMESPACE but apparently it is not).

chrisaberson commented 6 years ago

From Hadley's book "It’s common for packages to be listed in Imports in DESCRIPTION, but not in NAMESPACE. In fact, this is what I recommend: list the package in DESCRIPTION so that it’s installed, then always refer to it explicitly with pkg::fun(). Unless there is a strong reason not to, it’s better to be explicit. It’s a little more work to write, but a lot easier to read when you come back to the code in the future. The converse is not true. Every package mentioned in NAMESPACE must also be present in the Imports or Depends fields."

Description file should therefore read:

Imports: dplyr, tidyr, car, lavaan, phia, afex, lme4, MASS

(I think that's all of them)

I also listed them in NAMESPACE but that does not seem to be accomplishing anything

chrisaberson commented 6 years ago

Resolved. Didn't understand the structure of the directory and thought the zipped file would launch dependencies.

This seems to work now.

devtools::install_github("chrisaberson/pwr2ppl", dependencies=TRUE)