SHARE
TWEET

Untitled

a guest Jan 13th, 2019 65 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Converting weeks of year to dates
  2. dat <- structure(data.frame(week = c(22, 34, 15), year = c(2009, 2009, 2010), x = c(3.4, 5.2, 1.3)))
  3.    
  4. as.Date(paste("01", dat$week, dat$year, sep = "-"), format = "%d-%W-%Y")
  5.    
  6. as.Date(paste("1", dat$week, dat$year, sep = "-"), format = "%w-%W-%Y")
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top