Skip to content

Commit

Permalink
Minor change
Browse files Browse the repository at this point in the history
  • Loading branch information
stormplot committed Jan 5, 2012
1 parent eff352f commit 47436e8
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions R/LoadPackages.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,11 @@ LoadPackages <- function(repo="http://cran.r-project.org") {
suppressPackageStartupMessages(require("tcltk"))

if (any(is.missing)) {
contriburl <- contrib.url(repos=repo, type=getOption("pkgType"))
missing.pkgs <- pkgs[is.missing]

msg <- paste("The following packages used by RSurvey are missing:",
paste(" ", paste(missing.pkgs, collapse=", ")),
"Without these packages, some features will not be available.",
"Install these packages from CRAN?", sep="\n")

if (is.tcl)
ans <- as.character(tkmessageBox(icon="error", message=msg,
title="Missing Packages", type="yesno"))
Expand All @@ -33,6 +30,7 @@ LoadPackages <- function(repo="http://cran.r-project.org") {
is.install <- tolower(substr(ans, 1, 1)) == "y"

if (is.install) {
contriburl <- contrib.url(repos=repo, type=getOption("pkgType"))
cran.pkgs <- available.packages(contriburl)
if (!all(missing.pkgs %in% cran.pkgs))
repo <- NULL
Expand Down

0 comments on commit 47436e8

Please sign in to comment.