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,2,3.csv b/lesson1,2,3.csv new file mode 100644 index 0000000..27d38aa --- /dev/null +++ b/lesson1,2,3.csv @@ -0,0 +1,191 @@ +"time","answer","id" +"1473869585662","asd","David Nitkin" +"1473953836583","setwd(~/Dropbox (Personal)/Github/Assignment 1)","David Nitkin" +"1473954978002","install.packages(swirl)","David Nitkin" +"1473955007605","library(swirl)","David Nitkin" +"1473955039949","swirl()","David Nitkin" +"1473955666432","5+7","David Nitkin" +"1473955697065","x <- 5 + 7","David Nitkin" +"1473955724878","x","David Nitkin" +"1473955731540","play()","David Nitkin" +"1473955734269","x","David Nitkin" +"1473955737188","x + 5","David Nitkin" +"1473955740156","x*x","David Nitkin" +"1473955751085","y <- x+x","David Nitkin" +"1473955755181","y","David Nitkin" +"1473955757723","y+x","David Nitkin" +"1473955761172","nxt()","David Nitkin" +"1473955769446","y <- x - 3","David Nitkin" +"1473955771616","y","David Nitkin" +"1473955844150","c(1.1, 9, 3.14)","David Nitkin" +"1473955861418","c(1.1, 9, 3.14).","David Nitkin" +"1473955875936","z <- c(1.1, 9, 3.14)","David Nitkin" +"1473955887217","?c","David Nitkin" +"1473955894329","z","David Nitkin" +"1473955929747","z, 555, v","David Nitkin" +"1473955938418","z, 555, z","David Nitkin" +"1473955946345","c(z, 555, z)","David Nitkin" +"1473955961646","z * 2 + 100","David Nitkin" +"1473956022489","play()","David Nitkin" +"1473956028179","sqrt(9)","David Nitkin" +"1473956035060","sqrt(z)","David Nitkin" +"1473956045620","nxt()","David Nitkin" +"1473956063559","my_sqrt <- sqrt(z-1)","David Nitkin" +"1473956084243","my_sqrt","David Nitkin" +"1473956115573","my_div(z/my_sqrt)","David Nitkin" +"1473956124520","my_div <- (z/my_sqrt)","David Nitkin" +"1473956161634","my_div <- z / my_sqrt","David Nitkin" +"1473956178024","my_div","David Nitkin" +"1473956245774","play()","David Nitkin" +"1473956251342","rm(x)","David Nitkin" +"1473956256289","nxt()","David Nitkin" +"1473956278452","c(1, 2, 3, 4) + c(0, 10)","David Nitkin" +"1473956302857","c(1, 2, 3, 4) + c(0, 10, 100)","David Nitkin" +"1473956335664","z * 2 + 1000","David Nitkin" +"1473956353091","my_sqrt","David Nitkin" +"1473956363452","my_div","David Nitkin" +"1473956448264","swirl()","David Nitkin" +"1473956512512","swirl()","David Nitkin" +"1473956524668","package(swirl)","David Nitkin" +"1473956567276","library(swirl)","David Nitkin" +"1473956572459","swirl()","David Nitkin" +"1473956594564","bye()","David Nitkin" +"1474057749755","load(swirl)","David Nitkin" +"1474057762655","?load()","David Nitkin" +"1474057773389","?open()","David Nitkin" +"1474057811596","library(swirl)","David Nitkin" +"1474057815033","swirl()","David Nitkin" +"1474058241659","getwd()","David Nitkin" +"1474058254932","ls()","David Nitkin" +"1474058278206","x <- 9","David Nitkin" +"1474058280646","ls()","David Nitkin" +"1474058284407","x","David Nitkin" +"1474058294886","dir()","David Nitkin" +"1474058321299","?list.files()","David Nitkin" +"1474058335315","?list.files","David Nitkin" +"1474058522865","args(listfiles)","David Nitkin" +"1474058526088","args(list.files)","David Nitkin" +"1474058552156","getwd() <- old.dir","David Nitkin" +"1474058561477","old.dir <- getwd()","David Nitkin" +"1474058590873","dir.create(testdir)","David Nitkin" +"1474058612035","dir.create(testdir)","David Nitkin" +"1474058623282","?dir.create","David Nitkin" +"1474058648010","dir.create()","David Nitkin" +"1474058656613","dir.crate(old.dir)","David Nitkin" +"1474058663975","dir.create(old.dir)","David Nitkin" +"1474058681679","dir.create(testdir)","David Nitkin" +"1474058738956","getwd()","David Nitkin" +"1474058746948","setwd(testdir)","David Nitkin" +"1474058769206","file.create(mytest.R)","David Nitkin" +"1474058801841","list.files()","David Nitkin" +"1474058818042","file.exists(mytest.R)","David Nitkin" +"1474058867422","file.info(mytest.R)","David Nitkin" +"1474058925172","?file.rename","David Nitkin" +"1474058962414","file.rename(mytest.R, mytest2.R)","David Nitkin" +"1474059111667","file.copy(mytest2.R, mytest3.R)","David Nitkin" +"1474059220712","play()","David Nitkin" +"1474059225746","?file.path()","David Nitkin" +"1474059254189","nxt()","David Nitkin" +"1474059265949","file.path(mytest3.R)","David Nitkin" +"1474059385518","file.path(folder1, folder2)","David Nitkin" +"1474059402154","?dir.create()","David Nitkin" +"1474059407913","?dir.create","David Nitkin" +"1474059465269","get.wd()","David Nitkin" +"1474059471062","getwd()","David Nitkin" +"1474059510162","dir.create(file.path(testdir2, testdir3), recursive = True))","David Nitkin" +"1474059522666","dir.create(file.path(testdir2, testdir3), recursive = True)) +1474059529962:dir.create(file.path(testdir2, testdir3), recursive = True))","David Nitkin" +"1474059538203","dir.create(file.path(testdir2, testdir3), recursive = True) +1474059541700:dir.create(file.path(testdir2, testdir3), recursive = True)","David Nitkin" +"1474059550651","dir.create(file.path(testdir2, testdir3), recursive = True) +1474059552909:dir.create(file.path('testdir2', 'testdir3'), recursive = True)","David Nitkin" +"1474059555468","play()","David Nitkin" +"1474059559668","nxt()","David Nitkin" +"1474059600448","dir.create(file.path(testdir2, testdir3), recursive = True)","David Nitkin" +"1474059606864","dir.create(file.path(testdir2, testdir3), recursive = TRUE)","David Nitkin" +"1474059686127","play()","David Nitkin" +"1474059690265","getwd","David Nitkin" +"1474059693945","getwd()","David Nitkin" +"1474059800393","unlink(testdir, recursive = TRUE)","David Nitkin" +"1474059809522","getwd()","David Nitkin" +"1474059818993","unlink(testdir2, recursive = TRUE)","David Nitkin" +"1474059824083","getwd()","David Nitkin" +"1474059830227","?unlink()","David Nitkin" +"1474059856878","unlink(testdir3, recursive = TRUE)","David Nitkin" +"1474059860309","getwd()","David Nitkin" +"1474059883598","ls()","David Nitkin" +"1474059886888","dir()","David Nitkin" +"1474059901847","file.remove(mytest2.R)","David Nitkin" +"1474059912202","file.remove(mytest3.R)","David Nitkin" +"1474059952852","unlink(testdir2, recursive = TRUE)","David Nitkin" +"1474059966173","nxt()","David Nitkin" +"1474059977279","setwd(old.dir)","David Nitkin" +"1474059999840","unlink(testdir, recursive = TRUE)","David Nitkin" +"1474060034522","getwd()","David Nitkin" +"1474060039459","list.files()","David Nitkin" +"1474060050379","dir.create(test.dir)","David Nitkin" +"1474060055005","getwd()","David Nitkin" +"1474060058604","list.files()","David Nitkin" +"1474060075606","unlink(test.dir, recursive = TRUE)","David Nitkin" +"1474060078886","list.files()","David Nitkin" +"1474383800609","getwd()","David Nitkin" +"1474383851500","setwd(/Users/davidnitkin/Dropbox (Personal)/Github)","David Nitkin" +"1474383854891","getwd()","David Nitkin" +"1474383863679","ls()","David Nitkin" +"1474383886552","dir()","David Nitkin" +"1474476213904","swirl()","David Nitkin" +"1474476221646","library(swirl)","David Nitkin" +"1474476224531","swirl()","David Nitkin" +"1474476264394","1","David Nitkin" +"20","","David Nitkin" +"1474476274303","pi","David Nitkin" +"10","","David Nitkin" +"1474476285852","15","David Nitkin" +"1","","David Nitkin" +"1474476314337","?`","David Nitkin" +"`","","David Nitkin" +"1474476336890","seq(1, 20)","David Nitkin" +"1474476340402","play()","David Nitkin" +"1474476346268","seq(1,20)","David Nitkin" +"1474476350572","seq(20,1)","David Nitkin" +"1474476355061","seq(pi,4)","David Nitkin" +"1474476361571","nxt()","David Nitkin" +"1474476371526","play()","David Nitkin" +"1474476375097","?seq()","David Nitkin" +"1474476933142","dir()","David Nitkin" +"1474476938898","getwd()","David Nitkin" +"1474476960830","setwd(/Users/davidnitkin/Dropbox (Personal)/Github/Class 4 - Swirl)","David Nitkin" +"1474476970049","getwd()","David Nitkin" +"1474477001506","setwd(/Users/davidnitkin/Dropbox (Personal)/Github/Class 4 - Swirl)","David Nitkin" +"1474477014690","setwd(/Users/davidnitkin/Dropbox (Personal)/Github)","David Nitkin" +"1474477025791","?setwd()","David Nitkin" +"1474477037781","setwd(Users/davidnitkin/Dropbox (Personal)/Github/Class 4 - Swirl)","David Nitkin" +"1474477089942","library(swirl)","David Nitkin" +"1474477092478","swirl()","David Nitkin" +"1474477109809","seq(0, 10, by=0.5)","David Nitkin" +"1474477134469","my_seq <- seq(5, 10, length=30)","David Nitkin" +"1474477145371","length(my_seq)","David Nitkin" +"1474477177675","1","David Nitkin" +"length(my_seq)","","David Nitkin" +"1474477189986","seq(along.width = my_seq)","David Nitkin" +"1474477219089","seq(along.with = my_seq)","David Nitkin" +"1474477229165","seq_along(my_seq)","David Nitkin" +"1474477260514","rep(0, times = 40)","David Nitkin" +"1474477289498","rep((c(0, 1, 2), times = 10)","David Nitkin" +"1474477301216","rep(c(0, 1, 2), times = 10)","David Nitkin" +"1474477418401","rep(c(0, 1, 2), each = 10)","David Nitkin" +"1474477567725","length(rep(c(1,2,3) times = 40))","David Nitkin" +"1474477574038","length(rep(c(1,2,3), times = 40))","David Nitkin" +"1474477580842","rep(c(1,2,3), times = 40))","David Nitkin" +"1474477583740","rep(c(1,2,3), times = 40)","David Nitkin" +"1474477619895","getwd()","David Nitkin" +"1474477653513","H <-read.table(~/Users/davidnitkin/Dropbox (Personal)/Github/Class 4 - Swirl, fill=T, stringsAsFactors=F)","David Nitkin" +"1474477653515","names(H) <- c(time, answer)","David Nitkin" +"1474477653516","H$id <- YOUR NAME","David Nitkin" +"1474477653517","write.csv(H, file = lesson1.csv, row.names = FALSE)","David Nitkin" +"1474477686235","H <-read.table(~/.rstudio-desktop/history_database, sep=:, fill=T, stringsAsFactors=F)","David Nitkin" +"1474477686268","names(H) <- c(time, answer)","David Nitkin" +"1474477686269","H$id <- YOUR NAME","David Nitkin" +"1474477686269","write.csv(H, file = lesson1.csv, row.names = FALSE)","David Nitkin" +"1474477706063","H","David Nitkin" +"1474477801330","H <-read.table(~/.rstudio-desktop/history_database, sep=:, fill=T, stringsAsFactors=F)","David Nitkin" diff --git a/lesson1.csv b/lesson1.csv new file mode 100644 index 0000000..8ebc8d7 --- /dev/null +++ b/lesson1.csv @@ -0,0 +1,186 @@ +"time","answer","id" +"1473869585662","asd","YOUR NAME" +"1473953836583","setwd(~/Dropbox (Personal)/Github/Assignment 1)","YOUR NAME" +"1473954978002","install.packages(swirl)","YOUR NAME" +"1473955007605","library(swirl)","YOUR NAME" +"1473955039949","swirl()","YOUR NAME" +"1473955666432","5+7","YOUR NAME" +"1473955697065","x <- 5 + 7","YOUR NAME" +"1473955724878","x","YOUR NAME" +"1473955731540","play()","YOUR NAME" +"1473955734269","x","YOUR NAME" +"1473955737188","x + 5","YOUR NAME" +"1473955740156","x*x","YOUR NAME" +"1473955751085","y <- x+x","YOUR NAME" +"1473955755181","y","YOUR NAME" +"1473955757723","y+x","YOUR NAME" +"1473955761172","nxt()","YOUR NAME" +"1473955769446","y <- x - 3","YOUR NAME" +"1473955771616","y","YOUR NAME" +"1473955844150","c(1.1, 9, 3.14)","YOUR NAME" +"1473955861418","c(1.1, 9, 3.14).","YOUR NAME" +"1473955875936","z <- c(1.1, 9, 3.14)","YOUR NAME" +"1473955887217","?c","YOUR NAME" +"1473955894329","z","YOUR NAME" +"1473955929747","z, 555, v","YOUR NAME" +"1473955938418","z, 555, z","YOUR NAME" +"1473955946345","c(z, 555, z)","YOUR NAME" +"1473955961646","z * 2 + 100","YOUR NAME" +"1473956022489","play()","YOUR NAME" +"1473956028179","sqrt(9)","YOUR NAME" +"1473956035060","sqrt(z)","YOUR NAME" +"1473956045620","nxt()","YOUR NAME" +"1473956063559","my_sqrt <- sqrt(z-1)","YOUR NAME" +"1473956084243","my_sqrt","YOUR NAME" +"1473956115573","my_div(z/my_sqrt)","YOUR NAME" +"1473956124520","my_div <- (z/my_sqrt)","YOUR NAME" +"1473956161634","my_div <- z / my_sqrt","YOUR NAME" +"1473956178024","my_div","YOUR NAME" +"1473956245774","play()","YOUR NAME" +"1473956251342","rm(x)","YOUR NAME" +"1473956256289","nxt()","YOUR NAME" +"1473956278452","c(1, 2, 3, 4) + c(0, 10)","YOUR NAME" +"1473956302857","c(1, 2, 3, 4) + c(0, 10, 100)","YOUR NAME" +"1473956335664","z * 2 + 1000","YOUR NAME" +"1473956353091","my_sqrt","YOUR NAME" +"1473956363452","my_div","YOUR NAME" +"1473956448264","swirl()","YOUR NAME" +"1473956512512","swirl()","YOUR NAME" +"1473956524668","package(swirl)","YOUR NAME" +"1473956567276","library(swirl)","YOUR NAME" +"1473956572459","swirl()","YOUR NAME" +"1473956594564","bye()","YOUR NAME" +"1474057749755","load(swirl)","YOUR NAME" +"1474057762655","?load()","YOUR NAME" +"1474057773389","?open()","YOUR NAME" +"1474057811596","library(swirl)","YOUR NAME" +"1474057815033","swirl()","YOUR NAME" +"1474058241659","getwd()","YOUR NAME" +"1474058254932","ls()","YOUR NAME" +"1474058278206","x <- 9","YOUR NAME" +"1474058280646","ls()","YOUR NAME" +"1474058284407","x","YOUR NAME" +"1474058294886","dir()","YOUR NAME" +"1474058321299","?list.files()","YOUR NAME" +"1474058335315","?list.files","YOUR NAME" +"1474058522865","args(listfiles)","YOUR NAME" +"1474058526088","args(list.files)","YOUR NAME" +"1474058552156","getwd() <- old.dir","YOUR NAME" +"1474058561477","old.dir <- getwd()","YOUR NAME" +"1474058590873","dir.create(testdir)","YOUR NAME" +"1474058612035","dir.create(testdir)","YOUR NAME" +"1474058623282","?dir.create","YOUR NAME" +"1474058648010","dir.create()","YOUR NAME" +"1474058656613","dir.crate(old.dir)","YOUR NAME" +"1474058663975","dir.create(old.dir)","YOUR NAME" +"1474058681679","dir.create(testdir)","YOUR NAME" +"1474058738956","getwd()","YOUR NAME" +"1474058746948","setwd(testdir)","YOUR NAME" +"1474058769206","file.create(mytest.R)","YOUR NAME" +"1474058801841","list.files()","YOUR NAME" +"1474058818042","file.exists(mytest.R)","YOUR NAME" +"1474058867422","file.info(mytest.R)","YOUR NAME" +"1474058925172","?file.rename","YOUR NAME" +"1474058962414","file.rename(mytest.R, mytest2.R)","YOUR NAME" +"1474059111667","file.copy(mytest2.R, mytest3.R)","YOUR NAME" +"1474059220712","play()","YOUR NAME" +"1474059225746","?file.path()","YOUR NAME" +"1474059254189","nxt()","YOUR NAME" +"1474059265949","file.path(mytest3.R)","YOUR NAME" +"1474059385518","file.path(folder1, folder2)","YOUR NAME" +"1474059402154","?dir.create()","YOUR NAME" +"1474059407913","?dir.create","YOUR NAME" +"1474059465269","get.wd()","YOUR NAME" +"1474059471062","getwd()","YOUR NAME" +"1474059510162","dir.create(file.path(testdir2, testdir3), recursive = True))","YOUR NAME" +"1474059522666","dir.create(file.path(testdir2, testdir3), recursive = True)) +1474059529962:dir.create(file.path(testdir2, testdir3), recursive = True))","YOUR NAME" +"1474059538203","dir.create(file.path(testdir2, testdir3), recursive = True) +1474059541700:dir.create(file.path(testdir2, testdir3), recursive = True)","YOUR NAME" +"1474059550651","dir.create(file.path(testdir2, testdir3), recursive = True) +1474059552909:dir.create(file.path('testdir2', 'testdir3'), recursive = True)","YOUR NAME" +"1474059555468","play()","YOUR NAME" +"1474059559668","nxt()","YOUR NAME" +"1474059600448","dir.create(file.path(testdir2, testdir3), recursive = True)","YOUR NAME" +"1474059606864","dir.create(file.path(testdir2, testdir3), recursive = TRUE)","YOUR NAME" +"1474059686127","play()","YOUR NAME" +"1474059690265","getwd","YOUR NAME" +"1474059693945","getwd()","YOUR NAME" +"1474059800393","unlink(testdir, recursive = TRUE)","YOUR NAME" +"1474059809522","getwd()","YOUR NAME" +"1474059818993","unlink(testdir2, recursive = TRUE)","YOUR NAME" +"1474059824083","getwd()","YOUR NAME" +"1474059830227","?unlink()","YOUR NAME" +"1474059856878","unlink(testdir3, recursive = TRUE)","YOUR NAME" +"1474059860309","getwd()","YOUR NAME" +"1474059883598","ls()","YOUR NAME" +"1474059886888","dir()","YOUR NAME" +"1474059901847","file.remove(mytest2.R)","YOUR NAME" +"1474059912202","file.remove(mytest3.R)","YOUR NAME" +"1474059952852","unlink(testdir2, recursive = TRUE)","YOUR NAME" +"1474059966173","nxt()","YOUR NAME" +"1474059977279","setwd(old.dir)","YOUR NAME" +"1474059999840","unlink(testdir, recursive = TRUE)","YOUR NAME" +"1474060034522","getwd()","YOUR NAME" +"1474060039459","list.files()","YOUR NAME" +"1474060050379","dir.create(test.dir)","YOUR NAME" +"1474060055005","getwd()","YOUR NAME" +"1474060058604","list.files()","YOUR NAME" +"1474060075606","unlink(test.dir, recursive = TRUE)","YOUR NAME" +"1474060078886","list.files()","YOUR NAME" +"1474383800609","getwd()","YOUR NAME" +"1474383851500","setwd(/Users/davidnitkin/Dropbox (Personal)/Github)","YOUR NAME" +"1474383854891","getwd()","YOUR NAME" +"1474383863679","ls()","YOUR NAME" +"1474383886552","dir()","YOUR NAME" +"1474476213904","swirl()","YOUR NAME" +"1474476221646","library(swirl)","YOUR NAME" +"1474476224531","swirl()","YOUR NAME" +"1474476264394","1","YOUR NAME" +"20","","YOUR NAME" +"1474476274303","pi","YOUR NAME" +"10","","YOUR NAME" +"1474476285852","15","YOUR NAME" +"1","","YOUR NAME" +"1474476314337","?`","YOUR NAME" +"`","","YOUR NAME" +"1474476336890","seq(1, 20)","YOUR NAME" +"1474476340402","play()","YOUR NAME" +"1474476346268","seq(1,20)","YOUR NAME" +"1474476350572","seq(20,1)","YOUR NAME" +"1474476355061","seq(pi,4)","YOUR NAME" +"1474476361571","nxt()","YOUR NAME" +"1474476371526","play()","YOUR NAME" +"1474476375097","?seq()","YOUR NAME" +"1474476933142","dir()","YOUR NAME" +"1474476938898","getwd()","YOUR NAME" +"1474476960830","setwd(/Users/davidnitkin/Dropbox (Personal)/Github/Class 4 - Swirl)","YOUR NAME" +"1474476970049","getwd()","YOUR NAME" +"1474477001506","setwd(/Users/davidnitkin/Dropbox (Personal)/Github/Class 4 - Swirl)","YOUR NAME" +"1474477014690","setwd(/Users/davidnitkin/Dropbox (Personal)/Github)","YOUR NAME" +"1474477025791","?setwd()","YOUR NAME" +"1474477037781","setwd(Users/davidnitkin/Dropbox (Personal)/Github/Class 4 - Swirl)","YOUR NAME" +"1474477089942","library(swirl)","YOUR NAME" +"1474477092478","swirl()","YOUR NAME" +"1474477109809","seq(0, 10, by=0.5)","YOUR NAME" +"1474477134469","my_seq <- seq(5, 10, length=30)","YOUR NAME" +"1474477145371","length(my_seq)","YOUR NAME" +"1474477177675","1","YOUR NAME" +"length(my_seq)","","YOUR NAME" +"1474477189986","seq(along.width = my_seq)","YOUR NAME" +"1474477219089","seq(along.with = my_seq)","YOUR NAME" +"1474477229165","seq_along(my_seq)","YOUR NAME" +"1474477260514","rep(0, times = 40)","YOUR NAME" +"1474477289498","rep((c(0, 1, 2), times = 10)","YOUR NAME" +"1474477301216","rep(c(0, 1, 2), times = 10)","YOUR NAME" +"1474477418401","rep(c(0, 1, 2), each = 10)","YOUR NAME" +"1474477567725","length(rep(c(1,2,3) times = 40))","YOUR NAME" +"1474477574038","length(rep(c(1,2,3), times = 40))","YOUR NAME" +"1474477580842","rep(c(1,2,3), times = 40))","YOUR NAME" +"1474477583740","rep(c(1,2,3), times = 40)","YOUR NAME" +"1474477619895","getwd()","YOUR NAME" +"1474477653513","H <-read.table(~/Users/davidnitkin/Dropbox (Personal)/Github/Class 4 - Swirl, fill=T, stringsAsFactors=F)","YOUR NAME" +"1474477653515","names(H) <- c(time, answer)","YOUR NAME" +"1474477653516","H$id <- YOUR NAME","YOUR NAME" +"1474477653517","write.csv(H, file = lesson1.csv, row.names = FALSE)","YOUR NAME" +"1474477686235","H <-read.table(~/.rstudio-desktop/history_database, sep=:, fill=T, stringsAsFactors=F)","YOUR NAME"