-
Notifications
You must be signed in to change notification settings - Fork 41
/
.Rhistory
76 lines (76 loc) · 2.3 KB
/
.Rhistory
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
download.file(fileUrl, destfile = "./cameras.csv", method = "curl")
?download.file
install.packages("ROAuth")
library("ROAuth")
?oauth_app
install.packages("httr")
library("httr")
?oauth_app
myapp <- oauth_app("CourseraCleaningWeek2", key="40d230a9836a01c39907",secret="813003980f373ee44048811806e096dee1b5be8a")
sig <- sign_oauth1.0(myapp, )
oauth_endpoints("github")
myapp <- oauth_app("CourseraCleaningWeek2", key="40d230a9836a01c39907",secret="813003980f373ee44048811806e096dee1b5be8a")
github_token <- oauth2.0_token(oauth_endpoints("github"), myapp)
install.packages("httpuv")
library("httpuv")
github_token <- oauth2.0_token(oauth_endpoints("github"), myapp)
req <- GET("https://api.github.com/rate_limit", config(token = github_token))
stop_for_status(req)
content(req)
install.packages("jsonlite")
library("jsonlite")
content(req)
github_token
req <- GET("https://api.github.com/users/jtleek/repos", config(token = github_token))
stop_for_status(req)
content(req)
x <- content(req)
x?datasharing
class(x)
length(x)
x[1]
x[1]$git_url
x[[1]$git_url
x[[1]]$git_url
x[[2]]$git_url
x[[2]]$git_url
for (i in 1:length(x)) {print(x[[i]]$git_url)}
x[[4]]
setwd("~/GitHub/R_ProgrammingAssignment2_Peer")
source('~/GitHub/R_ProgrammingAssignment2_Peer/cachematrix.R')
myX <- matrix(c(1, 2, 3, 4), nrow=2, ncol=2)
myX
solve(myX)
my_X <- solve(myX)
myX %*% my_X
makeCacheMatrix()
y <- cacheSolve(myX)
source('~/GitHub/R_ProgrammingAssignment2_Peer/cachematrix.R')
makeCacheMatrix()
y <- cacheSolve(myX)
x$getInverse(myX)
source('~/GitHub/R_ProgrammingAssignment2_Peer/makeVector.R')
source('~/GitHub/R_ProgrammingAssignment2_Peer/cachemean.R')
x <- c(1, 2, 3, 4)
cachemean(x)
v <- makeVector(c(1, 2, 3, 4))
cachemean(v)
source('~/.active-rstudio-document')
M <- matrix(c(1, 2, 3, 4), nrow=2, ncol=2)
cacheMatrix <- makeCacheMatrix(M)
cacheSolve(cacheMatrix)
cacheMatrix$get
cacheMatrix$get()
cacheMatrix$setInverse()
w <- cacheMatrix$setInverse()
w(M)
source('~/GitHub/R_ProgrammingAssignment2_Peer/cachematrix.R')
M <- matrix(c(1, 2, 3, 4), nrow=2, ncol=2)
cacheMatrix <- makeCacheMatrix(M)
cacheSolve(cacheMatrix)
source('~/GitHub/R_ProgrammingAssignment2_Peer/cachematrix.R')
cacheMatrix <- makeCacheMatrix(M)
cacheSolve(cacheMatrix)
source('~/GitHub/R_ProgrammingAssignment2_Peer/cachematrix.R')
cacheMatrix <- makeCacheMatrix(M)
cacheSolve(cacheMatrix)