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)
Written by Russ Lankenau
Related protips
Have a fresh tip? Share with Coderwall community!
Post
Post a tip
Best
#R
Authors
Sponsored by #native_company# — Learn More
#native_title#
#native_desc#