Articles by Tony

Safely Loading Packages in R

January 18, 2013 | Tony

Using R snippets written by other developers can be unendingly maddening.  There are a variety of reasons for this, most of which boil down to a simple issue: most code is written such that a system must be configured in … Continue reading → [Read more...]

Project Euler — problem 25

January 16, 2013 | Tony

Finally, the fog lasting for days went away this morning and the sun comes out. It’s a lovely winter day. After taking a walk after lunch, I feel like doing some math. So, here comes the 25th Euler problem. The … Continue reading → [Read more...]

Project Euler — problem 24

November 20, 2012 | Tony

It’s a lovely day. I took a walk around the campus after lunch. The scene was enjoyable in one deep autumn day. Before the afternoon work, I’d like to spend a few moments on the 24th Euler Problem. A permutation is an ordered arrangement of … Continue reading → [Read more...]

Project Euler — problem 23

November 9, 2012 | Tony

Officially, it’s weekend. I’m solving this 23rd Euler problem just before my supper. A perfect number is a number for which the sum of its proper divisors is exactly equal to the number. For example, the sum of the proper divisors … Continue reading → [Read more...]

Project Euler — problem 22

November 7, 2012 | Tony

Just had my supper. Stomach is full of stewed beef and potato.  I’d like to solve the 22nd Euler problem before tonight work (right, I’ll work late in my office). Using names.txt (right click and ‘Save Link/Target As…’), a 46K text file containing over … Continue reading → [Read more...]

Project Euler — problem 21

November 3, 2012 | Tony

It’s been over one month since my last post on Euler problem 20, when  I was planning to post at least one on either Euler project or visualization. So I am four posts behind; I’ll try to catch up. Tonight, I’ll solve the 21st Euler … Continue reading → [Read more...]

Project Euler — problem 20

September 23, 2012 | Tony

It’s been quite a while since my last post on Euler problems. Today a visitor post his solution to the second problem nicely, which encouraged me to keep solving these problems. Just for fun! 10! = 10 * 9 * … * 3 * 2 * 1 … Continue reading → [Read more...]

Project Euler — problem 19

September 3, 2012 | Tony

I’ve been working overtime last weekend. Although I suffered little from the Monday syndrome, I still need a break. So, I’m back to the Project Euler after days of Olympic data digging. Today, I’m gonna to solve the 19th problem. You are given the following … Continue reading → [Read more...]

googleVis — NASA’s exploration of Mars

August 29, 2012 | Tony

After generating a few interactive charts with googleVis, I realized that it’s a great way to visualize numeric data, especially multi-dimentional data. Days ago, my colleague sent me a picture taken by Curiosity from Mars. He was crazy about it … Continue reading → [Read more...]

London 2012 Olympics — Medals vs GDP and population

August 25, 2012 | Tony

It’s already midnight. I’m sitting near my bed. And before going to bed, I’ll type my last post on London 2012 Olympics. Olympic games are not only individual competitions, but also the reflections of countries’ strength. This is one reason why Olympics data … Continue reading → [Read more...]

London 2012 Olympics — Men and Women 400-metre medley

August 23, 2012 | Tony

Alan brought up the suspicion to Ye’s world record in women 400 metres individual medley. And I quote: “Her last split caused controversy (deep suspicion of doping) as she swam it faster than the fastest male swimmer. I wonder how commonly this … Continue reading → [Read more...]

London 2012 Olympics — world record in women 400-metre medley

August 22, 2012 | Tony

I’ve been going through the medal statistics in London 2012 Olympics recently. I was planning to present some extra charts, such as medal-per-milli-population or medal-vs-GDP. However, it’s a little boring to present the same kind of charts. Thus, I’d like to look into some particular … Continue reading → [Read more...]

London 2012 Olympics — Medals per event

August 21, 2012 | Tony

It’s almost midnight. Before I go sleeping, I’d like to post the chart about ”medals per event” on 2012 Olympics. As some visitors suggested, I searched for the competition information for each athlete. Finally, thankful to the mighty Guardian datablog, I find the … Continue reading → [Read more...]

London 2012 Olympics — Medals per hundred players

August 19, 2012 | Tony

It’s the weekend. I just woke up from a nap. Got my mind freshed. I’d like to continue with my digging into the Olympics medal results. Today, I cited the number of participants from each country (see wikipedia). I want to see how … Continue reading → [Read more...]

London 2012 Olympics — Lead, tin and zinc

August 17, 2012 | Tony

Folks at WSJ were funny. They gave another medal list of London 2012 Olympic Games, not for the first place but for the last place. They replaced Gold, Silver and Bronze with  Lead, Tin and Zinc. No matter who came up to this idea, it’s … Continue reading → [Read more...]

Project Euler — problem 18

August 15, 2012 | Tony

The 18th Euler problem is sorta a route finding problem. It has occupied my mind for two days. Finally I came up to a clever solution. Find the maximum total from top to bottom of the triangle below: 75 95 64 17 … Continue reading → [Read more...]

London 2012 Olympics — medal statistics

August 14, 2012 | Tony

The 2012 Olympic Games officially ended this Sunday in London. Although I missed most of the games, I was still entertaining myself with some hilarious news, such as Thomas’s re-diving. So much fun. I would remember this for years :) Games ended. … Continue reading → [Read more...]

Project Euler — problem 17

August 8, 2012 | Tony

It has been two weeks since my last post on the 16th Euler problem. Now, since I just need a break after supper, I’m coming the 17th problem. If the numbers 1 to 5 are written out in words: one, … Continue reading → [Read more...]

Project Euler — problem 16

July 21, 2012 | Tony

The 16th problem is another big-number problem: 215 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 21000? This … Continue reading → [Read more...]
1 2 3

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)