Re: [R] Extracting data and saving in excel

2020-10-23 Thread Rui Barradas
Hello, First coerce the column birth to class Date, then subset. data$birth <- as.Date(data$birth) i <- data$birth > as.Date("1979-01-01") subdata <- data[i, ] To write back to Excel, use write.csv or a package able to write Excel files directly. Hope this helps, Rui Barradas Às 12:23 d

[R] Extracting data and saving in excel

2020-10-23 Thread bgnumis bgnum
Hi all, I have a dataframe call "data", and have lots of rows. One of them is data$`birth` my data has been imported from an excel file in RSTUDIO I want to obtain in a function all rows (with the names) where data$`birth` is bigger than 1979/01/01 and extract in a excel file as an output (a sub