Need help formatting my csv for import

I am having trouble properly formatting my data file to use in RStudio.

I think I have the file set up correctly, and it is importing just fine, but when I try to do anything with it I just get errors. Would someone be willing to take a look at my csv and see if everything looks right?

Edit: This is the data. I have it saved in an Excel csv file.

Year IRL_AnnLit USA_AnnLit
1960 4.9 7.8
1961 5 7.8
1962 5.5 8
1963 5.2 8.1
1964 5.6 8.4
1965 5.8 8.6
1966 5.9 8.8
1967 5.9 9
1968 6.1 9.3
1969 6.5 9.5
1970 7 9.5
1971 7.3 9.8
1972 7.7 9.6
1973 8.2 9.8
1974 9.3 10
1975 9.2 10.1
1976 9 10.1
1977 9.2 9.8
1978 9.8 10.1
1979 10 10.2
1980 9.6 10.4
1981 9.1 10.4
1982 8.8 10.3
1983 8 10.2
1984 9.6 10
1985 10 9.9
1986 9.6 9.8
1987 9.5 9.7
1988 9.9 9.4
1989 10.2 9.2
1990 11.2 9.3
1991 11.2 8.7
1992 11.4 8.7
1993 11.2 8.4
1994 11.2 8.3
1995 11.5 8.1
1996 12.2 8.2
1997 12.8 8.1
1998 13.2 8.1
1999 13.8 8.2
2000 14.2 8.3
2001 14.5 8.3
2002 14.3 8.3
2003 13.5 8.4
2004 13.6 8.5
2005 13.4 8.5
2006 13.4 8.6
2007 13.2 8.7
2008 12.2 8.7
2009 11 8.7
2010 11.6 8.6
2011 11.7 8.7
2012 11.5 8.9
2013 10.6 8.8
2014 10.8 8.8
2015 10.7 8.8
2016 11.2 8.9
2017 11 8.9

Hi @KevinTESU,
You will almost certainly get help here if you post the code you used to read the file, and show the first error you encountered, along with the output from running head(your_dataframe, n=10). It may also be necessary to post a link to the file in the cloud so that we can see your data in full (or a least a representative subset of it, anonymized if necessary).

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.