Creating Data Set

Hello Everyone,

Beginner at R here. I had a very basic question which is if there is a specific way to manually enter data into R when collected data? The reason for this is the dataset I am using is giving the following error
code: uv = ts(temp[,2],start=c(2017,1),end=c(2020,9),frequency=4)
plot(uv)
error: Error in plot.window(xlim, ylim, log, ...) : need finite 'ylim' values
In addition: Warning messages:
1: In xy.coords(x, NULL, log = log, setLab = FALSE) :
NAs introduced by coercion
2: In min(x) : no non-missing arguments to min; returning Inf
3: In max(x) : no non-missing arguments to max; returning -Inf
However, when I do the code for a different data set that I can automatically download from a website I receive no error message
code: oil = ts(temp[,2],start=c(1980,1),end=c(2019,9),frequency=12)
plot(oil)
which gives me an output. I therefore assume that maybe I collected the data wrong so I am wondering if there is anything I should be doing to keep the data clean. Any help is appreciated

Sorry meant to say "manually enter data into excel when collected data?"

Hi, welcome!

We don't really have enough info to help you out. Could you ask this with a minimal REPRoducible EXample (reprex)? A reprex makes it much easier for others to understand your issue and figure out how to help.

If you've never heard of a reprex before, you might want to start by reading this FAQ:

May be your data has NA. Check your time series for NA or missing values. Also while manually entering data in excel, you might have entered a non-numeric value.

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.