davidebolo1993 / NanoR

Nanopore data analysis in R
GNU Lesser General Public License v3.0
38 stars 10 forks source link

I cannot install NanoR package #13

Closed Tschubaty closed 4 years ago

Tschubaty commented 4 years ago

R version 3.6.1 (2019-07-05) -- "Action of the Toes" Copyright (C) 2019 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 (64-bit)

installation prerequisites

ipak <- function(pkg){ new.pkg <- pkg[!(pkg %in% installed.packages()[, "Package"])] if (length(new.pkg)) install.packages(new.pkg, dependencies = TRUE, repos="http://cran.cnr.berkeley.edu/") sapply(pkg, require, character.only = TRUE) } packages <- c("ggplot2","reshape2","RColorBrewer","scales","gridExtra") ipak(packages) if (!requireNamespace("BiocManager", quietly = TRUE)) install.packages("BiocManager") packages<-c('rhdf5', 'ShortRead') BiocManager::install(packages)

  ggplot2     reshape2 RColorBrewer       scales    gridExtra 
     TRUE         TRUE         TRUE         TRUE         TRUE 

package ‘rhdf5’ successfully unpacked and MD5 sums checked package ‘ShortRead’ successfully unpacked and MD5 sums checked

install.packages('C:/Users/owner/Documents/GitHub/NanoR.tar.gz', repos=NULL)

Installing package into ‘C:/Users/owner/Documents/R/win-library/3.6’ (as ‘lib’ is unspecified) Warning: invalid package 'C:/Users/owner/Documents/GitHub/NanoR.tar.gz' Error: ERROR: no packages specified Warning in install.packages : installation of package ‘C:/Users/owner/Documents/GitHub/NanoR.tar.gz’ had non-zero exit status

What am I missing here, that it does not get installed?

davidebolo1993 commented 4 years ago

Hi @Tschubaty.

Thanks for getting in touch. From the path you specified ('C:/Users/owner/Documents/GitHub/NanoR.tar.gz', repos=NULL) it seems to me that you are a Windows user. Generally speaking, Windows users have to replace all "/" with double "\". This is true for all the paths you specify within the R environment.

For your example

'C:/Users/owner/Documents/GitHub/NanoR.tar.gz'

The correct path should be:

'C:\\Users\\owner\\Documents\\GitHub\\NanoR.tar.gz'

This will probably solve your problem.

Tschubaty commented 4 years ago

Thx, the file string path was the problem. install.packages("C:/Users/owner/Documents/GitHub/NanoR/NanoR.tar.gz", repos=NULL) worked