Last Updated: February 25, 2016
·
2.002K
· rlankenau

plotting sequential data and trend line in R

dev.new()
d = read.table("mydata", header=T)
attach(d)
item_numbers = 1:3000000
y_max = max(MY_DATA)
plot(item_numbers, MY_DATA, xlab="Item #", ylab="Value",     col.lab=rgb(0,0.5,0), ylim=c(2,y_max), cex=0.01, col="blue") title(main="My title", col="Black") 
lines(lowess(item_numbers, MY_DATA), col="red", lty=3)