-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRandomCode5.R
More file actions
36 lines (21 loc) · 748 Bytes
/
Copy pathRandomCode5.R
File metadata and controls
36 lines (21 loc) · 748 Bytes
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
add2 <- function(x,y) {
x + y
}
above <- function(x,y = 10) {
use <- x > y
x[use]
}
colsmean <- function(y, removeNA = TRUE) {
nc <- ncol(y)
oauth_endpoints("github")
myapp <- oauth_app("github", "your-20-digits", secret="your-very-long-hex-number")
github_token <- oauth2.0_token(oauth_endpoints("github"), myapp)
req <- GET("https://api.github.com/users/jtleek/repos", config(token = github_token))
library(jsonlite)
View(json2)
means <- numeric(nc)
for(i in 1:nc) {
means[i] <- mean(y[,i])
}
means
}