diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..5b6a065 --- /dev/null +++ b/.gitignore @@ -0,0 +1,4 @@ +.Rproj.user +.Rhistory +.RData +.Ruserdata diff --git a/class4-swirl.Rproj b/class4-swirl.Rproj new file mode 100644 index 0000000..8e3c2eb --- /dev/null +++ b/class4-swirl.Rproj @@ -0,0 +1,13 @@ +Version: 1.0 + +RestoreWorkspace: Default +SaveWorkspace: Default +AlwaysSaveHistory: Default + +EnableCodeIndexing: Yes +UseSpacesForTab: Yes +NumSpacesForTab: 2 +Encoding: UTF-8 + +RnwWeave: Sweave +LaTeX: pdfLaTeX diff --git a/lesson1.csv b/lesson1.csv new file mode 100644 index 0000000..9cb462b --- /dev/null +++ b/lesson1.csv @@ -0,0 +1,85 @@ +"time","answer","id" +1474553365181,"install.packages(swirl)","YOUR NAME" +1474553442911,"library(swirl)","YOUR NAME" +1474553451723,"swirl()","YOUR NAME" +1474553633067,"5+7","YOUR NAME" +1474553661057,"x<-5+7","YOUR NAME" +1474553670076,"x","YOUR NAME" +1474553682878,"y<-x-3","YOUR NAME" +1474553685960,"y","YOUR NAME" +1474553721725,"z<-c(1.1, 9, 3.14)","YOUR NAME" +1474553734547,"?c","YOUR NAME" +1474553746465,"z","YOUR NAME" +1474553765189,"c(z,555,z)","YOUR NAME" +1474553776357,"z*2+100","YOUR NAME" +1474553800096,"sqrt(z-1)","YOUR NAME" +1474553821367,"my_sqrt<-sqrt(z-1)","YOUR NAME" +1474553841081,"my_sqrt","YOUR NAME" +1474553865399,"my_div<-z/my_sqrt","YOUR NAME" +1474553903597,"my_div","YOUR NAME" +1474553941496,"c(1,2,3,4) +c(0,10)","YOUR NAME" +1474553967608,"c(1,2,3,4)+c(0,10,100)","YOUR NAME" +1474553993357,"z*2+1000","YOUR NAME" +1474554015395,"my_div","YOUR NAME" +1474554059133,"swirl()","YOUR NAME" +1474554133627,"getwd()","YOUR NAME" +1474554141991,"ls()","YOUR NAME" +1474554161488,"x<-9","YOUR NAME" +1474554168871,"ls()","YOUR NAME" +1474554179251,"dif()","YOUR NAME" +1474554182976,"dir()","YOUR NAME" +1474554200375,"?list.files","YOUR NAME" +1474554217604,"args()","YOUR NAME" +1474554227665,"args(list.files)","YOUR NAME" +1474554256982,"orl.dir<-args(list.files)","YOUR NAME" +1474554271653,"orl.dir<-getwd()","YOUR NAME" +1474554280623,"old.dir<-getwd()","YOUR NAME" +1474554315606,"testdir<-dir.create()","YOUR NAME" +1474554327935,"dir.create(testdir)","YOUR NAME" +1474554360723,"?dir.create","YOUR NAME" +1474554485749,"main()","YOUR NAME" +1474554536864,"ls(plants)","YOUR NAME" +1474554556147,"ls()","YOUR NAME" +1474554565877,"class(plants)","YOUR NAME" +1474554584799,"dim(plants)","YOUR NAME" +1474554779305,"nrow(plants)","YOUR NAME" +1474554842672,"ncol(plants)","YOUR NAME" +1474554855274,"main()","YOUR NAME" +1474554881396,"main()","YOUR NAME" +1474554918898,"data(cars)","YOUR NAME" +1474554927601,"data(cars)","YOUR NAME" +1474554943191,"?cars","YOUR NAME" +1474554958118,"head(cars)","YOUR NAME" +1474554971429,"plot(cars)","YOUR NAME" +1474555001987,"?plot","YOUR NAME" +1474555034094,"plot(speed, dist)","YOUR NAME" +1474555052995,"?cars","YOUR NAME" +1474555084715,"?plot","YOUR NAME" +1474555122513,"plot(cars.speed, cars.dist)","YOUR NAME" +1474555177718,"plot(cars, speed, dist)","YOUR NAME" +1474555226881,"cars?","YOUR NAME" +1474555235684,"main()","YOUR NAME" +1474555240865,"main()","YOUR NAME" +1474555346473,"main()","YOUR NAME" +1474555496550,"install_course(Regression Models)","YOUR NAME" +1474555510165,"install_course(Regression Models)","YOUR NAME" +1474555527537,"swirl()","YOUR NAME" +1474555629772,"plot(child ~ parent, galton)","YOUR NAME" +1474555656684,"plot(jitter(child,4) ~ parent,galton)","YOUR NAME" +1474555701221,"regrline<-lm(child ~ parent, galton)","YOUR NAME" +1474555724416,"abline(regrline, lwd=3, col=red)","YOUR NAME" +1474555744375,"summary(regrline)","YOUR NAME" +1474555944424,"H <-read.table(~/.rstudio-desktop/history_database, sep=:, fill=T, stringsAsFactors=F)","YOUR NAME" +1474555944570,"names(H) <- c(time, answer)","YOUR NAME" +1474555944590,"H$id <- YOUR NAME","YOUR NAME" +1474555944604,"write.csv(H, file = lesson1.csv, row.names = FALSE)","YOUR NAME" +1474555958535,"getwd()","YOUR NAME" +1474556757408,"H <-read.table(C:\Users\lfaf373\AppData\Local\RStudio-Desktop/history_database, sep=:, fill=T, stringsAsFactors=F)","YOUR NAME" +1474556757488,"names(H) <- c(time, answer)","YOUR NAME" +1474556757551,"H$id <- lfaf373","YOUR NAME" +1474556757567,"write.csv(H, file = lesson1.csv, row.names = FALSE)","YOUR NAME" +1474556804092,"H <-read.table(C:\Users\lfaf373\AppData\Local\RStudio-Desktop/history_database, sep=:, fill=T, stringsAsFactors=F)","YOUR NAME" +1474556855308,"H <-read.table(~/.rstudio-desktop/history_database, sep=:, fill=T, stringsAsFactors=F)","YOUR NAME" +1474556886212,"H <-read.table(~/Rstudio-Desktop/history_database, sep=:, fill=T, stringsAsFactors=F)","YOUR NAME" +1474557066057,"H <-read.table(C:\Users\lfaf373\AppData\Local\RStudio-Desktop\history_database, sep=:, fill=T, stringsAsFactors=F)","YOUR NAME" +1474557172932,"H <-read.table(C:/Users/lfaf373/AppData/Local/RStudio-Desktop/history_database, sep=:, fill=T, stringsAsFactors=F)","YOUR NAME"