A Simple R Script for Traders  November 21, 2011   Now that
we've got the Python implementation under out belts, let's do
the same thing with R. We'll still be able to pass command-line
arguments to get a quick look at what our stock of interest is
doing during the day. And we start with the familiar incantation
of enabling our script to run from command-line.  $ chmod +x
yahoo.r  This is a further abuse of starting the story in the
middle. So let's get to the beginning. Here is the R script that
we'll be invoking from command-line.  arg    <-
commandArgs(trailingOnly = TRUE) stock  <- getQuote(arg) last  
<- stock[2] high   <- stock[6] low    <- stock[7] pctile <-
(last-low)/(high-low) bingo  <- round(pctile * 100) b      <-
as.integer(bingo)   sprintf("%s is trading at the %ith
percentile of its daily range", arg ,b)  We only need to call
one package here, the inimitable quantmod. That's were we get
access to the getQuote function. From there, it's basic
boilerplate. I am by no means a professional programm