Where can I find function source codes in a .zip R package? - r

I'd like to use package CentiServer in R. However, I'm getting the same error with different R versions (3.3.3 and 3.1.1):
Warning: unable to access index for repository
https://cloud.r-project.org/bin/windows/contrib/3.1 Warning message:
package ‘CentiServer’ is not available (for R version 3.1.1)
This post is a great source, still, these steps couldn't help me to find a solution: How should I deal with "package 'xxx' is not available (for R version x.y.z)" warning?
Since I cannot install the package, I started to think about that it could be easier to just find the source codes of some useful functions in the .zip file. Where can I find those in the .zip file?
Thank you in advance.

Related

Unable to install Peaks package: package ‘Peaks’ is not available for this version of R [duplicate]

This question already has answers here:
How should I deal with "package 'xxx' is not available (for R version x.y.z)" warning?
(18 answers)
Closed 12 months ago.
I am working with series data and want to count the number of local 'maxima' and 'minima' (i.e. peaks and troughs/oscillations) along each series. I want to use the 'Peaks' package for this but only get the following error:
WARNING: Rtools is required to build R packages but is not currently installed. Please download and install the appropriate version of Rtools before proceeding:
Warning in install.packages :
package ‘Peaks’ 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
As suggested I installed rtools without any problems but it still returned the same error when I tried installing 'Peaks'. I have not found any information at the cran.r-project link and have also tried to install findpeaks but got the same error. I am not actually sure what version I am running on my desktop (how do you check?); but I have tried it also on Rstudiocloud, which I think is the latest version (4.1.2).I have also tried:
findPeaks(MaxMn, thresh=0)
findValleys(MaxMn, thresh=0)
but R couldn't find the function. I'm a little confused about whether it is a package or function and what I need to do to make it happen. Any suggestions would be greatly appreciated.
Peaks vignette: https://www.rdocumentation.org/packages/splus2R/versions/1.3-3/topics/peaks
After installing Rtools, you need to put it on the system PATH so that R can find it while trying to build a package from its source code. It's highly likely that in your case Rtools is installed but not on the system path.
You can find the latest details on the process of installing rtools, adding to path and verifying installation is correct from Rtools page (https://cran.r-project.org/bin/windows/Rtools/rtools40.html).
The package is no longer available on CRAN: "Archived on 2019-04-18 as check problems were not corrected despite reminders."
From googling "R detect peaks", it looks like there are a number of current packages you might be able to use, including pracma and peakPick. In addition to CRAN, this also feels like something the Bioconductor repository may have packages for.

Install package "locClass" in R

I want to install a package named "locClass" in R but always failed and kept getting the following warning:
install.packages("locClass", repos="http://download.r-forge.r-project.org/")
Package which is only available in source form, and may need compilation of C/C++/Fortran: ‘locClass’
These will not be installed
The install command is referred to: https://r-forge.r-project.org/R/?group_id=1187
Also, I downloaded the package source from the above website. But R returned the following:
library(locClass)
Error in library(locClass) : ‘locClass’ is not a valid installed package
My R version is 3.3.3. I tried the 3.4.0 but failed the same way.
This is not exactly a solution but an alternative to utilize functionality of package locClass. Download the package file of locClass from here and source(functions.R) present here. This way you can use all functions available in package.
Note : function.R means FLXMCL.R, FLXMCLconstant.R etc.
I'm still looking for a better solution but this is a temporary alternative.

Manual install of R-package "xlsReadWrite" on OS X

I'm having trouble with manual install of an R-package called "xlsReadWrite." I know there are other packages available that can read Excel or csv files in to R, but I need to use this specific package as it is integrated in various places of a quite long script I want to use.
I'm using R-Studio Version 0.98.1091 on a Mac OS X (10.10.3)
The package is no longer available on CRAN, but there's a zip file available online here:
http://www.swissr.org/download
I can manually install the package but then when I hit the check mark I get the following error output:
library("xlsReadWrite", lib.loc="/Library/Frameworks/R.framework/Versions/3.1/Resources/library")
Error in library.dynam(lib, package, package.lib) :
shared object ‘xlsReadWrite.so’ not found
Error: package or namespace load failed for ‘xlsReadWrite’
I don't know quite how to interpret this. Does anyone have a way of successfully installing this package? Thanks a million in advance!!!
Ben

get functions from old package [duplicate]

This question already has answers here:
extracting source code from r package
(2 answers)
Closed 8 years ago.
There are a number of packages that have functions I would like to use, however these packages are no longer maintained and were built for older R versions.
Using R 3.0.02 I get the following
install.packages("steepness")
Warning message:
package ‘steepness’ is not available (for R version 3.0.2)
Similarly using
packageurl <- "http://cran.r-project.org/src/contrib/Archive/steepness/steepness_0.2.tar.gz"
install.packages(packageurl, contriburl=NULL, type="source")
Warning message:
package ‘http://cran.r-project.org/src/contrib/Archive/steepness/steepness_0.2.tar.gz’ is not available (for R version 3.0.2)
and when i manually place the steepness folder in the win-library:
library(steepness)
Error: package ‘steepness’ was built before R 3.0.0: please re-install it
I only want a couple functions to save myself time rewriting everything from scratch. What is the best way round this? Can I just copy the source code for the two functions myself for example and define them myself? I have looked at the folder for the package but there is no obvious .r file to steal code from ONLY .rdb AND .rdx which are file formats I am not familiar with.
If you have some experience with defining functions in R you can just download the bundled *.tar.gz package from CRAN, look in the R folder of the unpacked package and extract the code you need.

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).

Resources