Hi All!

I'm trying to convert serial numbers in Excel to dates in R.  For each
single "thedate" entry, I get a correct answer.  But if I try using the for
loop, I get bizarre numbers in "mynewdata".

thedate<-as.matrix(40548:40759,ncol=1)

exdate<-function(){
  mynewdate<-NULL
  for(i in 1:nrow(thedate)){
  mynewdate[i]<-as.Date(thedate[i,1],origin="1899-12-30")
  }
  print(mynewdate)
}
exdate()

Thank you very much!
Anna

	[[alternative HTML version deleted]]

