I want to change the day part of a year-month-day structure. For example, from 1990-01-03 to 1990-01-01. Is the code below correct?
d<-as.POSIXlt("1990-01-03")
d$mday<-1
wday and yday are not changed, so the result is somewhat inconsistent. I use the result only for conversion to character strings. Other date representations I know(Date, POSIXct) are inconvenient for this task.