2012-10-12 13 views
8

मैं एक नया लैपटॉप Gentoo चल रहा सेट कर रहा हूं और आर स्थापित करने के लिए इच्छा से स्थापित करने (के रूप में मैं अपने सभी कंप्यूटरों पर करते हैं!)।समस्याएं आर संकुल

हालांकि, मैं एक समस्या का एक सा पहुंच जाते हैं जब यह संकुल स्थापित करने के लिए आता है।

मैं पहली बार करने की कोशिश की:

> install.packages(c("ggplot2", "plyr", "reshape2")) 

और यह विधिवत संकुल और इसकी निर्भरता के सभी डाउनलोड किया। हालांकि उन्होंने रिपोर्टिंग इंस्टॉल नहीं की थी।

Error in library(data.table) : there is no package called ‘data.table’ 
Calls: .First -> library 
Execution halted 
Error in library(data.table) : there is no package called ‘data.table’ 
Calls: .First -> library 
Execution halted 
Error in library(data.table) : there is no package called ‘data.table’ 
Calls: .First -> library 
Execution halted 
Error in library(data.table) : there is no package called ‘data.table’ 
Calls: .First -> library 
Execution halted 
Error in library(data.table) : there is no package called ‘data.table’ 
Calls: .First -> library 
Execution halted 
Error in library(data.table) : there is no package called ‘data.table’ 
Calls: .First -> library 
Execution halted 
Error in library(data.table) : there is no package called ‘data.table’ 
Calls: .First -> library 
Execution halted 
Error in library(data.table) : there is no package called ‘data.table’ 
Calls: .First -> library 

नहीं एक समस्या मैं सिर्फ data.table पैकेज स्थापित करेंगे, दुर्भाग्य से ...

> install.packages("data.table") 
trying URL 'http://cran.uk.r-project.org/src/contrib/data.table_1.8.2.tar.gz' 
Content type 'application/x-gzip' length 818198 bytes (799 Kb) 
opened URL 
================================================== 
downloaded 799 Kb 

Error in library(data.table) : there is no package called ‘data.table’ 
Calls: .First -> library 
Execution halted 

The downloaded source packages are in 
    ‘/tmp/RtmpbQtALj/downloaded_packages’ 
Updating HTML index of packages in '.Library' 
Making packages.html ... done 
Warning message: 
In install.packages("data.table") : 
    installation of package ‘data.table’ had non-zero exit status 

और वहाँ क्यों स्थापना बिल्कुल विफल रही है का कोई संकेत नहीं है, इसलिए मुझे पता नहीं है इसे हल करने के बारे में कैसे जाना है? एक ट्रेसबैक() या तो उपलब्ध नहीं है।

जीसीसी स्थापित किया है और जीसीसी-config शो के निर्गम (और तथ्य यह है कि मुझे कोई समस्या नहीं स्रोत से अन्य सॉफ्टवेयर स्थापित कर सकते हैं) के रूप में किया गया है।

# gcc-config -l 
[1] x86_64-pc-linux-gnu-4.6.3 * 

इस को हल करने के तरीके के बारे में बताया गया है। install.packages() से अधिक जानकारी प्राप्त करने के तरीके पर कोई विचार या विचार आपका स्वागत है।

संपादित करें: अनुरोध के रूप में सबसे पहले की सामग्री को ....

> .First 
function() 
{ 
    library(data.table) 
    library(foreign) 
    library(ggplot2) 
    library(Hmisc) 
    library(lattice) 
    library(plyr) 
    library(rms) 
    library(xtable) 
    cat("\nWelcome at", date(), "\n") 
} 

संपादित करें 2: कोई Rprofile.site लेकिन वहाँ/usr/lib64/आर/पुस्तकालय/आधार/आर/Rprofile है जो। ...

# cat /usr/lib64/R/library/base/R/Rprofile 
### This is the system Rprofile file. It is always run on startup. 
### Additional commands can be placed in site or user Rprofile files 
### (see ?Rprofile). 

### Notice that it is a bad idea to use this file as a template for 
### personal startup files, since things will be executed twice and in 
### the wrong environment (user profiles are run in .GlobalEnv). 

.GlobalEnv <- globalenv() 
attach(NULL, name = "Autoloads") 
.AutoloadEnv <- as.environment(2) 
assign(".Autoloaded", NULL, envir = .AutoloadEnv) 
T <- TRUE 
F <- FALSE 
R.version <- structure(R.Version(), class = "simple.list") 
version <- R.version   # for S compatibility 

## for backwards compatibility only 
R.version.string <- R.version$version.string 

## NOTA BENE: options() for non-base package functionality are in places like 
##   --------- ../utils/R/zzz.R 

options(keep.source = interactive()) 
options(warn = 0) 
# options(repos = c(CRAN="@[email protected]")) 
# options(BIOC = "http://www.bioconductor.org") 

options(timeout = 60) 
options(encoding = "native.enc") 
options(show.error.messages = TRUE) 
## keep in sync with PrintDefaults() in ../../main/print.c : 
options(scipen = 0) 
options(max.print = 99999)# max. #{entries} in internal printMatrix() 
options(add.smooth = TRUE)# currently only used in 'plot.lm' 
options(stringsAsFactors = TRUE) 
if(!interactive() && is.null(getOption("showErrorCalls"))) 
    options(showErrorCalls = TRUE) 

