Failed to install package on R 3.0.2

I am using Win64 and cannot install the "brilliant" package on R. When I try to install the following message, it fills up. Can someone please put me on the right track or am I missing something really stupid here?

> install.packages("shiny")
Installing package into β€˜C:/Users/Ayan/Documents/R/win-library/3.0’
(as β€˜lib’ is unspecified)
--- Please select a CRAN mirror for use in this session ---
Warning: unable to access index for repository http://ftp.iitm.ac.in/cran/bin/windows/contrib/3.0
Warning: unable to access index for repository http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/3.0
Warning messages:
1: In open.connection(con, "r") : unable to resolve 'cran.r-project.org'
2: package β€˜shiny’ is not available (for R version 3.0.2)

I tried using India, Cloud (0) as a CRAN mirror

contents of ui.R file:

library(shiny)

# Define UI for application that plots random distributions 
shinyUI(pageWithSidebar(

# Application title
 headerPanel("Hello Shiny!"),

  # Sidebar with a slider input for number of observations
  sidebarPanel(
    sliderInput("obs", 
            "Number of observations:", 
            min = 1,
            max = 1000, 
            value = 500)
  ),

  # Show a plot of the generated distribution
  mainPanel(
    plotOutput("distPlot")
  )
))

contents of server.R file:

    library(shiny)

    # Define server logic required to generate and plot a random distribution
shinyServer(function(input, output) {

  # Expression that generates a plot of the distribution. The expression
  # is wrapped in a call to renderPlot to indicate that:
  #
  #  1) It is "reactive" and therefore should be automatically 
  #     re-executed when inputs change
  #  2) Its output type is a plot 
  #
  output$distPlot <- renderPlot({

    # generate an rnorm distribution and plot it
        dist <- rnorm(input$obs)
        hist(dist)
      })
    })

Also I ran into the problem of installing holdOut package for classification problem. Here is what he shows:

> install.packages("holdOut")
Installing package into β€˜C:/Users/Ayan/Documents/R/win-library/3.0’
(as β€˜lib’ is unspecified)
Warning in install.packages :
  package β€˜holdOut’ is not available (for R version 3.0.2)

Are these 2 issues related?

+3
source share
2 answers

Try:

options(repos = c(CRAN = "http://cran.rstudio.com"))
install.packages('shiny')
+12
source

Just stop your firewall and antivirus, and then install the package. It worked for me

-2
source

All Articles