Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- set.seed(1172)
- hr <- sample(0:23,10000,replace=T)
- test = plyr:::mapvalues(hr, 0:23, c("子",rep(c("丑","寅","卯","辰","巳","午","未","申","酉","戌","亥"),,, 2), "子"))
- table(test)
- # test
- # 子 巳 丑 午 卯 未 申 亥 戌 辰 酉 寅
- # 807 822 835 874 864 841 863 775 829 781 855 854
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement