Using R and Excel Together

I put up a question to the R list on using VBA macros from within excel. It seems you can use R from within Excel and can customize it so that the end user doesnot know R. It is called RExcel (what else !)

Quoting Erich from R archives ”
There is RExcel (available by downloading the CRAN package RExcelInstaller. It allows to transfer data between R and Excel, and run R code from within Excel. So you can start with your data in Excel, let R do an analysis, and transfer the results back to Excel. You can write VBA macros which do this, but “hidden from exposure”,
so the Excel user does not even notice that R is doing the hard work.

It also has an Excel worksheet function RApply which allows to call an R function from an Excel cell formula. =RApply(”rfun”,A1)
would apply the R function rfun to the value in cell A1.
If the value in A1 changes, Excel will force R to recalculate the formula.

There is a (half hour long) video demo about RExcel
at has more information about the project



This can help save a huge number of costs as Excel is the least expensive analytical software and is present on all analytics companies.


More news on R here

A Small Child

A child, a small child,

Roams around his yard, for a little while,

Till he hears the wail of the siren,

Too late now, hes killed by shards of iron.

Ten rockets launched , but only one Jewish kid is dead.

His folks vow vengeance and war lies ahead.

A child, a small child,

Roams around his neighbourhood, for a little while,

When with a whoosh his world explodes,

He wakes up in hospital, with a melted nose.

His parents dead, it was collateral damage,

They were in the wrong neighbourhood,

so the story goes.

One more Arab kid, scarred for life,

One more statistic added to the total.

His career options on growing up are just two-

Suicide Bomber or fight with a rifle too.

A child, a little child,

Looks up to the blue skies,

From where rockets and tank shells come.

God or Gods (who ever is there)

Before the sons of Abraham

and the sons of Arabs,

kill each other ,

I am the son of Adam and Eve,

their common mother.

take me please,

far away from this place.

I wanna grow up in some happy place,

where no one thinks I am a Jew or an Arab

Just a small kid, who needs some love.

(Image from

Chuck Them BPO India: Indian Offshoring

Chak De (Lift Them) or Chuck Them BPO India

An essay by Ajay Ohri

The Back Office Processing (hereby called BPO) Industry is one of the largest providers of employment in India. They employ an estimated half-a-million Indians, mostly in the 20-35 age groups, and these numbers are only increasing. Thus, the number of people who are directly affected by the Indian call centre industry is nearly 1.5 million Indians including dependents. For a vast majority of them, the BPO industry is considered a boon as it enables them to earn wages much more than was possible previously.

The industry is by large un-regulated compared to other industries and has grown rapidly unchecked over the few past years. It has had systematic issues, especially related to coping with human resource management, in times of rapid growth .Indeed most BPO Human resource personnel are either furiously recruiting or trying to manage attrition with minimum costs.

A Few Issues

The BPO industry is marked with some operational issues and they are enumerated as follows: –

Lack of Labor Guidelines: There is very little over-time pay and it, thus, leads to systematic overworking or understaffing of resources in both small and big BPOs. The understaffing is also responsible for the erratic quality or projects due to rush jobs. Labor regulation has been avoided because historically Indian regulations have been misused to offer hassles to industry rather than relief or solutions. A committee headed by Arjun Sengupta had submitted a draft of the Unorganized Sector Workers’ Bill to cover the workers in this sector.

Lack of Health Guidelines: There can be medical counseling (without too much expenses) to cope with effects of prolonged night-shifts, or sitting in chairs, especially chronic back-aches, and personality counseling. This shall help especially when there is project requirements for extended over times.

Employee Retrainabilty: There can be career counseling to help young employees plan a career in a still turbulent sector (Not everyone will be a team leader). There is no provision for re-training for workers being laid off and there is little chance of unemployment benefits in India. Retrenchment in this sector happens at a larger scale usually when companies lose a few big clients as in the recent mortgage sub prime crisis or even earlier when a big computer maker of American-origin shifted. The insecurity of being laid off leads to further attrition. In this scenario, companies that offer skill enhancement and re-training are likely to have a sustainable edge in human resource management.

Lack of Flexible Work Force Response to Sudden Positive or Negative Moves: By offering too low prices, BPOs lack the capability of the Information Technology industry in having bench strength. A minimum bench strength can enable them to move up  the value chain by building proprietary products and domain expertise. This can be in terms of both larger number of internships, apprentice-ships to cut down costs, as well as boost the quality of the labor pool and better rotational stints within the corporate.

Employee welfare and worker rights have been driven primarily to control short term attrition. Despite the large number of workers employed, few political groups have come forward, perhaps because of the urban (and hence, least voting bloc) nature of workers in the BPO sector. If politicians don’t get votes and this segment is unlikely to protest, they have no incentive to look into this repeated abuse of young people. Some of the tasks performed by these workers are similar to intellectual chimney sweeps or coolies of the nineteenth century, as they do copying and pasting in a repetitive manner in spread-sheets.

Attrition – An urban legend: Despite the noise about attrition by industry players, most of the attrition is actually and subtly encouraged to keep operating margins down. This is because attrition enables middle managers to cut down costs temporarily by making other team members stretch, and replacing them by un-experienced younger members. It is also very easily explained as due to market conditions or poaching by other companies. The solution for having an industry wide database lacks sensitivity to individual personal rights and seems to point the finger almost entirely on employees for attrition.

Corporate Governance

The BPO industry which was asking for Government help when the dollar hit Rs 39 is silent about when the dollar swung back to 48 rs. There is a huge impact on proftability to this segment, yet Coprorate Governance norms in both listed and unlisted companies are not world class. In the West making workers work 12 hours a day without overtime would be a crime, backdating stock options would be a scandal and using employement bonds to prevent people from leaving would be unfair and illegal. Many Indian companies have substantial share holdings with Western PE investors who swing business their way from their companies in the West. The pricing pressure is much more due to competition dynamics  than due to labor costs yet costs are always cut from managers and below.

The BPO Industry in India favors the few (Senior Management, VC Investors, Global Multi-Nationals) at a disproportionate cost to the many (the worker handling the phone call, or manipulating the spread-sheet). These sultans of the industry are already planning to set-up centers in China and East Europe to help squeeze wages down further. Rather than move reactively, attrition can be controlled if more companies offer employees fair and credible stock options rather than unsustainable salary hikes.

Long Term

If unchecked and un-regulated, by the next 10 years, we would have millions of workers elbowed out by relentless demographics of a young India or China or East Europe, with limited skills and unprotected by either legislation or by social care.

Like toy soldiers, millions of young urban Indians sacrifice their health, un-noticed by anyone, and unable to go to the streets to protest. The complete lack of union, legal and political protection, can only lead to further abuse of this demographic segment by the gladiators of modern India’s capitalism, the ones who make their stock options and bury their conscience with drinks at suburban five-star pubs.

A more socially responsible BPO industry can protect both its employees and its own interests by working in a proactive manner by retraining its employees rather than a reactive manner by laying off staff. Once it does so, it has the potential to move-up the chain to offer wing-to-wing consulting solutions.


The UNITES workers union proactively works in protecting BPO workers rights , but it has limited leverage. For example it’s warnings to NASSCOM about Satyam , a month ago after the World Bank blacklisting were ignored by NASSCOM saying they could not interfere with a constituent company.

Domestic call centers in India have generated more than $ 1.2 billion in revenue in 2006-2007 and they can sustain and prolong their growth by better human resource management leading to innovation driven revenues rather than factor driven revenues.

It will be, then, a true case of Chak de BPO India rather than chuck them BPO India.

( A copy of this article first appeared here

This article is updated for recent events)

Things an Indian does after returning to India from “US”.

22 things an Indian does after returning to India from “US”.

22. Use Nope for No and Yep for Yes.

21. Tries to use credit card in road side hotel.

20. Drinks and carries mineral water and always speaks of health conscious.

19. Sprays deo such so that he doesn’t need to take bath.

18. Sneezes and says ‘Excuse me’.

17. Says “Hey” instead of “Hi”.
Says “Yogurt” instead says “Curds”.
Says “Cab” instead of “Taxi”.
Says “Candy” instead of “Chocolate”.
Says “Cookie” instead of “Biscuit”.
Says ” Free Way ” instead of “Highway”.
Says “got to go” instead of “Have to go”.
Says “Oh” instead of “Zero”, (for 704, says Seven Oh Four Instead of Seven
Zero Four)

16.Doesn’t forget to crib about air pollution. Keeps cribbing every time he steps out.

15. Says all the distances in Miles (Not in Kilo Meters), and counts in Millions. (Not in Lakhs)

14. Tries to figure all the prices in Dollars as far as possible (but deep down the heart multiplies by 43 times).

13. Tries to see the % of fat on the cover of a milk pocket.

12. When need to say Z (zed), never says Z (Zed), repeats “Zee” several times, if the other person unable to get, then says X, Y Zee(but never says Zed)

11. Writes date as MM/DD/YYYY, on watching traditional DD/MM/YYYY, says “Oh! British Style!”

10. Makes fun of Indian Standard Time and Indian Road Conditions.

9. Even after 2 months, complaints about “Jet Lag”.

8. Avoids eating more chili (hot) stuff.

7. Tries to drink “Diet Coke”, instead of Normal Coke.

6.. Tries to complain about any thing in India as if he is experiencing it for the first time.

5. Pronounces “schedule” as “skejule”, and “module” as “mojule”.

4. Looks suspiciously towards Hotel/Dhaba food.

3. From the luggage bag, does not remove the stickers of Airways by which he traveled back to India, even after 4 months of arrival.

2. Takes the cabin luggage bag to short visits in India, tries to roll the bag on Indian Roads.

Ultimate one:
1. Tries to begin conversation with “In US ….” or “When I was in US…”

R .SAS .NYT. One great discussion.

The NY Times carried an article on R titled  at this link here titled

“Data Analysts Captivated by R’s Power”.  However it included a line on page 2 saying

The popularity of R at universities could threaten SAS Institute, the privately held business software company that specializes in data analysis software. SAS, with more than $2 billion in annual revenue, has been the preferred tool of scholars and corporate managers.”



This led to a round of debates in the SAS-L list here

The debates were

1) SAS Institute has seen many upstarts through the years.

2) SAS Institute  really really needs to change some stuff on this new free and advanced software.Especially with a Base SAS equivalent at 10 % of the price at WPS.

