2012-06-16 19 views
5

समस्या निवारण मैं http CRAN-रिपॉजिटरी बनाने का तरीका जानने का प्रयास कर रहा हूं। मैंने बिना किसी वास्तविक सफलता के local CRAN repository का पालन करने का प्रयास किया है।एक वेबसर्वर CRAN भंडार बनाना - निर्देशिका संरचना

मूल रूप से मैं अपने स्थानीय भंडार ऊपर इस तरह निर्धारित किया है (मुझे यकीन है कि स्रोत सूची Sens बनाता है नहीं कर रहा हूँ, लेकिन मैं यह सिर्फ मामले में जोड़ा):

library(tools) 
reposRoot <- "C:\\Software\\repository" 
r_ver <- "2.15" 
contribPaths <- c(source = "src\\contrib", windows = "bin\\windows\\contrib") 
write_PACKAGES(paste(reposRoot, contribPaths["windows"], r_ver, sep="\\"), 
       type="win.binary", 
       unpacked=FALSE, 
       latestOnly=FALSE, 
       verbose=TRUE) 
write_PACKAGES(paste(reposRoot, contribPaths["source"], r_ver, sep="\\"), 
       type="source", 
       unpacked=FALSE, 
       latestOnly=FALSE, 
       verbose=TRUE) 

मैं तो करने के लिए भंडार अपलोड कर दिया है मेरी वेबसर्वर: cran.gforge.se लेकिन जब मैं संकुल मैं खोजने के लिए प्रयास करें:

> available.packages(contriburl="http://cran.gforge.se") 
Warning: unable to access index for repository http://cran.gforge.se 
    Package Version Priority Depends Imports LinkingTo Suggests Enhances OS_type License Archs 
    File Repository 

तो मेरी निष्कर्ष यह है कि यह भंडार लेकिन अजीब हिस्सा नहीं मिल रहा है है जब मैं कोशिश:

> available.packages(contriburl="http://cran.gforge.se/bin/windows/contrib/2.15") 
     Package Version Priority Depends             Imports 
Gmisc "Gmisc" "0.2" NA  "grid, testthat, miscTools, rms, Hmisc, survival, cmprsk" NA  
     LinkingTo Suggests Enhances OS_type License  Archs File 
Gmisc NA  NA  NA  NA  "GPL (>= 2)" NA NA 
     Repository              
Gmisc "http://cran.gforge.se/bin/windows/contrib/2.15/./src/contrib" 

यह वास्तव में मेरा सुंदर पैकेज पाता है लेकिन पथ सभी मिश्रित है। अगर मैं चलाने का प्रयास एक स्थापित मैं इस:

> install.packages("Gmisc", contriburl="http://cran.gforge.se/") 
Installing package(s) into ‘C:/Users/max/R/win-library/2.15’ 
(as ‘lib’ is unspecified) 
Warning in install.packages : 
    package ‘Gmisc’ is not available (for R version 2.15.0) 
> install.packages("Gmisc", contriburl="http://cran.gforge.se/bin/windows/contrib/2.15") 
Installing package(s) into ‘C:/Users/max/R/win-library/2.15’ 
(as ‘lib’ is unspecified) 
trying URL 'http://cran.gforge.se/bin/windows/contrib/2.15/./src/contrib/Gmisc_0.2.zip' 
Warning in install.packages : 
    cannot open: HTTP status was '500 Internal Server Error' 
Error in download.file(url, destfile, method, mode = "wb", ...) : 
    cannot open URL 'http://cran.gforge.se/bin/windows/contrib/2.15/./src/contrib/Gmisc_0.2.zip' 
Warning in install.packages : 
    download of package ‘Gmisc’ failed 

मैं the manual और SONIVIS wiki में किसी भी मदद के लिए देखा है, लेकिन मैं अंधा होना चाहिए ... कृपया मुझे गाइड: एस

उत्तर

3

कुछ खोज के बाद मैंने पाया है कि:

  1. पैकेज R CMD BUILD द्वारा नहीं बल्कि R CMD INSTALL --build
  2. इसके बजाय रेपोस के साथ काम करने contriburl ऐसा लगता है का उपयोग करने का

    द्वारा बनाया जाना चाहिए:

    install.packages ("Gmisc", repos = c ("http://ftp.sunet.se/pub/lang/CRAN", "http://cran.gforge.se"), निर्भरता = TRUE)

संबंधित मुद्दे