library problems in R - r

I installed the package required and set my library using install.packages("bipartite",lib="C:/Users/Owner/Documents/Rwork")
When i finish installing package, it says the downloaded binary packages are in C:\Users\Owner\AppData\Local\Temp\RtmpuGqI8Q\downloaded_packages
I checked my directory using dir(), all the things in package bipartite are in C:/Users/Owner/Documents/Rwork
When i try to load the package using this command, library("bipartite", lib.loc="C:/Users/Owner/Documents/Rwork") the error appear
Error: package ‘vegan’ required by ‘bipartite’ could not be found
In addition: Warning message:
package ‘bipartite’ was built under R version 3.3.3
Checked my dir() again and it stated that there is a "vegan' in my working directory
Tried to look at .libPaths() it show this
[1] "C:/Users/Owner/Documents/R/win-library/3.3"
[2] "C:/Program Files/R/R-3.3.2/library"
How do i solve this? Do i need to change the library path?

I could reproduce your error. It looks like R does not install the dependencies. This works however:
library(permute, lib.loc = "C:/Users/Owner/Documents/Rwork")
library(vegan, lib.loc = "C:/Users/Owner/Documents/Rwork")
library(statnet.common, lib.loc = "C:/Users/Owner/Documents/Rwork")
library(network, lib.loc = "C:/Users/Owner/Documents/Rwork")
library(sna, lib.loc = "C:/Users/Owner/Documents/Rwork")
library(bipartite, lib.loc = "C:/Users/Owner/Documents/Rwork")
It's just a workaround. Maybe this can also help:
library(devtools)
load_all("C:/Users/Owner/Documents/Rwork")

Related

is there any way to download Deseq1 package in R?

I'm trying to load some RData files with the function load, but I get this message:
Warning: namespace ‘DESeq’ is not available and has been replaced
by .GlobalEnv when processing object ‘cds3’
Loading required package: DESeq
Error in .requirePackage(package) :
unable to find required package ‘DESeq’
In addition: Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called ‘DESeq’
Which means that this file can only be opened if I have the old DEseq package installed. I know it's an old package, but I have looked everywhere and searched the bioconductor guide for this package, and tried this code:
source("https://bioconductor.org/biocLite.R")
biocLite("DESeq")
and got this error
Error: With R version 3.5 or greater, install Bioconductor packages using BiocManager; see https://bioconductor.org/install
I already have DEseq2 but I need the first DEseq. I really need to load those files, what can I do ?

Package RQuantLib is not available for R 3.5.0

Has anyone else tried to load the RQuantLib package for R 3.5.0?
I tried (which has worked before):
install.packages("drat", dependencies = TRUE)
drat::addRepo("ghrr")
install.packages("RQuantLib", type = "binary")
but get the error message:
Warning: unable to access index for repository https://ghrr.github.io/drat/bin/windows/contrib/3.5:
cannot open URL 'https://ghrr.github.io/drat/bin/windows/contrib/3.5/PACKAGES'
Warning message:
package ‘RQuantLib’ is not available (for R version 3.5.0)
You can try this:
library(devtools)
install_github("eddelbuettel/rquantlib")
Or equivalently (based on comment by Dirk Eddelbuette)
install.packages("RQuantLib", type="source")

Error in R packages Installation using Require

Please give me solution..
if (!require('SnowballC',character.only=TRUE))
install.packages('https://cran.r-project.org/bin/windows/contrib/3.4/SnowballC_0.5.1.zip', repos=NULL, dep=TRUE);
library('SnowballC')
when i use this command..I am getting message like
Warning message: In library(package, lib.loc = lib.loc, character.only
= TRUE, logical.return = T RUE, : there is no package called 'SnowballC' Warning message: package 'SnowballC' was built under R
version 3.3.1
Binary package compiled with different version of R
Warning message:
package ‘SnowballC’ was built under R version 3.3.1
By default, R will install pre-compiled versions of packages if they are found. If the version of R under which the package was compiled does not match your installed version of R you will get the message above.
The solution is to download the package source and install by hand with e.g.:
#File name might be different
R CMD INSTALL SnowballC_0.5.1.tar.gz
Source: http://mazamascience.com/WorkingWithData/?p=1185

Error Checking Package that Depends on ggplot2

I have a few packages that depend on ggplot2 and have run into issues when I run R CMD check coefplot_1.1.7.tar.gz.
I get the error below.
* checking whether the package can be loaded ... ERROR
Loading required package: ggplot2
Error: package 'ggplot2' could not be loaded
In addition: Warning message:
In library(pkg, character.only = TRUE, logical.return = TRUE, lib.loc = lib.loc) :
there is no package called 'ggplot2'
Execution halted
It looks like this package has a loading problem: see the messages for
details.
This message occurs for all of my packages that depend on ggplot2, not just this one.
It builds, installs and works just fine, but for some reason the check fails.
I had some funky stuff going on with my .libPaths argument in the Rprofile.site file in R 2.14.2 so I did a fresh install of R 2.15.0 and still have this problem.
Is this a known issue with ggplot or have I unwittingly started doing something wrong?
EDIT In my Rgui (through RStudio) .libPaths() returns
[1] "C:/Users/Jared/Documents/R/win-library/2.15"
[2] "C:/Program Files/R/R-2.15.0/library"
[3] "C:/Program Files/RStudio/R/library"
While getting to the R termnial from the cmd prompt returns
[1] "C:/Users/Jared/Documents/R/win-library/2.15"
[2] "C:/Program Files/R/R-2.15.0/library"
And getting to the R termnial through GitBash (MINGW32) returns
[1] "C:/Program Files/R/R-2.15.0/library"
I'm sure that is causing some of the problem? Maybe I need to fix this through Rprofile.site: .libPaths("~/R/win-library/2.15")?

Error when running library(ggplot2)

I just updated to R 2.11.1 and after installing ggplot2, I tried
library(ggplot2)
and got
Loading required package: proto
Loading required package: grid Loading
required package: reshape Loading
required package: plyr Loading
required package: digest Error in
eval(expr, envir, enclos) : could not
find function "proto" In addition:
Warning message: In library(package,
lib.loc = lib.loc, character.only =
TRUE, logical.return = TRUE, :
there is no package called 'proto'
Error : unable to load R code in
package 'ggplot2' Error:
package/namespace load failed for
'ggplot2'
Any help appreciated.
install.packages('ggplot2', dep = TRUE) would do the trick... install proto package
Open R shell and type following in it
install.packages('ggplot2', dep = TRUE)
then it will ask you to select the mirror, select closest one and it will install it and solve your problem.
Also have had troubles, when installing ggplots2, but here is a curious solution (tested on windows):
I installed via RStudio. Both from Tools->install packages and by typing install.packages("ggplots2", dep=T). It didn't work because it kept not installing the dependencies.
I then installed direct by R gui install.packages("ggplots2", dep=T) and everything went well.
I had the same problem and this did the trick.
Install the lazyeval package.
Then install ggplot2
Load the ggplot2 library and everything will hopefully work fine.
Steps
1.Go To -> Tools
2.Click -> Install Packages
3.In Packages Text Box Type ggplot2
Check the checkbox & install dependencies
And your good to go !

Resources