Skip to content

Instantly share code, notes, and snippets.

excelDates <- function(exceldate) {
x <- sapply(exceldate, function(ed) {
y <- ifelse(is.na(as.integer(ed)),as.character(as.Date(ed,format="%d/%m/%Y")),as.character(as.Date(as.integer(ed),origin = "1899-12-30")))
return(y)
})
return(as.vector(x))
}
excelTimes <- function(exceltime) {
x <- sapply(exceltime, function(et) {
x <- as.data.frame(installed.packages())
y <- as.character(x$Package)
loadFn <- function(y) { return(tryCatch(library(y, character.only=T), error=function(e) NULL)) }
lapply(y, loadFn)