Tuesday, July 18, 2017

R: read.table vs. read.delim

Read.delim is a special case of read.table


more to read here:
In addition to reading help pages when you are unsure of what a function does, you can also examine the function's actual code. For example, entering read.delim reveals that the function contains the following code:
> read.delim
function (file, header = TRUE, sep = "\t", quote = "\"", dec = ".", 
    fill = TRUE, comment.char = "", ...) 
read.table(file = file, header = header, sep = sep, quote = quote, 
    dec = dec, fill = fill, comment.char = comment.char, ...)
Thus, read.delim() is simply a wrapper function for read.table() with default argument values that are convenient when reading in tab-separated data. It is exactly the same as calling:
read.table(file, header = TRUE, sep = "\t", quote = "\"", 
    dec = ".", fill = TRUE, comment.char = "")


Reference: https://stackoverflow.com/questions/10599708/difference-between-read-table-and-read-delim-functions

Saturday, June 24, 2017

[Solved]Google Chrome can't play Candy Crush: Need to upgrade Adobe Flash

chrome://settings/content
Flash -> Allow sites to run Flash -> done




reference: https://helpx.adobe.com/flash-player/kb/enabling-flash-player-chrome.html

Sunday, June 4, 2017

What is color? What is RGB? What's additive color?

In nature, light with single colors has a constant wavelength. Different colored lights have different wavelengths.

We use RGB receptors to perceive single colors and mixed colors.

Mixed lights of different colors usually acquire a new color due to our RGB translation system.

Paints work in the way by manipulating what colors to absorb so as to give a color to the light reflected and thus perceived by human eyes. Mixing paints is actually mixing the materials that absorb different lights. So it follows a complementary law of mixing lights to alter colors


Then let's understand what is additive color
https://en.wikipedia.org/wiki/Additive_color


Finally let's tackle a more complicated problem: the colors of a rainbow
https://www.quora.com/Why-are-only-seven-colors-visible-to-the-naked-human-eye