The same NY T article contained this statement

“I think it addresses a niche market for high-end data analysts that want free, readily available code," said Anne H. Milley, director of technology product marketing at SAS. She adds, “We have customers who build engines for aircraft. I am happy they are not using freeware when I get on a jet.”

Unfortunately SAS Institute does use some freeware as components and is also supportive of open source in the past.

The R list on the other hand was jubilant. Finally some recognition.See their reactions here. specifically following this message.

While I do contribute to the NY Times Blog in comments section a lot (see here)

I was surprised by all three ( lists and newspaper).

It reminded me of the saying-

1) You can choose your opinion but the facts must remain the same for all.

2) In God we trust. Everybody else must bring data

( Ajay-ALL THE DATA.Not just the data which suits you)


Anyways- Thanks to Satyam accounting scandal, the year 2009 is off to a rocking start.Sometime too much rocking…..

Yahoo Finance for Analysis-Indian ITES

A great graphical tool is Yahoo finance- As a test case I took the Indian Outsourcing and IT industry and compared their stock performance for the whole of 2008.

Note I am using the website which has a great 10 sec method of shortening urls, just like

You can view the graph here and add in last year’s value including SIFY (Satyam’s arm here

Business case- As you can see, the Indian IT sector lost tremendous value in 2008 , perhaps too much so you can see the sharp pullbacks in the last one week ( WNS pulled almost 18 % up). One view I belive this industry will do well to adopt is stop being an Information Technology Enabled Services (ITES) and start moving towards Information Technology Enabled Products ( ITEP)

Updated- I didnt factor in Satyam’s acounting scandal in the analysis.If you click the link above now – you would note the impact such events have on domains ( and curiously happen again and again.It also leads to better data mining solutions than simplistic history repeats itself models).

Yahoo finance is extremely user friendly and the design of the interface is sweet,short and simple. But the biggest weakness is ( and it seems like a Yahoo weakness) – there are almost no ads compared to Google Finance which focuses on the ad placement and relevancy over anything else. I hope this site endures it is a great boon for analysts and even stock market researchers.


Who really killed The Joker ?

Was it the studio and director that pushed him over the edge.

Playing a man with a painted face. Day in .Day out. Take after Take.

All in the name of excellence. But its the money that wanted.

Was it his loneliness. From the estrangement of the mother of his son.Because actress wives need high maintainability not creativity.

When the body was found, the police report was delayed, till she was informed by the maid first.

Was it the drugs he took. To fall asleep from the insomnia

When the nightmares come from playing someone else

day in day out.How did the Knight tale ended with the Darker Knight.

Was it God. Who called back his beloved child

Because HE loved him so much he called him back to heaven.

Was it the Devil. As in the song “American Pie”

Was it the medical explanation of accidental overdosing from a variety of chemicals.

Who sold him those chemicals? Did he need them.

And in those last moments, as he choked on his vomit to breathe.

Who did Heath Ledger see.

Loving him. Leaving him. Pushing him. Killing him.

(PS -Republished from August 24,2008 .Heath Ledger is in contention for the Oscar posthumous)