I'm trying to convert one column in my dataframe into a DATE object.
My data frame named k
contains two columns. salinity
is a numeric
while date
is a character
.
salinity date
0.1 Mar-17
1.1 Jun-17
16.0 Aug-17
0.5 Nov-17
So, I tried the usual way
k$date = as.Date(k$date, "%b-%y")
It returns a string of NA
I think I've already viewed the most of the threads here in Stackoverflow that resembles my problem. I tried all the solutions/comments in those threads but to no avail.
So I decided to create a vector containing all the dates and tried to convert them. I plan to just paste the values later on. But it still returns a string of NA
values. I'm really confused since I already did this a month ago with another dataset and it went swimmingly.