Hi R community,
i created a function (mkdate) as follows:

mkdate = function(x) {
x$date = as.Date(paste(x$year, x$month, x$day, sep="-"))
x$wy = ifelse(x$month >=10, x$year+1, x$year)
x$yd = as.integer(format(as.Date(x$date), format="%j"))
x$wyd = cal.wyd(x)
x
}

the function results in adding the new columns date, wy, yd, and wyd to the
table i apply it to.
this has always worked in R version 2.14.2.
however, in R version 3.1.0 - instead of my mkdate function adding those
columns to my existing table, it just overwrites my table and leaves me
with just a list of the last variable created by my mkdate function. so i
end up with just a list of numbers representing wyd, and lose all the data
in my original table.

does anyone know what would now be causing this to occur, and what i need
to do to make my function work properly again?

thank you for any assistance,
Janet

	[[alternative HTML version deleted]]

