melboyd
melboyd

Reputation: 1

'Assertive' package not on CRAN

I tried installing the assertive package and got this error message:

'Warning in install.packages :
  package ‘assertive’ is not available for this version of R A version of this package for your version of R might be available elsewhere'

I looked on CRAN and it says 'Package ‘assertive’ was removed from the CRAN repository' (https://cran.r-project.org/web/packages/assertive/index.html)

I'm using the most updated version of R Studio (RStudio 2023.12.0+369) and R. How can I get this package? It is a dependency for another one so I really need it...

Upvotes: 0

Views: 898

Answers (2)

Martin Teicher
Martin Teicher

Reputation: 1

To followup with Limey and Leo Kiernen,

It looks like the first step is to install assertive.base, then assertive.properties

    devtools::install_bitbucket("richierocks/assertive.base") 

Then you can install the packages indicated in the previous post

    devtools::install_bitbucket("richierocks/assertive.types") 
    devtools::install_bitbucket("richierocks/assertive.strings")
    devtools::install_bitbucket(c("richierocks/assertive.datetimes", "richierocks/assertive.data", "richierocks/assertive.data.uk", "richierocks/assertive.data.us", "richierocks/assertive.code"))

Finally, these also need to be installed

    devtools::install_bitbucket(c("richierocks/assertive.numbers", "richierocks/assertive.files", "richierocks/assertive.sets", "richierocks/assertive.matrices", "richierocks/assertive.models", "richierocks/assertive.reflection"))

then you can install

    devtools::install_bitbucket("richierocks/assertive")

Upvotes: 0

Leo Kiernan
Leo Kiernan

Reputation: 66

To Expand on Phil's reply:

  1. install.packages("devtools") # you need to install devtools to access the packages that arent on cran any more # google helped me find the source for assertive ...

  2. devtools::install_bitbucket("richierocks/assertive") # (this failed because assertive as a bunch of other dependencies that need to be installed)

I got the following error: (which is what Phil's reply explained) ERROR: dependencies 'assertive.properties', 'assertive.types', 'assertive.strings', 'assertive.datetimes', 'assertive.data', 'assertive.data.uk', 'assertive.data.us', 'assertive.code' are not available for package 'assertive' * removing 'C:/Users/leoki/AppData/Local/R/win-library/4.3/assertive'

  1. devtools::install_bitbucket("richierocks/assertive.properties") # install this one first! (other's depend on it)
  2. devtools::install_bitbucket("richierocks/assertive.types") # I then tried each of these
  3. devtools::install_bitbucket("richierocks/assertive.strings")

I soon got bored and installed all the remaining dependencies in one line:

  1. devtools::install_bitbucket(c("richierocks/assertive.datetimes", "richierocks/assertive.data", "richierocks/assertive.data.uk", "richierocks/assertive.data.us", "richierocks/assertive.code"))
  2. install_bitbucket("richierocks/assertive")

I was actually after drop2 so I finally collected that using:

  1. devtools::install_github("karthik/rdrop2")

I hope this works for others too

Upvotes: 1

Related Questions