2011-04-02 9 views
6
$ R 
R version 2.12.2 (2011-02-25) 
Platform: i486-pc-linux-gnu (32-bit) 

> install.packages("ggplot") 
Warning message: 
In getDependencies(pkgs, dependencies, available, lib) : 
    package ‘ggplot’ is not available 

> install.packages("ggplot", dep="T") 
Error in apply(available[p1, dependencies, drop = FALSE], 1L, function(x) paste(x[!is.na(x)], : 
    subscript out of bounds 
In addition: Warning message: 
In getDependencies(pkgs, dependencies, available, lib) : 
    package ‘ggplot’ is not available 

> install.packages("ggplot", dep="T", type="source") 
Error in apply(available[p1, dependencies, drop = FALSE], 1L, function(x) paste(x[!is.na(x)], : 
    subscript out of bounds 
In addition: Warning message: 
In getDependencies(pkgs, dependencies, available, lib) : 
    package ‘ggplot’ is not available 

मैं ggplot कैसे स्थापित कर सकते हैं "पैकेज 'ggplot' उपलब्ध नहीं है"?स्थापित कर रहा है ggplot और "सीमा से बाहर सबस्क्रिप्ट" त्रुटियों

उत्तर

18

आपके पास पैकेज का नाम गलत है - यह अब कुछ साल पहले हैडली द्वारा एक प्रमुख पुनर्लेखन के बाद ggplot2 है। मुझे लगता है कि पुराना ggplot पैकेज सीआरएएन से हटा दिया गया है।

install.packages("ggplot2", dependencies = TRUE) 

यह मैं क्या मिलता है:

R> install.packages("ggplot2", dependencies = TRUE) 
Installing package(s) into ‘/home/gavin/R/libs’ 
(as ‘lib’ is unspecified) 
trying URL 'http://cran.uk.r-project.org/src/contrib/ggplot2_0.8.9.tar.gz' 
Content type 'application/x-gzip' length 2074749 bytes (2.0 Mb) 
opened URL 
================================================== 
downloaded 2.0 Mb 

* installing *source* package ‘ggplot2’ ... 
** R 
** data 
** moving datasets to lazyload DB 
** inst 
** help 
*** installing help indices 
** building package indices ... 
** testing if installed package can be loaded 

* DONE (ggplot2) 

The downloaded packages are in 
    ‘/tmp/RtmpPcn8bl/downloaded_packages’ 
+0

आप निर्भरता स्थापित तो आप एक बहुत अधिक देखेंगे की तुलना में मैं ऊपर से पता चला नहीं है, तो। –

+0

धन्यवाद! कृपया मेरा अनुवर्ती प्रश्न देखें: http://stackoverflow.com/questions/5522924/installing-ggplot-subscript-out-of-bounds-error। – GaBorgulya

+0

@GaBorgulya आपको वास्तव में ऐसे क्यू-क्यू क्यू पोस्ट करने के लिए मौजूदा क्यू को संपादित करना चाहिए, एक नया शुरू नहीं करना चाहिए। यदि आप वास्तव में कोड चलाते हैं तो मैंने दिखाया कि यह काम करेगा। यदि आप वर्किंग कोड बदलना चाहते हैं तो ब्रेक होने पर आश्चर्यचकित न हों। –

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