geom_path error from zoo library

Hello everyone,

I'm new in R programming and I need a small help.

I want to display one of the column of my table from excel.

I need to use following codes:


But when I enter autoplot.zoo(gdp) I keep getting an error
geom_path: Each group consists of only one
observation. Do you need to adjust the group

i don't know how to group in this code or what I need to do.

P.s I tried many things, But i couldn't plot a simple line graph.

Pls help

Thank you

Hi, and welcome!

A reproducible example, called a reprex is much more helpful in attracting more and better answers than a screenshot.

What it looks like is that you gave a character argument to the function -- "GDP" when it was expecting a vector, US$GDP

It worked...
Thank you so much.
I will keep these things in mind next time.

1 Like

Great. Please mark the solution for the benefit of those to follow.

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