termstrc in version of R 3.5.2 - r

I'm writing my master thesis degree and I have to estimate the term structure of some European banks interest rate, and I have to estimate them by the Svensson model. My version of R si 3.5.1 and it doesn't recognize the "termstc" package and I don't know how can I solve the problem. Can someone tell me how I can fix it? I would be very grateful if someone can. I should deliver my thesis within a month.

You can install archived packages using remotes::install_url. For example,
remotes::install_url("https://cran.rstudio.com/src/contrib/Archive/termstrc/termstrc_1.3.7.tar.gz")
Of course there is a reason the package was archived, and it hasn't been updated in 5 years, so you probably should not. But you can, if you want.

Package 'termstrc' was removed from the CRAN repository. You can download it from the archive and install the package manually in Rstudio or using the following command:
install.packages("C:/Users/eco/termstrc.zip")
Besides, there will be some errors when you load this packages (eg. Error: package or namespace load failed for ‘termstrc’ in loadNamespace). Just install the related packages as the following command:
install.packages("urca")
install.packages("sandwich")
install.packages("lmtest")
install.packages("rgl")

Related

BaylorEdPsych Package for RStudio; Can't install package

I am trying to use the Littles Test out of the BayorEdPsych-Package to test for MCAR assumption.
For whatever reason though, my R can't find this package. Is it even still available?
My R Version: R 4.0.3 GUI 1.73
My R Studio Version: Version 1.4.1103
This is the error I get when trying to run install.packages().
The link to that side doesn't really help me.
Is there an alternative test for the MCAR/ MAR assumption? It's not a completely accurate test either way, but it would help me tremendously.
install.packages("BayorEdPsych")
Warning in install.packages :
package ‘BayorEdPsych’ is not available for this version of R
A version of this package for your version of R might be available elsewhere,
see the ideas at
https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
Thank you!
As #Zero Pancakes pointed out, BayorEdPsych isn't on CRAN anymore. I would recommend you use mcar_test from naniar package that provides an updated function for the same test. The documentation reads:
"Code is adapted from LittleMCAR() in the now-orphaned BaylorEdPsych package". Also, the naniar package is a wonderful package for missing data and it helps to be familiar with it.
You can find the function documentation here: http://naniar.njtierney.com/reference/mcar_test.html
Update:
The mcar_test function, for now, is only present in the development version of the package naniar. Install it like this:
# install.packages("remotes")
remotes::install_github("njtierney/naniar")
Or you can just source the function from the github repository:
devtools::source_url("https://github.com/njtierney/naniar/blob/master/R/mcar-test.R?raw=TRUE")
It was removed from the CRAN repository
There is an older version
How to install .tar.gz package in R
I've never installed a .tar.gz package before, but it seems possible
Also there is a MCAR function in the Colmp v1.0 package
BayorEdPsych isn't on CRAN anymore, but you can install the older verions I think.

Why is R unable to access index for repository of bioconductor

When trying to install bioconductor (for installing phyloseq package) I get several warning and error messages
I got a new harddrive few days ago so I had to reinstall all programs including R with all the packages I usally need. Everything worked fine until I tried bioconductor.
I am using the rcommended code which worked out for me before:
source('http://bioconductor.org/biocLite.R')
biocLite('phyloseq')
The error message I get is:
Using Bioconductor 3.7 (BiocInstaller 1.30.0), R 3.6.0 (2019-04-26).
installation path not writeable, unable to update packages: cluster,
nlme Updating packages 'bipartite' Warning: unable to access index for
repository
https://bioconductor.org/packages/3.7/bioc/bin/windows/contrib/3.6:
cannot open URL
'https://bioconductor.org/packages/3.7/bioc/bin/windows/contrib/3.6/PACKAGES
So apparently there are several problems?
Some packages cant be updated due to wrong libpath and
R is not able the open the bioconductor hompage
Thanks for your suggestions!
Bioconductor is tied to particular versions of R. You're trying to use a version of Bioconductor (3.7) on a version of R (3.6) that does not match. There is a map between versions, but the underlying problem is that you're using your R-3.5 libraries hoping that they'll work in R-3.6. You should instead 'start over' with an R-3.6 specific installation. In addition, 'BiocInstaller' has been replaced with BiocManager; your 'recommended code' is out of date, as shown on package landing pages.
If you want to continue using your previous library installation (note that this is a one-way street -- you're giving up on your usable R-3.5 installation), try removing ALL versions of the BiocVersion and BiocInstaller packages. .
remove.packages(c("BiocVersion", "BiocInstaller")) # repeat 'till all removed
Either starting with a new library or after removing previous versions of BiocVersion / BiocInstaller, install BiocManager from CRAN
install.packages("BiocManager")
and go about your business
BiocManager::install("phyloseq")
Make sure to validate your installation, so that you do not mix packages from different Bioconductor versions
BiocManager::valid()
Check out current package landing pages, e.g., for phyloseq, or the installation page.

"GraphClusterAnalysis" package in R

Please, how can I get "GraphClusterAnalysis" package installed? I am trying to use the "Highly connected sub graphs" (HCS) clustering algorithm for my data. I have tried to use install.packages() for the installation but I keep getting: package ‘GraphClusterAnalysis’ is not available (for R version 3.0.3).
I was able to use a method called "highlyConnSG()" for the HCS clustering algorithm which I retrieved after installing "RGBL" and "graph" packages from source "https://biconductor.org/bioLite.R". So to install those packages, type in the R environment command line:
source("https://biconductor.org/biocLite.R")
biocLite("RBGL")
biocLite("graph")
As far as I can see, this is a library, written by the authors of the book ( https://www.csc2.ncsu.edu/faculty/nfsamato/practical-graph-mining-with-R/PracticalGraphMiningWithR.html ).
Also on this page is provided the link to the archive with this library itself (here is the link: https://www.csc2.ncsu.edu/faculty/nfsamato/practical-graph-mining-with-R/R-code/GraphClusterAnalysis.zip ).
So you can load this library and after that you can try to install the library from source. Here is the stackoverflow question about how to do it:
How do I install an R package from source?
Nevertheless, as for me I wasn't successful in installing it from source.

Error while loading bquant package in r

I installed BQuant package in my windows system.When I loaded the package it showed the following error Error: package ‘BQuant’ is not installed for 'arch=i386' . Can anyone please sort it out.If not is there any other packages for NMR analysis in R.
Since according to your recent other question you are only interested in a good peak detection algorithm, you could get the code of the relevant functions directly from the package source (look in folder R inside the zip).

Error while installing R package: package built for universal-apple-darwin

I installed a R package as suggested by How do I install an R package from source?, using R CMD INSTALL [my_pkg_path.tgz]. Package sources are downloaded from r-project.org, e.g., http://cran.r-project.org/web/packages/fields/index.html
However, when I try to load the package using say library(fields), I got the error that complains the package are built for universal-apple-darwin:
Error: package ‘fields’ was built for universal-apple-darwin9.8.0
Guess it's something to do with architecture, but no idea how to resolve it. Any idea? Thanks.
It looks like you downloaded the package's Mac OSX binary file, which usually ends in .tgz - try downloading the package source (usually something ending in .tar.gz) and installing the package again.
Depending on what your operating system is, you may need an additional set of software before you can install packages from source. If the above suggestion doesn't work, would you provide some information about the OS, for example from sessionInfo()?

Resources