How to install "RTAQ" package in R - r

How to install "RTAQ" package in R?
I found a website with 4 packages I need, but I can't download "RTAQ" file.(
http://r-forge.r-project.org/R/?group_id=316 )
This command below is invalid too.
install.packages("RTAQ", repos="http://R-Forge.R-project.org")
Warning in install.packages :
package ‘RTAQ’ is not available (for R version 3.4.4)

RTAQ has been archived from CRAN, since CRAN was unable to receive a clean update of the software since November 2012. For details, see the following message on the CRAN RTAQ page.
If you want to use RTAQ, you'll need to install an older version of R that is compatible with RTAQ, and use RTAQ with that version of R.

Related

Installing a Package Removed from CRAN

I am using the R programming language. I am trying to install the "Data Mining with R" (DMwR) package. However, when I visit the CRAN website for this package, it seems to be gone:
Package ‘DMwR’ was removed from the CRAN repository.
Formerly available versions can be obtained from the archive.
Archived on 2021-03-16 as check problems were not corrected despite reminders.
A summary of the most recent check results can be obtained from the check results archive.
I visited the Github page for this package
Then, I tried to install this package directly from Github:
> library(devtools)
Loading required package: usethis
Warning message:
package ‘usethis’ was built under R version 4.0.5
> install_github("Luis Torgo/DMwR")
Error: Failed to install 'unknown package' from GitHub:
JSON: EXPECTED value GOT <
But this also is not working. Can someone please show me how to install this package?
Besides installing from the CRAN mirror repo, another option is
remotes::install_version("DMwR", version="0.4.1")
for this method, you do have to look up the last version in the archive directory (would probably be scrapeable if you wanted to write the code)
as with remotes::install_github("cran/<package>"), you will be installing from source, which means that if the package or any of its dependencies have compiled components (in this case it doesn't appear so), you'll need to have development tools (compiler etc.) installed on your system
A quick word of caution:
this will work well if packages have been archived recently, and if the reason for archiving was because the CRAN maintainers are being fussy (that's their prerogative);
however, a package may have become incompatible with the rest of the current R ecosystem (R version, dependencies) since its last update - in which case you may find yourself in dependency hell trying to install it (or, worse, your results may be unreliable).
Had the same message on R 4.1.0
install.packages("DMwR")
Warning message:
package ‘DMwR’ is not available for this version of R
An option is also to create a checkpoint. According to the CRAN package website, it is archived on '2021-03-16'. So, we could use the checkpoint one day before that date
library(checkpoint)
checkpoint("2021-03-15")
install.packages("DMwR")
library(DMwR)
#Loading required package: lattice
#Loading required package: grid
#Registered S3 method overwritten by 'quantmod':
# method from
# as.zoo.data.frame zoo
The checkpoint can be deleted as well
delete_all_checkpoints()
You can install it from the CRAN github mirror (despite it being removed from CRAN), e.g.
library(devtools)
install_github("cran/DMwR")
That package was in support of a book published in 2010. The author published a second edition in 2017 and the current version of the support package is https://cran.r-project.org/web/packages/DMwR2/index.html
It does have currently CRAN-hosted source and binary packages, and doesn't need compilation, so it should be able to be installed with:
install.packages("DMwR2", dependencies=TRUE)
You can get the most recent version by following the directions at the Github site:
library(devtools) # You need to install this package!
install_github("ltorgo/DMwR2",ref="develop")
Those are much more likely to run properly with recent versions of R.

Can't install package 'nutshell' from O'Reilly book 'R in a Nutshell' onto Mac

My first post in an early programming career - any help very welcome.
I am studying R, and using a book called R in Nutshell (O'Reilly). The book is supported by a package that was previously available on CRAN. The package on CRAN has been archived - it is still there though as nutshell_2.0.tar.gz.
I am running MacOS Catalina, R version 3.2.1.(after downgrading from 4.02 to try and solve this issue , without success), and RStudio version 1.3.1093.
When I try to install the package into R via RStudio I have this experience:
packageurl <- "https://cran.r-project.org/src/contrib/Archive/nutshell/nutshell_2.0.tar.gz
install.packages(packageurl,contriburl=NULL,type="source")
Warning in install.packages :
package ‘https://cran.r-project.org/src/contrib/Archive/nutshell/nutshell_2.0.tar.gz’ is not available (for R version 3.2.1)
I have a similar experience if I download the tar.gz file and try to import it directly under Tools/Install Packages.
I am able to install other packages on CRAN successfully.
Many thanks
Up front, I'm doing this on windows and not on macos, but the packages here have no compiled code so there should be few if any differences. Also, I tested on R-4.0.2; I don't think this will be a problem, because these packages appear to have been last-updated in 2012, so if they install on my 4.0.2, then they are likely to work on every version of R since then (including your 4+ year-old R-3.2).
download.file("https://cran.r-project.org/src/contrib/Archive/nutshell.audioscrobbler/nutshell.audioscrobbler_1.0.tar.gz", "nutshell.audioscrobbler_1.0.tar.gz")
download.file("https://cran.r-project.org/src/contrib/Archive/nutshell.bbdb/nutshell.bbdb_1.0.tar.gz", "nutshell.bbdb_1.0.tar.gz")
download.file("https://cran.r-project.org/src/contrib/Archive/nutshell/nutshell_2.0.tar.gz", "nutshell_2.0.tar.gz")
install.packages("nutshell.audioscrobbler_1.0.tar.gz", repos = NULL)
install.packages("nutshell.bbdb_1.0.tar.gz", repos = NULL)
install.packages("nutshell_2.0.tar.gz", repos = NULL)
I tried reproducing installation from archive. I got error that dependencies of this package are not available.
ERROR: dependencies 'nutshell.bbdb', 'nutshell.audioscrobbler' are not available for package 'nutshell'
* removing 'C:/Program Files/R/R-3.6.2/library/nutshell'
Warning in install.packages :
installation of package ‘D:/Profile/maszpa1/Desktop/nutshell_2.0.tar.gz’ had non-zero exit status
Did you get the same error? If yes, then did you try to install them and try again?
As per the accepted answer, the solution was to install the missing dependent packages first, then the Nutshell package.
I was then able to update to R4.02
audioscrobbler_1.0.tar.gz
nutshell.bbdb_1.0.tar.gz
nutshell_2.0.tar.gz

install quantstrat for R latest R version ()

I would like to install a package when using the latest R version in RStudio.
In particular the quantstrat package
Is that possible?
This is the R latest version I have 3.4.1
my error message:
Warning in install.packages :
package ‘quantstrat’ is not available (for R version 3.4.1)
Because quantstrat build-fail at R-Forge, you can't get the pre-build file(.tar.gz). You can get the code from github and build by yourself.
install.packages("devtools")
require(devtools)
install_github("braverock/blotter") # dependency
install_github("braverock/quantstrat")
Can you provide the installation code that produced that error message? Are you trying to install it from CRAN?
That doesn't appear possible.
A post from 2014 states it's not on CRAN
quantstrat is a R package ... still under heavy development and can’t be installed from CRAN yet. You can install it from source and the process is straightforward.
It's not on the current list of available CRAN packages
It's R-Forge page states the current version 'Failed to build'.
You could download the previous version (and its dependency) from R-Forge at
http://download.r-forge.r-project.org/bin/windows/contrib/3.2/quantstrat_0.9.1739.zip and
http://download.r-forge.r-project.org/bin/windows/contrib/3.2/blotter_0.9.1741.zip
(or get the Linux tar.gz files). Assuming they're saved in your personal Downloads folder, install it in R with
install.packages("~/Downloads/blotter_0.9.1741.zip", repos = NULL)
install.packages("~/Downloads/quantstrat_0.9.1739.zip", repos = NULL)
According to that first link, you'll need to install these prereqs first, if they're not already:
install.packages("FinancialInstrument")
install.packages("PerformanceAnalytics")
install.packages("foreach")
Edit: see the comment below from #brian-g-peterson for how the current deployment avenue uses GitHub. https://github.com/braverock/quantstrat

Error in installing packages from RStudio

I have been trying to install the package "doby" from RStudio (ver 0.98.501 ) on ubuntu 13.04 but it keeps throwing the following warning and the package does not get installed.
Warning in install.packages :
package ‘doBy’ is not available (for R version 2.15.2)
I have followed all the instructions given here :
http://www.r-bloggers.com/installing-r-packages/
Can someone please suggest where I might be going wrong ?
If you are on Ubuntu, please see this README for Ubuntu from CRAN --- it will allow you to get to the current version of R (today 3.0.2, in a few days 3.0.3) with mininal effort.
Once you have a current R version, getting the doBy package (which depends on it) installed is a piece of cake too.
If however you prefer to stay with your version of R, you can manually fetch an older version of doBy from its CRAN archive. Download to, say, /tmp and run R CMD INSTALLby hand on it.
From http://cran.r-project.org/web/packages/doBy/index.html, package doBy depends on R version 3.0 and above. Your R version is 2.15.2. You will need to install a later version of R, and then change the settings in Rstudio to target the updated version.

Cannot find tseries package from CRAN mirror

I'm trying to install the tseries package on my Linux machine. Under R, I ran
> install.packages("tseries")
I was prompted with a list of mirror sites, but no matter which one I chose (for example, 79: USA (WA)), it gave me
Selection: 79
Warning message:
In getDependencies(pkgs, dependencies, available, lib) :
package "tseries" is not available
Does anyone know why that might be? My R version is 2.9.2. Thx.
CRAN archives are versioned. And as the CRAN package page for tseries clearly shows, it now requires an R version of at 2.10.0 or later. So
either you upgrade R which is a good idea anyway as your version is two years old
or you stick with your version, but grab an older version of tseries from its archive on CRAN

Resources