library(stringr) colnames(gender) <- str_replace(colnames(gender), "\.", " ")
> as.character(format(Sys.Date(), format="%Y%m%d")) [1] "20150408"
library("stringr") > str_sub(paste0("00", 1:10), -2, -1) [1] "01" "02" "03" "04" "05" "06" "07" "08" "09" "10"
strftime(as.Date("2013-12-01"))
yyyymmdd <- xpathSApply(doc,"//div[@class='filter-item' and @control-filter='daily']//a[@class='current']", xmlValue) generate_time <- xpathSApply(doc,"//div[@class='generate-time' and @data-meta='generate-time']//b", xmlValue) Sys.setlocale("LC_TIME","English") #"Jul 23, 2014 10:00am UTC+9" crawling_time <- strptime(paste(yyyymmdd, generate_time), "%b %d, %Y %I:%M%p", tz="") std_dt <- substr(crawling_time,1,10) Sys.setlocale("LC_TIME","Korean_Korea.949")