This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Problem with R tools from command line.

Hey everyone. I think I ran something that seriously messed up my computer. either the path or root. not sure what I ran or what term to use to describe whats going on now. The problem is, I have installed previously everything I need concerning r, python, etc and I am able to successfully execute python or r script smoothly. But recently I just cant do anything and each time i try to start installation I would get a version error and all sorts of error. Is anyone able to help me get back to the PAth or directory so I dont have to do all this installation again?

Examples below.

Example: I previously had Sushi, but since when running my script its saying there is no sushi.

BiocManager::install("Sushi") -bash: syntax error near unexpected token `"Sushi"' or from r

install.packages("Sushi")

package ‘Sushi’ is not available (for R version 3.6.0)

rna-seq heatmap

Maybe show some error messages?

Example: I previously had Sushi, but since when running my script its saying there is no sushi.

 BiocManager::install("Sushi")
-bash: syntax error near unexpected token `"Sushi"'

or from r

> install.packages("Sushi")

package ‘Sushi’ is not available (for R version 3.6.0)

2 answers

It's a bioconductor package : https://bioconductor.org/packages/release/bioc/html/Sushi.html

Please use this to install it :

> if (!requireNamespace("BiocManager", quietly = TRUE))
>     install.packages("BiocManager")
> 
> BiocManager::install("Sushi")

I get this by copying pasting and running it.

-bash: !requireNamespace: event not found

You have to run this from inside R not from bash.

Oh ok. I ran it in r, it ran and returned this message

> Warning messages: 1: In file.createf.tg) :   cannot create file
> '/usr/local/Cellar/r/3.6.0_2/lib/R/doc/html/packages.html', reason
> 'Permission denied' 2: In make.packages.html(.Library) : cannot update
> HTML package index

Looks like you're using homebrew to manage R. Remember to either pin the R version (using brew pin R) or uninstall completely and use conda to manage R installation. R packages can break between even minor version changes and such an update can cause a lot of trouble if you're not careful whenever you run a brew upgrade

This have solved all my installation issues and you were very correct. I unstalled it with brew then reinstalled the r with conda and all downloads went back to normal. Thanks again

Glad it helped. I manage my R and python with conda. When you manage R with conda though, there will be complications installing certain packages (I don't know what's common to the problematic packages, perhaps compilation/linking) - you'd need to use

conda install r-<package_name>

and

conda install bioconductor-<bioc_package_name>

instead of

install.package('<package_name>')

and

BiocManager::install('<bioc_package_name>')

Keep that in mind when installs fail.

Try conda search <package_name> to find out if conda can install a failed R package for you.

Log in to answer this question.