On 4/28/05, Jonathan Q. <[EMAIL PROTECTED]> wrote: 
> 
> just started using r. a few questions I can't figure out.
> 
> first, when loading in a text file, I can do it from the web but not
> from hard drive.
> Fil<- 'http://www.test.com/file.txt' -- works
> Fil<- 'c:\program files\file.txt' --does not. what am i doing wrong??

  \ has special meaning to R. Either use \\ or use /, e.g.
Fil <- "c:/Program Files/file.txt"

also, how do you plot a graph of a time series that is lagged?
> i.e., plot(sp,type='l') but say for sp[t-1] ??

  x <- ts((1:5)^2) # create ts object, i.e. time series, so you can use lag 
on it
ts.plot(x, lag(x), col = c("blue", "red"))

______________________________________________
> [email protected] mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
>

        [[alternative HTML version deleted]]

______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to