Articles by Tony

googleVis — where did SYTYCD dancers come from?

July 21, 2012 | Tony

After watching 20 wonderful dancers of the 9th season of So You Think You Can Dance, I have presented a geomap of  the states where they are coming from (click here). Now, I am interested to this show’s history.  I’d like to re-draw the … Continue reading → [Read more...]

Project Euler — problem 15

July 18, 2012 | Tony

The 15th problem in Project Euler. Starting in the top left corner of a 22 grid, there are 6 routes (without backtracking) to the bottom right corner. How many routes are there through a 2020 grid? Mmm… walk in the … Continue reading → [Read more...]

Project Euler — problem 14

July 16, 2012 | Tony

It’s Monday today! It’s work day! And I’ve already worked on computer for two hours. Time for a break, which is the 14th problem of Project Euler. The following iterative sequence is defined for the set of positive integers: n n/2 (n … Continue reading → [Read more...]

Project Euler — problem 13

July 9, 2012 | Tony

The 13th in Project Euler is one big number problem: Work out the first ten digits of the sum of the following one-hundred 50-digit numbers. Obviously, there are some limits in machine representation of numbers. In R, 2^(-1074) is the smallest … Continue reading → [Read more...]

leaf area measuring — R package “EBImage”

July 9, 2012 | Tony

Besides microscopic images in our routine, common photos are frequently taken to measure quantitative plant features, such as leaf area, root length, branch numbers, etc. Scientific software is available for manual processing. For example, to measure the root length, one need to use the … Continue reading → [Read more...]

Project Euler — problem 12

July 7, 2012 | Tony

Going to supper in 20 minutes. I’d like to type down my solution to the 12th Euler problem, just make my time count. The sequence of triangle numbers is generated by adding the natural numbers. So the 7th triangle number … Continue reading → [Read more...]

automated cell phenotyping — R package “EBImage”

July 5, 2012 | Tony

Counting cells under microscope is always laborious and null. Those in the art would be relieved with assistance of a powerful image processing package, EBImage. Images are treated as “Image” objects, essentially multi-dimensional arrays. The class “Image” contains spatial information, pixel … Continue reading → [Read more...]

Project Euler — problem 11

July 2, 2012 | Tony

It’s been a while since I solved one Euler problem last time. Has been busy. Now I’m back and continue to solve the next problem, which is to find the maximum. Let’s take a look at the 11th problem: What … Continue reading → [Read more...]

SYTYCD — where are these terrific dancers come from?

June 29, 2012 | Tony

It’s Saturday midnight and I’m already sleepy. However, after several hours, I finally got this google geographic map embedded in my post. Aha!!! This is about 20 finalists from the 9th season of So You Think You Can Dance. I count the states … Continue reading → [Read more...]

google R style guide

June 19, 2012 | Tony

After writing several hundreds of lines of R codes, I start to pay some attention to my coding style. Fortunately, I find a document about R style guide in google code. Surprisingly, R is among the most popular programming languages, such as C++, objective-C, python, java and html. I didn’... [Read more...]

Project Euler — problem 10

June 15, 2012 | Tony

Just finish my last assignment for this week. IT’S WEEKEND, officially. Let me take a break to have a look at the tenth problem, another prime problem. It’s no doubt that prime is the center of the number theory and fundamental … Continue reading → [Read more...]

Project Euler — problem 9

June 12, 2012 | Tony

Just had supper. My stomach is full of cabbage, carrot and noodle. I’d like to solve the ninth problem to stretch my mind. This one is about Pythagorean theorem. A Pythagorean triplet is a set of three natural numbers, a __ b __ … Continue reading → [Read more...]

Project Euler — problem 8

June 9, 2012 | Tony

The eight problem of Project Euler: Find the greatest product of five consecutive digits in the 1000-digit number. … The solution is as straightforward as the problem, although the 1000-digit number needs some format changes before product calculation. ?View Code … Continue reading → [Read more...]

Project Euler — problem 7

June 6, 2012 | Tony

Prime is the core of number theory. Here is an introduction of prime number on Wikipedia. I could only understand roughly half of it. Now, let’s look at the seventh problem of Project Euler, which is another about prime number.  By listing the first six prime numbers: 2, 3, … Continue reading → [Read more...]

Project Euler — problem 6

June 2, 2012 | Tony

It’s midnight officially. Let me solve the sixth problem before bed. This is a quick one. The sum of the squares of the first ten natural numbers is, 12 + 22 + … + 102 = 385. The square of … Continue reading → [Read more...]

Project Euler — problem 5

May 30, 2012 | Tony

I spent around 40 minutes on the last post yesterday, which delayed my bedding time and caused my sleepiness in the morning. So, I’m starting to write earlier tonight. The fifth problem is to calculate the smallest composite for given numbers. 2520 is … Continue reading → [Read more...]

Project Euler — problem 4

May 29, 2012 | Tony

It’s midnight already. I’m going to bed after I type this. Now the fourth Euler problem: A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 99. Find … Continue reading → [Read more...]

Project Euler — problem 3

May 27, 2012 | Tony

The third problem: The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number 600851475143 ? My solvement is straightforward: firstly to identify all the prime numbers between 2 and sqrt(n); secondly … Continue reading → [Read more...]

Project Euler — problem 2

May 21, 2012 | Tony

Almost my time for bed. Just write a quick solution on the second problem of Project Euler. Here it is. Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, … Continue reading → [Read more...]

R solvements to Project Euler — problem 1

May 15, 2012 | Tony

Things have been going wild since I opened this blog. Tasks were piled up while I was tight on time. At present, I’m facing a major challenge in my life. However, I decide to spare some time for self-improvements. R … 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)