Part of the reason R has become so popular is the vast array of packages available at the cran and bioconductor repositories. In the last few years, the number of packages has grown exponentially ! This is a short post giving steps on how to actually install R packages. Let’s suppose you want to install the ggplot2 package. Well nothing could be easier. We just fire up an R shell and type: install.packages("ggplot2") In theory the package should just install, however: if you are using Linux and don’t have root access, this command won’t work. you will be asked to select your local mirror, i.e. which server should you use to download the package. Installing packages without root access First, you need to designate a directory where you will store the downloaded packages. On my machine, I use the directory /data/Rpackages/ After creating a package directory, to install a package we use the command: install.packages("ggplot2", lib="/data/Rpackages/") library(ggplot2, lib.loc="/data/Rpackages/") It’s a bit of a pain having to type /data/Rpackages/ all the time. To avoid this burden, we create a file .Renviron in our home area, and add the line R_LIBS=/data/Rpackages/ to it. This means that whenever you start R, the directory /data/Rpackages/ is added to the list of places to look for R packages and so: install.packages("ggplot2") library(ggplot2) just works! Setting the repository Every time you install a R package, you are asked which repository R should use. To set the repository and avoid having to specify this at every package install, simply: create a file .Rprofile in your home area. Add the following piece of code to it: cat(".Rprofile: Setting UK repositoryn") r = getOption("repos") # hard code the UK repo for CRAN r = "http://cran.uk.r-project.org" options(repos = r) rm(r)
Just What Is Going On With The Gold In JPMorgan's Vault? Submitted by Tyler Durden on 04/24/2013 21:34 -0400 New York Fed We know that back in early October 2010 , when gold closed at a then record high of $1,320, JPM decided to reopen its previously mothballed precious metal vault due to soaring demand for metal vaulting, thus becoming only the fifth official Comex private gold depository in New York in addition to HSBC, Bank of Nova Scotia, Brinks and MTB (and of course the New York Fed). We also know, courtesy of a Zero Hedge exclusive , that the JPM vault - the largest private gold vault in the world - is located at 1 Chase Manhattan Plaza, and is literally adjacent to the vault of the New York Fed 80 feet, and 5 sublevels, below street level. We know that for a long time the vault held around 2.5 million ounces of eligible ( commercial ) gold, a number which declined only gradually until very recently. We know that the total amount of registered ( investment ) gold has been steady for the past 4 years (after peaking in early 2006). Finally, everyone knows that in the past month gold has experienced a very severe move lower which is still largely unexplained. What many may not know , is that while registered Comex gold has been flat, the amount of eligible gold in Comex warehouses (the distinction between eligible and registered gold can be found here ) in the past several weeks has plunged from nearly 9 million ounces, to just 6.1 million ounces as of today- the lowest since mid-2009. What nobody knows, is why virtually the entire move in warehoused eligible gold is driven exclusively by one firm: JPMorgan, whose eligible gold has collapse from just under 2 million ounces as of the end of 2012 to a nearly record low 402,374 ounces as of today , a drop of 20% in one day, though slightly higher compared to the recent record low hit on April 5 when JPM warehoused commercial gold touched a post-vault reopening low of just over 4 tons, or 142,700 ounces. This happened just days ahead of the biggest ever one-day gold slam down in history. Some questions we would like answers to: What happened to the commercial gold vaulted with JPM, and what was the reason for the historic drawdown? Gold, unlike fiat, is not created out of thin air, nor can it be shred or deleted. Where did the gold leaving the JPM warehouse end up (especially since registered JPM and total Comex gold has been relatively flat over the same period)? Did any of this gold make its way across the street, and end up at the vault of the building located at 33 Liberty street? What happens if and/or when the JPM vault is empty of commercial gold, and JPM receives a delivery notice? Inquiring minds want to know... Average: 5 Your rating: None Average: 5 ( 14 votes) Tweet
We Have A Hindenburg Omen Sighting Submitted by Tyler Durden on 04/15/2013 18:19 -0400 Ben Bernanke Remember when the last time a cluster of Hindenburg Omens nearly toppled the market in August 2010 and the only saving grace was Ben Bernanke's QE2 announcement at Jackson Hole which sent risk soaring? Today, nearly three years later, we got the first instance of the Omen again. Will it be a one-off fluke, or a cluster, which is needed to confirm this dreaded technical formation? Stay tuned in the coming days to find out... The last cluster was Aug 2010 (and was only saved by Bernanke), the previous cluster was Oct 2007 and we know what followed... (red bars are Hindenberg Omens) Full details of construction here . Average: 4.533335 Your rating: None Average: 4.5 ( 15 votes) Tweet - advertisements - Login or register to post comments 34996 reads Printer-friendly version Send to friend Similar Articles You Might Enjoy: Frontrunning: Friday 13th Post Hindenburg Omen Edition Presenting The Sovereign Default Equivalent Of The "Hindenburg Omen" Hindenburg Omen Creator Has Exited The Market Second Hindenburg Omen Confirmation In As Many Days, Third H.O. Event In One Week Hindenburg Omen Confirmation #1
Presenting The Fundamental Flaw In The Fed's Thinking Submitted by Tyler Durden on 06/20/2012 15:15 -0400 This one simple chart below shows what is possibly the biggest and most fundamental flaw in Bernanke's approach to spurring the economy, which to him, of course, means rising prices of risky assets, aka the stock market. The chart above shows the return of two simple things: the return of 4.25% 30 Year Bond issued November 2010... and the SP. As is vividly shown on the chart, the return of the long-bond is nearly three times greater than that of the broader equity market in 18 short months! And therein, ladies and gentlemen, lies the rub. Recall that Bernanke said something substantively as follows: "When our policy response lowers interest rates on govt bonds, it induces market participants to take more risk. Someone selling their govt bond to us may go out and buy a corp bond, thereby lowering spreads. A bank selling their govt bond to us may go out and make a loan..." There is one problem with this logic: it is dead wrong. Because instead of forcing investors to rush out of the bond market, which potentially has much more upside embedded (the 30 Year is yielding 2.7% right now: this means the actual price of the 30 Year can continue going up and up and up), investors, even those "sophisticated" ones at banks, hedge funds, and prop desks who can trade CDS, IR Swaps, variance swaps, swaptions, and things the retail investor has never heard of, are doing something else, and something much simpler, entirely. They are simply front-running the Fed! The Fed's entire policy of boosting the economy is a failure for many reasons, but the primary purpose embedded therein - to lift stock markets, will forever be subordinated (to use the parlance of our times) to just frontrunning the Fed, which simply means buy whatever the Fed is buy, and sell whatever (if anything) it is selling. In simpler format: Frontrun what the Fed has publicly telegraphed to be doing ... Profit And as long as the Fed continues on the course of LSAP, either unsterilized or sterilized ala Twist, this will continue, and the Fed will continue failing upward. Sadly, this also means that at the end the Fed has only one option: to go Japanese and start buying not only REITs and ETFs, but ultimately individual stocks. At that point the best purchase, however will not be the stock market, but wheelbarrows.
The Tax Facts: "You Do The Math" Submitted by Tyler Durden on 10/16/2012 18:10 -0400 As UBS reported said, in both the Republican primary and the general election campaigns in 2012, various Presidential candidates in discussing taxes have recommended that voters "do the math" in evaluating various tax change proposals. The following preliminary 2010 data from the Internal Revenue Service (IRS) should be helpful for performing such calculations. We present a variety of self-explanatory exhibits sourced directly from the IRS, which include all the DIY math on income distribution, tax rate schedules, who is affected if Bush taxes cuts for high-income taxpayers expire, sources of itemized deductions and higher incomes, the size distribution of businesses paying individual income taxes, and everything else that may and likely will be thrown out, if incorrectly, by one or both candidates tonight, in an attempt to rally any one group of people behind the cause (what cause exactly remains to be seen). Source: UBS Average: 4.166665 Your rating: None Average: 4.2 ( 6 votes) Tweet Login or register to post comments 8425 reads Printer-friendly version Send to friend Similar Articles You Might Enjoy: Why 'Tax The Rich' Doesn't Solve Anything: It's The Math, Stupid Your Taxes At Work: All You Need To Know About Who Pays What Taxes In The US Romney Enjoyed At Most 87% Of His $21mm Income In 2010 Pick Your Poison With Barton Biggs Greenspan Suggested Cutting Taxes on the Wealthy to Increase Debt so the Fed Wouldn't "Lose Control of Monetary Policy"