dbaranger / InteractionPoweR

InteractionPoweR: Power analysis for interactions via simulation in R
GNU General Public License v3.0
20 stars 1 forks source link

InteractipnPoweR not available for R 4.0.0 #1

Closed gille597 closed 3 years ago

gille597 commented 3 years ago

Thanks for creating this package! When I've tried to use it, I get the message: "Warning in install.packages : package ‘InteractionPoweR’ is not available (for R version 4.0.0)"

I was wondering if you'll make it available for newer versions of R? This would really help with a project I'm working on!

Best, Sarah

dbaranger commented 3 years ago

Hi! I built the package in 4.03. It needs at least 3.5.0, but it should be compatible with any version above that, including 4.0.0. Are you getting a specific error when you try to install?

gille597 commented 3 years ago

Thanks for your response!

I don't get any errors installing from github, but then when I try to run the code, it says it could not find the function power_interaction. I tried attaching the library another way, and that's when it told me there was a version issue.

It's very likely the issue is on my end!

Here's my code: install.packages("devtools") devtools::install_github("dbaranger/InteractionPoweR/@HEAD") install.packages("InteractionPoweR") # Tried this instead.

library(InteractionPoweR) # Tells me there is no such package library(tictoc) tic() test_power<-power_interaction( n.iter = 1000, # number of simulations per unique combination of input parameters alpha = 0.05, # alpha, for the power analysis N = 350, # sample size r.x1x2.y = .15, # interaction effect to test (correlation between x1*x2 and y) r.x1.y = .2, # correlation between x1 and y r.x2.y = .1, # correlation between x2 and y r.x1.x2 = .2, # correlation between x1 and x2 seed = 581827 # seed, for reproducibility - this generally should not be set )

> [1] "Checking for errors in inputs..."

> [1] "Performing 1000 simulations"

toc()

> 16.25 sec elapsed

test_power

On Thu, Jul 22, 2021 at 10:30 AM David Baranger @.***> wrote:

Hi! I built the package in 4.03. It needs at least 3.5.0, but it should be compatible with any version above that, including 4.0.0. Are you getting a specific error when you try to install?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dbaranger/InteractionPoweR/issues/1#issuecomment-885006868, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUK2RLLHOZ766P4SH2ATM2TTZA2R5ANCNFSM5A2GXDHA .

--

Sarah Gillespie

Doctoral Student | Developmental Psychopathology and Clinical Science

University of Minnesota | Institute of Child Development

@.*** | @SarahCGillespie https://twitter.com/SarahCGillespie

The University of Minnesota-Twin Cities is built within the traditional homelands of the Daḳota people. Minnesota comes from the Daḳota name for this region, Mni Sota Maḳoce — "the land where the waters reflect the skies."

dbaranger commented 3 years ago

Ok! So I can't reproduce your error, but that could be for any number of reasons. As a first pass, can you try installing with the command:

devtools::install_github("dbaranger/InteractionPoweR")

gille597 commented 3 years ago

Thanks, that installed it (I swear I tried that last night to no avail.)

Now I get this output: [1] "Checking for errors in inputs..." [1] "Performing 1000 simulations" Error: 'all_of' is not an exported object from 'namespace:dplyr'

Run rlang::last_error() to see where the error occurred.

rlang::last_error() <error/rlang_error> 'all_of' is not an exported object from 'namespace:dplyr' Backtrace:

  1. InteractionPoweR::power_interaction(...)
  2. base::.handleSimpleError(...)
  3. tidyselect:::h(simpleError(msg, call)) Run rlang::last_trace() to see the full context.

On Thu, Jul 22, 2021 at 10:56 AM David Baranger @.***> wrote:

Ok! So I can't reproduce your error, but that could be for any number of reasons. As a first pass, can you try installing with the command:

devtools::install_github("dbaranger/InteractionPoweR")

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dbaranger/InteractionPoweR/issues/1#issuecomment-885025812, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUK2RLMXFLZJPYSQQXTPRSLTZA5UJANCNFSM5A2GXDHA .

--

Sarah Gillespie

Doctoral Student | Developmental Psychopathology and Clinical Science

University of Minnesota | Institute of Child Development

@.*** | @SarahCGillespie https://twitter.com/SarahCGillespie

The University of Minnesota-Twin Cities is built within the traditional homelands of the Daḳota people. Minnesota comes from the Daḳota name for this region, Mni Sota Maḳoce — "the land where the waters reflect the skies."

dbaranger commented 3 years ago

No worries! That error is probably because your version of dplyr is too old. Can you try updating it? install.packages("dplyr")

gille597 commented 3 years ago

That worked!!! Thank you so much for going above and beyond.

I will cite you gratefully should this paper be published! I know many other grad students in my program who would love this tool as well.

On Thu, Jul 22, 2021 at 11:15 AM David Baranger @.***> wrote:

No worries! That error is probably because your version of dplyr is too old. Can you try updating it? install.packages("dplyr")

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/dbaranger/InteractionPoweR/issues/1#issuecomment-885039536, or unsubscribe https://github.com/notifications/unsubscribe-auth/AUK2RLOHGPVHD2JTJO6XKGTTZA727ANCNFSM5A2GXDHA .

--

Sarah Gillespie

Doctoral Student | Developmental Psychopathology and Clinical Science

University of Minnesota | Institute of Child Development

@.*** | @SarahCGillespie https://twitter.com/SarahCGillespie

The University of Minnesota-Twin Cities is built within the traditional homelands of the Daḳota people. Minnesota comes from the Daḳota name for this region, Mni Sota Maḳoce — "the land where the waters reflect the skies."

dbaranger commented 3 years ago

Awesome! Yes please do let others know 😄