Dear Sir or Madam: Hi,sorry for disturbing you. Currently, I'm a
master student, and my lecturer didn't teach us anything about how to use R.
But the assignment is all about R. So even a very stupid error,I still can't
tell. So please forgive my innocence.
The following is the requirement of my assignment
you will read in the data> > uscpi <-
read.table("C:/Users/APOLLO/Desktop/ECC4660/A2/uscpi.csv",header=T,sep=",")>
> # Now compute a variable called ss, short for subscript, which you> #
can use to index your variables, which will be useful for differencing> >
ss <- length(uscpi$year)> > # Compute what Julie Smith would refer to
as the "1 year-ahead consumer> # price index" as simply the log of
the price ratio between now and next> # year's observation> > inf
<- log(uscpi$usdcpi2000[2:ss]/uscpi$usdcpi2000[1:(ss-1)])> > # You can
take a look at the data with the following code> >
plot(uscpi$year[2:ss],inf,type="b",ylim=c(0,0.15))error in
xy.coords(x, y, xlabel, ylabel, log) : 'x' and 'y' lengths
differ
Could you please tell me what's wrong with it? I have attached my data in
this assignment.
Thank you very much
Best regards
_________________________________________________________________