Created
September 17, 2014 04:02
-
-
Save yuukimiyo/1b7b848e14ce8500ea49 to your computer and use it in GitHub Desktop.
R言語で年齢や月齢を計算する。 ref: http://qiita.com/YuukiMiyoshi/items/b2fc8d4c83837f204e24
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
length(seq(as.Date("1981/07/05"), Sys.Date(), "year"))-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
length(seq(as.Date("1981/07/05"), Sys.Date(), "month"))-1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
age = floor((20140917 - 19810705) / 10000); // PHPの場合 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment