From f79ba5eb4df363da943577522d722e8f8b776865 Mon Sep 17 00:00:00 2001 From: JR1990 Date: Wed, 21 Sep 2016 14:28:28 -0400 Subject: [PATCH 1/2] add --- Class 4- Swirl.Rproj | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 Class 4- Swirl.Rproj diff --git a/Class 4- Swirl.Rproj b/Class 4- Swirl.Rproj new file mode 100644 index 0000000..8e3c2eb --- /dev/null +++ b/Class 4- 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 From 66f0453dac178d30694e5d6309c960da12090873 Mon Sep 17 00:00:00 2001 From: JR1990 Date: Thu, 22 Sep 2016 12:25:34 -0400 Subject: [PATCH 2/2] add --- .gitignore | 4 ++ Class 4 - Swirl.Rproj | 13 ++++++ lesson1.csv | 104 ++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 121 insertions(+) create mode 100644 .gitignore create mode 100644 Class 4 - Swirl.Rproj create mode 100644 lesson1.csv 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/Class 4 - Swirl.Rproj b/Class 4 - Swirl.Rproj new file mode 100644 index 0000000..8e3c2eb --- /dev/null +++ b/Class 4 - 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..1c60c79 --- /dev/null +++ b/lesson1.csv @@ -0,0 +1,104 @@ +"time","answer","id" +1474399487980,"1+1","YOUR NAME" +1474399979407,"1+1","YOUR NAME" +1474482179945,"install.packages(swirl)","YOUR NAME" +1474482211447,"install.packages(swirl)","YOUR NAME" +1474482267124,"library(swirl)","YOUR NAME" +1474482323147,"swirl(JG)","YOUR NAME" +1474482329298,"swirl()","YOUR NAME" +1474482753771,"H <-read.table(~/.rstudio-desktop/history_database,sep=:,fill = T,stringsAsFactors = F)","YOUR NAME" +1474482790589,"names(H) <- c(time,answer)","YOUR NAME" +1474482810779,"H$id<-Jie Gao","YOUR NAME" +1474482865817,"write.csv (H,file = lesson1.csv,row.names = FALSE)","YOUR NAME" +1474556929478,"install.packages(swirl)","YOUR NAME" +1474557074184,"library(swirl)","YOUR NAME" +1474557092016,"swirl()","YOUR NAME" +1474557353913,"swirl()","YOUR NAME" +1474557704814,"5 + 7","YOUR NAME" +1474557850423,"x gets 5 plus 7","YOUR NAME" +1474557877897,"x gets 5 plus 7","YOUR NAME" +1474557915121,"x <- 5 +7","YOUR NAME" +1474557971572,"x","YOUR NAME" +1474558000982,"x - 3 = y","YOUR NAME" +1474558031927,"y = 9","YOUR NAME" +1474558053202,"y < -x - 3","YOUR NAME" +1474558254396,"9 <- x - 3","YOUR NAME" +1474558273679,"y < - x -3","YOUR NAME" +1474558297373,"y <- x - 3","YOUR NAME" +1474558323609,"y","YOUR NAME" +1474558446874,"c(1.1,9,3.14)","YOUR NAME" +1474558474609,"z <- c(1.1,9,3.14)","YOUR NAME" +1474558504497,"?c","YOUR NAME" +1474558510489,"z","YOUR NAME" +1474558555672,"c(z,555,z)","YOUR NAME" +1474558570646,"z*2+100","YOUR NAME" +1474558639940,"my_sqrt<- z-1","YOUR NAME" +1474558679128,"my_sqrt <- sqrt","YOUR NAME" +1474558695336,"my_sqrt <- sqrt(z -1)","YOUR NAME" +1474558725025,"my_sqrt","YOUR NAME" +1474558802751,"my_div <- div(z/my_sqrt)","YOUR NAME" +1474558863935,"my_div <- sqrt(z/my_sqrt)","YOUR NAME" +1474558880798,"my_div <- z/my_sqrt","YOUR NAME" +1474558911793,"my_div","YOUR NAME" +1474558966913,"c(1,2,3,4)","YOUR NAME" +1474558989351,"c(1,2,3,4) + c(0,10)","YOUR NAME" +1474559019893,"C(1,2,3,4) + c(0,10,100)","YOUR NAME" +1474559052973,"c(1,2,3,4) + c(0,10,100)","YOUR NAME" +1474559153907,"z * 2 + 1000","YOUR NAME" +1474559263471,"my_div","YOUR NAME" +1474559439373,"swirl()","YOUR NAME" +1474559560420,"getwd()","YOUR NAME" +1474559568165,"ls()","YOUR NAME" +1474559588942,"x<- 9","YOUR NAME" +1474559608338,"ls()","YOUR NAME" +1474559619063,"list.files()","YOUR NAME" +1474559647035,"list.files()","YOUR NAME" +1474559680285,"?list.files","YOUR NAME" +1474559699745,"args()","YOUR NAME" +1474559716309,"args(list.files)","YOUR NAME" +1474559732155,"old.dir","YOUR NAME" +1474559754797,"args(old.dir)","YOUR NAME" +1474559796451,"list.files(old.dir)","YOUR NAME" +1474559868368,"old.dir","YOUR NAME" +1474559892085,"old.dir <- getwd()","YOUR NAME" +1474559927779,"dir.create(testdir)","YOUR NAME" +1474559934682,"dir.create()","YOUR NAME" +1474559944897,"dir.create(testdir)","YOUR NAME" +1474559981506,"testdir <- setwd()","YOUR NAME" +1474559992279,"setwd(testdir)","YOUR NAME" +1474560000504,"setwd(testdir)","YOUR NAME" +1474560046543,"file.create(mytest.R)","YOUR NAME" +1474560099466,"mytest.R","YOUR NAME" +1474560127747,"1","YOUR NAME" +1474560139468,"list.files()","YOUR NAME" +1474560163593,"file.exists(mytest.R)","YOUR NAME" +1474560196254,"file.info(mytest.R)","YOUR NAME" +1474560235634,"file.rename(mytest.R,mytest2.R)","YOUR NAME" +1474560260931,"file.rename(mytest.R,mytest2.R)","YOUR NAME" +1474560314439,"file.copy(mytest2.R,mytest3.R)","YOUR NAME" +1474560341363,"file.path(mytest3.R)","YOUR NAME" +1474560384995,"file.path(folder,folder2)","YOUR NAME" +1474560414364,"file.path(folder1,folder2)","YOUR NAME" +1474560430757,"?dir.create","YOUR NAME" +1474560456054,"dir.create(testdir.2)","YOUR NAME" +1474560495504,"dir.create(testdir2)","YOUR NAME" +1474560552295,"dir.create(file.path(testdir2,testdir3),recursive = TRUE)","YOUR NAME" +1474560574992,"setwd()","YOUR NAME" +1474560588205,"setwd(dir)","YOUR NAME" +1474560613240,"setwd(old.dir)","YOUR NAME" +1474560701500,"testdir","YOUR NAME" +1474560708020,"testdir","YOUR NAME" +1474560737930,"unlink(testdir, recursive = TRUE)","YOUR NAME" +1474560821407,"1","YOUR NAME" +20,"","YOUR NAME" +1474560830191,"pi","YOUR NAME" +10,"","YOUR NAME" +1474560840669,"15","YOUR NAME" +1,"","YOUR NAME" +1474560847098,"","YOUR NAME" +1474560861376,":","YOUR NAME" +1474561054539,"info()","YOUR NAME" +1474561078377,"bye()","YOUR NAME" +1474561086789,"swirl()","YOUR NAME" +1474561394314,"bye()","YOUR NAME" +1474561462741,"H <-read.table(~/.rstudio-desktop/history_database, sep=:, fill=T, stringsAsFactors=F)","YOUR NAME"