Publications by Tony

googleVis — Diaoyu Islands

14.09.2012

China just announced the Diaoyu Islands baselines yesterday (US EST). Take a look at their locations (Clike here for the google map). Related To leave a comment for the author, please follow the link and comment on their blog: Tony's bubble universe » R. R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R a...

543 sym 2 img

Project Euler — problem 20

23.09.2012

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 = 3628800, and the sum of the digits in the number 10! is 3 + 6 + 2 + 8 + 8 + 0 + 0 = 27. Find the sum of the digits...

1062 sym R (209 sym/2 pcs) 1 tbl

Project Euler — problem 21

03.11.2012

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 problem. Let’s take a look. Let d(n) be defined as the sum of proper divisors of n (numbers less than...

1772 sym R (1214 sym/2 pcs) 2 img 1 tbl

Project Euler — problem 22

07.11.2012

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 five-thousand first names, begin by sorting it into alphabetical order. Then wor...

1690 sym R (661 sym/2 pcs) 1 tbl

Project Euler — problem 23

09.11.2012

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 of 28 would be 1 + 2 + 4 + 7 + 14 = 28, which means that 28 is a perfect number. A number n is called deficient ...

1846 sym R (672 sym/2 pcs) 1 tbl

Project Euler — problem 24

20.11.2012

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 objects. For example, 3124 is one possible permutation of the digits 1, 2, 3 and 4. If all of the ...

1660 sym R (666 sym/2 pcs) 1 tbl

Project Euler — problem 25

16.01.2013

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 Fibonacci sequence is defined by the recurrence relation: Fn = Fn1 + Fn2, where F1 = 1 and F2 = 1. What is the first term in the Fibona...

1047 sym R (272 sym/2 pcs) 4 img 1 tbl

Safely Loading Packages in R

18.01.2013

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 precisely the same way as the code’s author’s machine.  Anyone who’s ever seen a line like this: read.xls("C:/Users/MCa...

3265 sym R (155 sym/1 pcs)

Rstatix and ggpubr

09.09.2020

1 引言 一般基础R语言开展的统计分析结果不是整洁的表现形式。Kassambara,也就是ggpubr的作者,创造了rstatix。该包基于tidy架构和理念,可以方便的计算并呈现规整的统计结果,配合ggpubr包可以华丽地制作publication ready plot。 可以用以下形式安装 if(!require(devtools)) ins...

893 sym R (9291 sym/51 pcs) 13 img

annotation_logticks

09.09.2020

0.1 有对数小刻度的图是怎么画出来的呢? 0.2 原始数据的分布 msleep %>% ggplot(aes(bodywt, brainwt))+ geom_point(na.rm = T)+theme_bw() 0.3 对数转换 msleep %>% ggplot(aes(bodywt, brainwt)) + geom_point(na.rm = T)+ scale_x_log10()+ scale_y_log10()+theme_bw() msleep %>% ggplot(aes(log10(bodywt), lo...

112 sym R (1204 sym/10 pcs) 10 img