I am having an issue when I run the same piece of code on the different machines with same version of R and updated all packages to the latest version.
This above uses zoo. This works fine on one machine but gives me NA for Month_considered on another. I know this isnt a reproducible example but what else can I be looking into .
The only thing I could suggest is really validating that the R versions, package versions, and other locale-related things really are the same on these different machines. Try checking the output of sessionInfo() and see if anything does differ between the machines.
In addition to @kevinushey’s good suggestions, maybe verify that you’re running in a new session and that none of these machines are loading anything from an .Rdata file on startup? In RStudio, make sure “Restore .RData into workspace at startup” is turned off in Global Options and in Project Options, if you’re using a Project.
Maybe also check that there aren’t any commands hiding in a startup file that could be altering things?
Finally (or maybe initially!), if you examine ab$Month_considered directly, does it look right on both machines? What code is creating it, and can you verify that that code is running successfully?
I have attached the sessioninfo() for both the machines. The first one works and the second one which doesnt. @jcblum I did uncheck the global and project options. The df ab is created the same way on both machines and they seem to be similar when I look for its class usingsapply(ab,class)