local({dp <- Sys.getenv("R_DEFAULT_PACKAGES") 
     if(identical(dp, "")) # marginally faster to do methods last 
      dp <- c("datasets", "utils", "grDevices", "graphics", 
        "stats", "methods") 
     else if(identical(dp, "NULL")) dp <- character(0) 
     else dp <- strsplit(dp, ",")[[1]] 
     dp <- sub("[[:blank:]]*([[:alnum:]]+)", "\\1", dp) # strip whitespace 
     options(defaultPackages = dp) 
    }) 

## Expand R_LIBS_* environment variables. 
Sys.setenv(R_LIBS_SITE = 
      .expand_R_libs_env_var(Sys.getenv("R_LIBS_SITE"))) 
Sys.setenv(R_LIBS_USER = 
      .expand_R_libs_env_var(Sys.getenv("R_LIBS_USER"))) 

.First.sys <- function() 
{ 
    for(pkg in getOption("defaultPackages")) { 
     res <- require(pkg, quietly = TRUE, warn.conflicts = FALSE, 
         character.only = TRUE) 
     if(!res) 
      warning(gettextf('package %s in options("defaultPackages") was not found',  sQuote(pkg)), 
        call.=FALSE, domain = NA) 
    } 
} 

.OptRequireMethods <- function() 
{ 
     if("methods" %in% getOption("defaultPackages")) { 
     res <- require("methods", quietly = TRUE, warn.conflicts = FALSE, 
         character.only = TRUE) 
     if(!res) 
      warning('package "methods" in options("defaultPackages") was not found', call.=FALSE) 
    } 
} 

if(nzchar(Sys.getenv("R_BATCH"))) { 
    .Last.sys <- function() 
    { 
     cat("> proc.time()\n") 
     print(proc.time()) 
    } 
    ## avoid passing on to spawned R processes 
    ## A system has been reported without Sys.unsetenv, so try this 
    try(Sys.setenv(R_BATCH="")) 
} 
###-*- R -*- Unix Specific ---- 

.Library <- file.path(R.home(), "library") 
.Library.site <- Sys.getenv("R_LIBS_SITE") 
.Library.site <- if(!nchar(.Library.site)) file.path(R.home(), "site-library") else unlist(strsplit(.Library.site, ":")) 
.Library.site <- .Library.site[file.exists(.Library.site)] 

invisible(.libPaths(c(unlist(strsplit(Sys.getenv("R_LIBS"), ":")), 
         unlist(strsplit(Sys.getenv("R_LIBS_USER"), ":") 
        )))) 

local({ 
## we distinguish between R_PAPERSIZE as set by the user and by configure 
papersize <- Sys.getenv("R_PAPERSIZE_USER") 
if(!nchar(papersize)) { 
    lcpaper <- Sys.getlocale("LC_PAPER") # might be null: OK as nchar is 0 
    papersize <- if(nchar(lcpaper)) 
     if(length(grep("(_US|_CA)", lcpaper))) "letter" else "a4" 
    else Sys.getenv("R_PAPERSIZE") 
} 
options(papersize = papersize, 
     printcmd = Sys.getenv("R_PRINTCMD"), 
     dvipscmd = Sys.getenv("DVIPS", "dvips"), 
     texi2dvi = Sys.getenv("R_TEXI2DVICMD"), 
     browser = Sys.getenv("R_BROWSER"), 
     pager = file.path(R.home(), "bin", "pager"), 
     pdfviewer = Sys.getenv("R_PDFVIEWER"), 
     useFancyQuotes = TRUE) 
}) 

## non standard settings for the R.app GUI of the Mac OS X port 
if(.Platform$GUI == "AQUA") { 
    ## this is set to let RAqua use both X11 device and X11/TclTk 
    if (Sys.getenv("DISPLAY") == "") 
    Sys.setenv("DISPLAY" = ":0") 

    ## this is to allow gfortran compiler to work 
    Sys.setenv("PATH" = paste(Sys.getenv("PATH"),":/usr/local/bin",sep = "")) 
}## end "Aqua" 

local({ 
    tests_startup <- Sys.getenv("R_TESTS") 
    if(nzchar(tests_startup)) source(tests_startup) 
}) 
+0

से शुरू होने पर प्रमोफाइल फ़ाइल आपके Rprofile में आपके पास क्या है? विशेष रूप से, आपने 'पहला' कैसे परिभाषित किया है? – GSee

+0

मैं एक .Rprofile (के रूप में मैं रूट के रूप में विश्व स्तर पर संकुल स्थापित करने हूँ, लेकिन मेरा लॉगिन उपयोगकर्ता के रूप में आर का उपयोग करें) नहीं है। मैं – slackline

+0

क्या Rprofile.site में है ऊपर प्रथम के उत्पादन/सामग्री जोड़ दिया है? – GSee

उत्तर

6

तरह data.tableinstall.packages आदेश चल रहा है उपयोगकर्ता के लिए स्थापित नहीं है लगता है। मुझे लगता है कि if (interactive()) { } में लपेटकर कि .First समारोह सामान्य रूप में एक अच्छा विचार होगा। अन्यथा, आपको data.table और install.packages से स्टार्टअप पर लोड होने वाले किसी भी अन्य पैकेज को स्थापित करने की आवश्यकता है।

+0

यह चाल है, क्योंकि मैं आर शुरू कर रहा हूं और फिर वैकल्पिक आर सीएमडी इंस्टॉलेशन विधि के बजाय install.packages() चला रहा हूं, मैंने आर को फिर से शुरू किया - अरविना ध्वज और डेटाटेबल्स की स्थापना और अन्य सभी पैकेजों ने ठीक काम किया है । सूचक के लिए धन्यवाद। – slackline

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