I have a date frame with the column below. I would like to turn the years (with 4 digits) into dates (as.Date). The idea would be to keep only the same years. I tried some solutions that I saw there, but I still have not been able to. I'm a beginner at R and I'm finding this part of it turning into very difficult dates. Any tips? Thanks!
summary(CPU$A0252)
1945 1961 1964 1966 1970
1 1 1 2 1
1971 1972 1973 1980 1981
1 1 1 1 3
1982 1983 1984 1986 1987
1 1 2 3 4
1988 1989 1990 1991 1992
1 4 6 11 5
1993 1994 1995 1996 1997
13 6 11 14 23
1998 1999 2000 2001 2002
7 12 12 20 19
2003 2004 2005 2006 2007
58 30 69 223 201
2008 2009 Ignorado NA Não aplicável
113 71 92 5 4520