Fahrenheit to Celsius Conversion Application

Ed Zarek
December 26, 2015

OVERVIEW

  • The following application is used calculate the degrees Celsius from a data entry in Fahrenheit degrees.
  • The product is quite useful for the international traveler who needs comparable weather information when traveling to the United States from overseas.
  • This product can be viewed within R Studio or an external web browser.
  • View the application at the following link: linked phrase

INSTRUCTIONS FOR USE

  • The temperature conversion app is easy to use.
  • The right hand panel is an input window to select a temperature in Fahrenheit degrees.The scale of this runs from minus 25 degrees Fahrenheit to 100 degrees Fahrenheit. The default range can be adjusted to local weather conditions.
  • The interactive code automatically updates and provides the precise conversion to Celsius.
  • The code engine uses the accepted formula \( (F-32)*(5/9)=C \)

R CODE: SERVER.R

library("shiny")
shinyServer(function(input, output) {
        output$text1 <- renderText({
                paste("You have selected", input$temp1, "degrees Farenheit")
        })

        output$text2 <- renderText({
                paste(
                        "The temperature in degrees Celsius is:", signif((input$temp1 - 32) * (5 /
                                                                                                       9),digits = 0), "degrees"
                )
        })
})

R CODE: UI.R

shinyUI(fluidPage(
        titlePanel("Farenheit to Celsius Conversion"),
        sidebarLayout(
                position = "right",
                sidebarPanel(
                        helpText("Enter temperature in degrees Farenheit."),
                        numericInput(
                                'temp1','Degrees Farenheit',0,min = -25,max = 100,step = 1
                        )
                ),
                mainPanel(textOutput("text1"),
                          textOutput("text2"))
        )
))

<!–html_preserve–>

Farenheit to Celsius Conversion

Enter temperature in degrees Farenheit.

<!–/html_preserve–>