0

I am searching for a function in R, that quickly transforms text like "07/04/1995" into the date format in R.

Every help is appreciated!

Best regards Jakob

NelsonGon
  • 13,015
  • 7
  • 27
  • 57
R4N80M
  • 18
  • 5
  • 1
    You can choose one of `strptime`,`lubridate`,`anytime` or `zoo`. There are many questions on the same. – NelsonGon Apr 16 '20 at 13:56

1 Answers1

1

One option is lubridate, which has a set of functions that convert text to date based on the order of the month, day and year.

library(lubridate)
mdy("07/04/1995")

See the cheat sheet for more.

Ian Campbell
  • 23,484
  • 14
  • 36
  • 57