Skip to content
Prev 165398 / 398506 Next

Using transform to add a date column to a dataframe

or not using transform at all:

data1 <- airquality
data1$Date <- as.Date("1950-01-01")

# or in just one line:

data1 <- replace(airquality, "Date", as.Date("1950-01-01"))
On Tue, Dec 23, 2008 at 9:06 AM, Gavin Simpson <gavin.simpson at ucl.ac.uk> wrote: