Site icon R-bloggers

R video tutorial number 2

[This article was first published on Decision Science News » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

READ TEXT FILES, RUN MODELS

The Decision Science News R video tutorials continue with number 2. (If you missed that last one, you will want to watch R Video Tutorial Number 1 first.) The Goldstein pedometer dataset can be downloaded from http://www.dangoldstein.com/flash/Rtutorial2/pedometer.csv

Topics covered this week include:

The commands in the tutorial are:
myData=read.table("pedometer.csv", header=TRUE, sep=",") x=hist(myData$Steps,col="lightblue") x=hist(myData$Steps,breaks=20,col="lightblue") plot(myData$Steps ~ myData$Observation,col="blue") myModel=lm(myData$Steps ~ myData$Observation) summary(myModel) lines(fitted(myModel)) lines(fitted(loess(myModel)),col="red")

< size="1">Can’t view flash? Download movie If you see no image under Windows, download the TSSC Codec< >.

To leave a comment for the author, please follow the link and comment on their blog: Decision Science News » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.