Hi All,
I am receiving an error while running a while loop. can you please help me out.
Code:
while((finalDate-auxDate)!=0){
if(format(auxDate, format = "%d")=="01"){
auxDate <- auxDate+15
}else{
auxDate <- auxDate-15
month(auxDate) <- month(auxDate) + 1}
if(!(auxDate %in% FCL_forecast[,7])){
missingRows <- c(missingRows, auxDate)}
}
as.Date(missingRows)
i am getting an error as :
Error in month(auxDate) <- month(auxDate) + 1 :
could not find function "month<-"
Thank you for the help and i am new, please let me know how can i explain this better
Regards,
Sachin