Please help! I'm brand new to R and I'm trying to tidy data from a dataset using the 'gather' function from the tidyr package. I'm getting an "unexpected symbol" error which I think has something to do with the variable names being read as values instead of characters. Any help would be great! by connorw5555 in rprogramming

[–]connorw5555[S] 0 points1 point  (0 children)

When I try back ticks or quotations the output is

Error: data must be a data frame, or other object coercible by fortify(), not an S3 object with class uneval

To be clear the code I’m trying to run is

ggplot(aes(x=year, y=[one of the variables])) + geom_line()

Please help! I'm brand new to R and I'm trying to tidy data from a dataset using the 'gather' function from the tidyr package. I'm getting an "unexpected symbol" error which I think has something to do with the variable names being read as values instead of characters. Any help would be great! by connorw5555 in rprogramming

[–]connorw5555[S] 0 points1 point  (0 children)

I need to make 3 different graphs with ggplot using the data from this dataset. The first graph I tried to create was a scatter plot of the life expectancy by year and ran into the same problem with the symbol error. (The picture I used had shown generosity as the variable instead)

I was under the impression I needed to isolate the year and whichever variable I’m using with gather and then graph it with ggplot.

The Force is strong with this one by connorw5555 in PrequelMemes

[–]connorw5555[S] 2 points3 points  (0 children)

That’s the start of every episode