A newbie here - please forgive me if this is a basic question. We have an in house package built in R 2.2.1 (yes we're a little behind the times at our firm)and would like to rebuild it using R 2.5.1. However, when I try and build the package from source, I keep getting this error:
Error in as(slotVal, slotClass, strict = FALSE) : no method or default for coercing "POSIXt" to "POSIXct" Error : unable to load R code in package 'Mango' Error: package/namespace load failed for 'Mango' I tried defining a new method "as.POSIXct" in the package to coerce POSIXt to POSIXct and then added the as.POSIXct method to the "NAMSPACE" file. The build still doesn't work (I get the same error message). Any idea what I am doing wrong? The coercion statement looks like this and works in R GUI: #from is a vector of dates in the format "%d-%b-%Y") from <- as.POSIXct(strptime(from, format = "%d%b%Y"), tz = "GMT") Here is my environment info: R version 2.5.1 (2007-06-27) i386-pc-mingw32 locale: LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United Kingdom.1252;LC_MONETARY=English_United Kingdom.1252;LC_NUMERIC=C;LC_TIME=English_United Kingdom.1252 attached base packages: [1] "tcltk" "stats" "graphics" "grDevices" "utils" "datasets" "methods" "base" other attached packages: fSeries nnet mgcv fBasics fCalendar fEcofin spatial MASS "251.70" "7.2-34" "1.3-25" "251.70" "251.70" "251.70" "7.2-34" " 7.2-34" I would sincerely appreciate any help. [[alternative HTML version deleted]] ______________________________________________ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.