Project Shiny

Irman Bin Zulkeflie
October 10, 2018

Introduction

This app helps you to choose a car for a trip, using the mtcars dataset from [R].

  • First, you need to inform the distance of your trip and the price of gasoline in your region. These information will be used to calculate the Gasoline Expenditure for each car in the dataset. Then, you can enter the maximum amount of money you want to spend on gasoline, and the table shows only the cars that have Miles per Gallon (mpg) that can go below this value.

  • Second, you can choose some caractheristcs of the cars that you desire: Cylinders, Displacement, Horse Power and Transmission. The table will show only the cars with the filters selected. You can sort the table according to the variable you want by clicking the arrows at the top of the table.

Information

Slide With Code

kable(mtcars[1:5, 1:6]) 
mpg cyl disp hp drat wt
Mazda RX4 21.0 6 160 110 3.90 2.620
Mazda RX4 Wag 21.0 6 160 110 3.90 2.875
Datsun 710 22.8 4 108 93 3.85 2.320
Hornet 4 Drive 21.4 6 258 110 3.08 3.215
Hornet Sportabout 18.7 8 360 175 3.15 3.440

Slide With Plot

Here we can see the relationship between three variables: miles per gallon (mpg), displacement (disp) and weight (wt).

plot of chunk unnamed-chunk-2