[R] Help

Duncan Murdoch murdoch.duncan at gmail.com
Mon May 17 15:20:50 CEST 2010

On 17/05/2010 9:07 AM, APOLLOCHEROKEE wrote:
> 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.

You should ask your instructor for help with your assignment, not post
to this list. As the posting guide says, R-help is not intended for
classroom homework.

Duncan Murdoch

> 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 		 	   		  
> _________________________________________________________________
> ------------------------------------------------------------------------
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

More information about the R-help mailing list