.Rhistory 2.13 KB
Newer Older
Armin Rauschenberger's avatar
Armin Rauschenberger committed
1
2
3
4
40/5
8+8+1
#pkg <- "E:/colasso/package/colasso"
setwd(pkg)
Armin Rauschenberger's avatar
Armin Rauschenberger committed
5
6
7
8
9
10
11
12
set.seed(1)
#toydata <- NULL
#save(toydata,file=file.path("C:/Users/armin.rauschenberger/Desktop/package/colasso/data/toydata.R"))
#--- compile package -----------------------------------------------------------
rm(list=ls())
name <- "colasso"
#load("D:/colasso/package/toydata.RData")
pkg <- "C:/Users/armin.rauschenberger/Desktop/package/colasso"
Armin Rauschenberger's avatar
Armin Rauschenberger committed
13
14
15
16
17
system("git remote set-url origin https://rauschenberger:Merkel0517@github.com/rauschenberger/colasso.git")
getwd()
system("git init")
system("git add .")
getwd()
Armin Rauschenberger's avatar
Armin Rauschenberger committed
18
19
20
21
22
23
set.seed(1)
#toydata <- NULL
#save(toydata,file=file.path("C:/Users/armin.rauschenberger/Desktop/package/colasso/data/toydata.R"))
#--- compile package -----------------------------------------------------------
rm(list=ls())
name <- "colasso"
Armin Rauschenberger's avatar
Armin Rauschenberger committed
24
#load("D:/colasso/package/toydata.RData")
Armin Rauschenberger's avatar
Armin Rauschenberger committed
25
26
pkg <- "C:/Users/armin.rauschenberger/Desktop/package/colasso"
setwd(dir=pkg)
Armin Rauschenberger's avatar
Armin Rauschenberger committed
27
#pkg <- "E:/colasso/package/colasso"
Armin Rauschenberger's avatar
Armin Rauschenberger committed
28
29
30
setwd(pkg)
system("git remote set-url origin https://rauschenberger:Merkel0517@github.com/rauschenberger/colasso.git")
system("git remote -v")
Armin Rauschenberger's avatar
Armin Rauschenberger committed
31
system("git remote -v")
Armin Rauschenberger's avatar
Armin Rauschenberger committed
32
33
34
35
36
37
38
39
40
41
system("git add --all")
system("git commit -m \"automation\"")
system("git push origin master") # GitHub
#pkg <- "E:/colasso/package/colasso"
setwd(pkg)
system("git remote set-url origin https://rauschenberger:Merkel0517@github.com/rauschenberger/colasso.git")
system("git remote -v")
system("git add --all")
system("git commit -m \"automation\"")
system("git push origin master") # GitHub
Armin Rauschenberger's avatar
Armin Rauschenberger committed
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
colasso::colasso_compare
devtools::install_github("rauschenberger/colasso")
n <- 100
p <- 300
Sigma <- matrix(data=0.05,nrow=p,ncol=p)
X <- MASS::mvrnorm(n=n,mu=rep(0,p),Sigma=Sigma)
# X <- matrix(stats::rnorm(n*p),nrow=n,ncol=p)
beta <- rep(1,times=p)
beta[stats::rbinom(n=p,size=1,prob=0.95)==1] <- 0
mu <- X %*% beta
Y <- replicate(n=10,expr=stats::rnorm(n=n,mean=mu,sd=10))
plot(mu,rowMeans(Y))
cor <- cor(Y)
cor[row(cor)>=col(cor)] <- NA
median(cor,na.rm=TRUE)
y <- scale(Y[,1])
ym <- scale(rowMeans(Y[,-1]))
Y <- scale(Y)
# consider scaling of responses!
colasso:::colasso_compare(y=y,Y=Y,X=X)
devtools::install_github("rauschenberger/colasso")