Usage of an Internal R Package Error Message - r

I am trying to use a company internal r-package and I am getting the following warning message in R-Studio when I want to load the library. So installation works, but when I try to load the library is spits this error:
"In fun(libname, pkgname) :"
Does anyone know what the problem is here?
Thanks in advance!

try installing first with install.packages("path to your .zip package file", repos=NULL)
Then use library or require. If anything goes wrong with these two steps, there is a problem with the package itself and you should ask its developers for help.
EDIT: if your package is on github, you can try:
install.packages("devtools")
library("devtools")
devtools::install_github("your package URL")

Related

Facing issue with R package Phyloseq

Since i have removed phyloseq package from my RStudio. Every time when i am running any code the below lines are coming again and again and halting my codes. This below lines coming again and again in console whenever i am opening the RStudio. Don't know how to deal with this problem. Please help me to solve this problem. I am also attaching a picture which will show my problem properly.
Loading required package: phyloseq
Error in .requirePackage(package) :
unable to find required package ‘phyloseq’
In addition: Warning message:
In library(package, lib.loc = lib.loc, character.only = TRUE, logical.return = TRUE, :
there is no package called ‘phyloseq’
Thanks & Regards
Rishikesh
I haven't tried anything yet to solve this problem. But one person telling me this problem arises due to dependency packages of phyloseq. Please help me to solve this problem.
It is not a package dependency issue, looks like you have somehow added this package as a start-up required to your .Rprofile file.
locate your .Rprofile file (you might have several, the default should be located at your home directory ~/.Rprofile on MacOS/Linux), open it with a text editor and remove the line with phyloseq (could be like library(phyloseq).
If you couldn't find the file or edit it for any reason, the easiest solution could be just reinstalling the package, that would probably do the job for you as well.

Why am I getting this error when loading the redist package in R?

I've recently run into an error that I have not encountered before in RStudio. I'm currently using the newest version of R, 4.1.2. I've installed a package called "redist" and when I load the package in RStudio, I get the following error:
Error: package or namespace load failed for ‘redist’:
.onLoad failed in loadNamespace() for 'units', details:
call: udunits_init(path)
error: no database found!
The following code snippet ist what I used to install and run the package.
install.packages("redist", dependencies = TRUE)
library(installr)
I'm not really sure where to look for this error or how to fix this. Has anyone run into something similiar or does anyone have any advice on what to do?
Messing around with some things, I've come upon a solution that works, even though this may be related to the package itself.
Before loading the redist package, it's necessary to load the udunits2 package. Loading the library then works.

Unable to install 'Velocyto.R' from Github

I am a beginner in R
trying to analyze my scRNA-seq data with velocyto.R in R studio.
Following velocyto tutorial, I tried installing velocyto.R as below:
library(devtools)
install_github("velocyto-team/velocyto.R")
But, an error pops up:
ERROR: compilation failed for package 'velocyto.R'
removing 'C:/Users/USER/Documents/R/win-library/3.6/velocyto.R'
Error: Failed to install 'velocyto.R' from GitHub:
(converted from warning) installation of package ‘C:/Users/USER/AppData/Local/Temp/RtmpukpRFl/file37346a812b86/velocyto.R_0.6.tar.gz’ had non-zero exit status
Is there anyone to face the same problem described above and succeed in resolving it after all?
I desperately need helps!
Thanks
As your error log says C:/..., you probably use Windows. According to velocyto's README it seems that this package runs only on unix-flavored systems with C++11, Open MP, boost, igraph and hdf5c++ libraries.
This can be the problem: read the velocyto's GitHub issue #40, maybe you'll need to run this under WSL...?

Error in loadNamespace(name) : there is no package called 'evaluate'

While adding code chuncks to my .rmd file a la:
```{r} %code chunck
```
it can't be compiled anymore, and i get a loadnamespace(name) error:
Error in loadNamespace(name) :
there is no package called 'evaluate' calls:<Anonymous> ... tryCatch-> Trycatchlist->trycatchoone
Has anyone ever experienced it? And how do I resolve it?
Try install.packages("evaluate") and then reattempt compilation. It was probably uninstalled unintentionally at some point.
if it is not installed after tying install.packages('evaluate')then,press ctrl + shift + f10 on RStudio console so this command will restart R session and then try to use install.packages('evaluate') command on RStudio console.
For me, the solution was just to install the hexbin package: install.packages("hexbin")
Creating a new R session and installing the package again worked for me.

Error in running swirl package in R

I am not able to work in swirl package in R. I am able to install the swirl
package correctly. But while giving the library("swirl") command the error comes up.I have tried every thing like I am not able to find the answer of this error on internet. I have reinstalled R complete. I have tried changing directory. But still this error message is coming. Please help.This is the error message:
library("swirl")
Error in get(Info[i, 1], envir = env) :
cannot open file
'C:/Users/Devender/Documents/R/win-library/3.2/httr/R/httr.rdb': No such
file or directory
Error: package or namespace load failed for ‘swirl’
Thanks alot in advance
Try installing httr package. I think it will solve your problem.
You did not say which R version you are using.
Some Swirl packages are not available for few R versions as 3.2.2. You cant even download any courses from Github repositories into the Swirl if Swirl was successfully loaded in R.
You may want to re-install a different version of R to avoid this Swirl issue, and try again.

Resources