how to install a R package from github manually or offline -


i try download tsdyn package github (it not yet updated on cran) proxy prevents me connect github.

library(devtools) install_github("matthieustigler/tsdyn", ref="dev94", subdir="tsdyn")   downloading github repo matthieustigler/tsdyn@dev94 erreur dans function (type, msg, aserror = true)  :  failed connect api.github.com port 443: connection refused 

then downloaded .zip , tried install package .zip , got error :

erreur dans read.dcf(file.path(pkgname, "description"), c("package",     "type")) :  impossible d'ouvrir la connexion de plus : message d'avis : in read.dcf(file.path(pkgname, "description"), c("package", "type")) : impossible d'ouvrir le fichier compressé 'tsdyn-master/description', cause probable : 'no such file or directory'  

i don't understand since can find description file in repository. think trying connect internet not allowed professional connexion. found people linux succeeded have downloaded port 443 (port 8000 must allowed think not sure) have windows 7. have administrator credentials , doesn't work either when try use r administrator. don't know proxy configuration if have idea, please try more specific possible actions should do.

thanks lot advance !

edit1 : tried proposal, , remove unnecessary level in file repository, made

rscript -e "install.packages ('c:/users/stephanie/downloads/tsdyn.zip',repos=null) "  

and got terminal "installing package 'c:/users/stephanie/documents/r/win-library/3.1' (as 'lib' unspecified). seemed work when use command library(tsdyn) in r got "erreur dans library(tsdyn), 'tsdyn' n'est pas un nom correct de package installé" (is not proper name of installed package in english guess). though, files exist in win-library noticed files md5 , index present in other package directories not present here. idea ?

edit2 : found solution, removing advised unnecessary level, used next install function of devtools , worked (offline)...

library(devtools) install("c:/users/stephanie/downloads/tsdyn") 

i don't understand difference terminal command so, if can give me clue, have solved pb interested in understanding how !

either move 1 level don't have intermediary folder called tsdyn , can then:

install_github("matthieustigler/tsdyn") 

or leave things and

install_github("matthieustigler/tsdyn/tsdyn") 

the proof in pudding

library(devtools) install_github("matthieustigler/tsdyn/tsdyn")      # downloading github repo matthieustigler/tsdyn@master # installing tsdyn # "c:/progra~1/r/r-31~1.2/bin/x64/r" --vanilla cmd install  \ #   "c:/users/dominic/appdata/local/temp/rtmpiwfhuz/devtools30d0779d2870/matthieustigler-tsdyn-8048816/tsdyn"  \ #   --library="d:/copy/r/win-library/3.1" --install-tests  #  # * installing *source* package 'tsdyn' ... # ** libs #  # *** arch - i386 # gcc -m32 -i"c:/progra~1/r/r-31~1.2/include" -dndebug     -i"d:/rcompile/cranpkg/extralibs64/local/include"     -o3 -wall  -std=gnu99 -mtune=core2 -c llar.c -o llar.o # gcc -m32 -i"c:/progra~1/r/r-31~1.2/include" -dndebug     -i"d:/rcompile/cranpkg/extralibs64/local/include"     -o3 -wall  -std=gnu99 -mtune=core2 -c misc.c -o misc.o # gcc -m32 -i"c:/progra~1/r/r-31~1.2/include" -dndebug     -i"d:/rcompile/cranpkg/extralibs64/local/include"     -o3 -wall  -std=gnu99 -mtune=core2 -c search.c -o search.o # gcc -m32 -shared -s -static-libgcc -o tsdyn.dll tmp.def llar.o misc.o search.o -ld:/rcompile/cranpkg/extralibs64/local/lib/i386 -ld:/rcompile/cranpkg/extralibs64/local/lib -lc:/progra~1/r/r-31~1.2/bin/i386 -lr # installing d:/copy/r/win-library/3.1/tsdyn/libs/i386 #  # *** arch - x64 # gcc -m64 -i"c:/progra~1/r/r-31~1.2/include" -dndebug     -i"d:/rcompile/cranpkg/extralibs64/local/include"     -o2 -wall  -std=gnu99 -mtune=core2 -c llar.c -o llar.o # gcc -m64 -i"c:/progra~1/r/r-31~1.2/include" -dndebug     -i"d:/rcompile/cranpkg/extralibs64/local/include"     -o2 -wall  -std=gnu99 -mtune=core2 -c misc.c -o misc.o # gcc -m64 -i"c:/progra~1/r/r-31~1.2/include" -dndebug     -i"d:/rcompile/cranpkg/extralibs64/local/include"     -o2 -wall  -std=gnu99 -mtune=core2 -c search.c -o search.o # gcc -m64 -shared -s -static-libgcc -o tsdyn.dll tmp.def llar.o misc.o search.o -ld:/rcompile/cranpkg/extralibs64/local/lib/x64 -ld:/rcompile/cranpkg/extralibs64/local/lib -lc:/progra~1/r/r-31~1.2/bin/x64 -lr # installing d:/copy/r/win-library/3.1/tsdyn/libs/x64 # ** r # ** data # ** inst # ** tests # ** preparing package lazy loading # ** # *** installing indices # ** building package indices # ** installing vignettes # ** testing if installed package can loaded # *** arch - i386 # *** arch - x64 # * done (tsdyn)  library(tsdyn) tsdyn::autopairs  # function (x, lag = 1, h, type = c("levels", "persp", "image",  #     "lines", "points", "regression"))  # { #     panel <- list(levels = function() sm::sm.density(x, h = rep(h,  #         2), xlab = xlab, ylab = ylab, main = "density", display = "slice"),  #         persp = function() sm::sm.density(x, h = rep(h, 2), xlab = xlab,  #             ylab = ylab, main = "density", display = "persp"),  #         image = function() sm::sm.density(x, h = rep(h, 2), xlab = xlab,  #             ylab = ylab, main = "density", display = "image"),  #         lines = function() plot(x, xlab = xlab, ylab = ylab,  #             main = "lines", type = "l"), points = function() plot(x,  #             xlab = xlab, ylab = ylab, main = "scatter"), regression = function() sm::sm.regression(x[,  #             1], x[, 2], h = h, xlab = xlab, ylab = ylab, main = "regression",  #             ask = false)) #     lags <- c(-lag, 0) #     x <- embedd(x, lags = lags) #     xlab <- paste("lag", lag) #     ylab <- paste("lag", 0) #     type <- match.arg(type) #     if (missing(h)) { #         h <- sm::hnorm(x)[1] #     } #     panel[[type]]() # } # <environment: namespace:tsdyn> 

Comments

Popular posts from this blog

javascript - AngularJS custom datepicker directive -

javascript - jQuery date picker - Disable dates after the selection from the first date picker -