Capital budgeting Application
////////////////////////////////
 I Hate Math Group, Inc,2013, How to find the Expected Return and Risk
   (v226k,s18k,t6:52)
   https://www.videoP.com/watch?v=h7Fqk529BP0&t=1s

 Learnto invest,2018,Hedging a Stock Portfolio - Hedging Strategies for a Market Crash
   (v3k,s25k,t18:12)
   https://www.videoP.com/watch?v=Wj5Q3GxGiG8

 Tastytrade,2016,Hedging Positions | Options Trading Concepts
   (v63k,s129kt13:52)
   https://www.videoP.com/watch?v=1iYQ0XOLHNU

////////////////////////////////

Pie and Bar
////////////////////////////

Assume that we have the following two columns.

x,10
y,20
z,40
a,30
b,10

  Step 1: high-light both columns
  Step 2: insert -> Pie

Bar
-----------------
  Assume that we have the following frequencies 
          for different excuses for late for a class. 


excuses for late,freq
trafic jam,30
sick,10
dog or pet,5
family member,10
others,20

  Step 1: high-light both columns
  Step 2: instert -> Bar

   [note: we should not choose the last one!]

////////////////////////////

Save your graphs 
////////////////////////////
 1) save directly from R graphics device

 2) Snipping tool
    http://snipping.com/ 

////////////////////////

Histogram
////////////////////////////

Assume that we have the following grades and their corresponding 
frequencies. We want to generate a histogram. 

Grade	Freq
90	10
80	23
70	24
60	5
50	2

  Step 1: Click "Data" -> Data Analysis -> Histogram
  Step 2: For [Input range] choose the second column (including cell of "Freq")
  Step 3: For [Bin Range], choose the first column (including the cell of "Grade")
  Step 4: check "Labels"
  Step 5: choose a location on the same spreadsheet or a new one
  Step 6: choose Pareto (sorted histogram)
                Cumulative Percentage
                Chart output 
  Step 7: click "OK"

////////////////////////////

png R package 
////////////////////////////
#  install.packages('png')

library(png)
remoteImage<-'http://datayyy.com/images/fun.png'
myDir=tempdir() 
tempFile = tempfile(tmpdir=myDir, fileext=".png")
download.file(remoteImage, destfile=tempFile,quiet = TRUE,mode='wb')

graphics.off()
img<-png::readPNG(tempFile)
grid::grid.raster(img)

////////////////////////