Temperature Conversion

Honeydukes
Fri Feb 26 14:43:50 2016

What The App Does

  1. Convert from Fahrenheit to Celcius
    [temp_C = (temp_F - 32) * 5/9]
  2. Convert from Celcius to Fahrenheit
    [temp_F = temp_C * 9/5 + 32]

How To Use The App

What You Need To Input

Step 1 : Slide to Temperature
Step 2 : Select conversion type

  • Fahrenheit to Celsius
  • Celsius to Fahrenheit

Step 3 : Click “Convert” button

What You Get As Output

  • xxx Fahrenheit = xxx Celsius
  • xxx Celsius = xxx Fahrenheit

Example and R-Code

Suppose : temp = 37
Convert from : Celsius to Fahrenheit (convType = 2).
R will run an if-then-else statement to get result.

temp = 37; convType = 2
if (convType == 1) {
  paste(temp, "Fahrenheit =", round((temp - 32) * 5/9, 1), "Celsius")
} else if (convType == 2) {
  paste(temp, "Celsius =", round(temp * 9/5 + 32, 1), "Fahrenheit")
}
[1] "37 Celsius = 98.6 Fahrenheit"

Temperature Conversion App