install.packages("ggplot2", ...">

Setting ggplot error "subscript out of bounds"

$ R R version 2.12.2 (2011-02-25) Platform: i486-pc-linux-gnu (32-bit) > install.packages("ggplot2", dep="T") Error in apply(available[p1, dependencies, drop = FALSE], 1L, function(x) paste(x[!is.na(x)], : subscript out of bounds 

What can I do to install ggplot2?

+3
source share
1 answer

Read feature help! From ?install.packages we have:

 dependencies: logical indicating to also install uninstalled packages on which these packages depend/suggest/import (and so on recursively). Not used if 'repos = NULL'. Can also be a character vector, a subset of 'c("Depends", "Imports", "LinkingTo", "Suggests", "Enhances")'. 

So this clearly indicates that you need to specify a boolean value, TRUE or FALSE . "T" not a logical TRUE and is not a T Always specify TRUE and FALSE , otherwise you may encounter many problems. Do not clap to save a few keystrokes.

As I showed in the answer to the previous Q:

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

working. So why did you change what I showed that you really worked?

+4
source

All Articles