I have a very simple question, but somehow I can not figure out the problem. I want to convert a character column to a date column, to be able to create a line graph afterwards (date on x-axis, x on y-axis). However, when I try to convert the data column, only NAs are returned. I already tried out many different suggestions provided on other threads, but still it does not work. Any help is highly appreciated!
structure(list(Group.1 = c("April 2020", "December 2019", "February 2020",
"January 2020", "March 2020", "May 2020", "November 2019", "October 2019"
), x = c(115, 163, 184, 102, 251, 58, 154, 10)), row.names = c(NA,
-8L), class = "data.frame")
#> Group.1 x
#> 1 April 2020 115
#> 2 December 2019 163
#> 3 February 2020 184
#> 4 January 2020 102
#> 5 March 2020 251
#> 6 May 2020 58
#> 7 November 2019 154
#> 8 October 2019 10
login_plot$DATE <- as.Date(login_plot$Group.1, format ="%B %Y")
structure(list(Group.1 = c("April 2020", "December 2019", "February 2020",
"January 2020", "March 2020", "May 2020", "November 2019", "October 2019"
), x = c(115, 163, 184, 102, 251, 58, 154, 10), DATE = structure(c(NA_real_,
NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_, NA_real_
), class = "Date")), row.names = c(NA, -8L), class = "data.frame")
Group.1 x DATE
1 April 2020 115 <NA>
2 December 2019 163 <NA>
3 February 2020 184 <NA>
4 January 2020 102 <NA>
5 March 2020 251 <NA>
6 May 2020 58 <NA>
7 November 2019 154 <NA>
8 October 2019 10 <NA>