git ではファイル単位の管理なので、空のディレクトリは管理対象にならない。空のディレクトリのなかに .gitkeep を作っておくとよいらしい。
$ find . -type d -empty -not -path './.git*' -exec touch {}\/.gitkeep \;
.gitignore でドットファイルを無視している場合は .gitkeep は無視しないようにする。
$ vi .gitignore
*~
.*
source("http://bioconductor.org/biocLite.R") | |
biocLite("HELP") | |
library("HELP") | |
calcTm("ATGCATGC") |
<?xml version="1.0"?> | |
<root> | |
<appdef> | |
<appname>RSTUDIO</appname> | |
<equal>org.rstudio.RStudio</equal> | |
</appdef> | |
<item> | |
<name>RSTUDIO</name> | |
<list> | |
<item> |
library(GEOquery) | |
gse <- getGEO("GSE20861") | |
a <- t(sapply(sampleNames(gse[[1]]), function(x) { gsm <- getGEO(x); gsm@header$series_id} )) | |
a | |
[,1] [,2] | |
GSM521700 "GSE20859" "GSE20861" | |
GSM521701 "GSE20859" "GSE20861" | |
GSM521702 "GSE20859" "GSE20861" | |
GSM521703 "GSE20859" "GSE20861" | |
GSM521704 "GSE20859" "GSE20861" |
method.name <- "test" | |
setGeneric(method.name, function(object) standardGeneric(method.name)) |
as.nyan <- function(x) { cat("ペロペロ(^ω^)\n") } |
source("http://bioconductor.org/biocLite.R") | |
options("BioC_mirror" = "http://bioconductor.jp/") | |
biocLite("GEOquery") |
.First <- function() { | |
# sources | |
source("http://bioconductor.org/biocLite.R") | |
# options | |
options( | |
repos = c(CRAN = "http://cran.md.tsukuba.ac.jp/"), | |
BioC_mirror = "http://bioconductor.jp/", | |
show.signif.stars = FALSE, | |
papersize = "a4", |
> paste("A", 1:10, sep = "") | |
[1] "A1" "A2" "A3" "A4" "A5" "A6" "A7" "A8" "A9" "A10" | |
> nchar(paste("A", 1:10, sep = "")) | |
[1] 2 2 2 2 2 2 2 2 2 3 | |
> factor(paste("A", 1:10, sep = "")) | |
[1] A1 A2 A3 A4 A5 A6 A7 A8 A9 A10 | |
Levels: A1 A10 A2 A3 A4 A5 A6 A7 A8 A9 | |
> nchar(factor(paste("A", 1:10, sep = ""))) | |
[1] 1 1 1 1 1 1 1 1 2 1 | |
> nchar(as.character(factor(paste("A", 1:10, sep = "")))) |
git ではファイル単位の管理なので、空のディレクトリは管理対象にならない。空のディレクトリのなかに .gitkeep を作っておくとよいらしい。
$ find . -type d -empty -not -path './.git*' -exec touch {}\/.gitkeep \;
.gitignore でドットファイルを無視している場合は .gitkeep は無視しないようにする。
$ vi .gitignore
*~
.*
x.num <- 10 | |
x <- seq(0.1, 2.5, length = x.num) | |
m <- 100000 | |
u <- runif(m) | |
# integration by substitution | |
cdf <- numeric(x.num) | |
for ( i in 1:x.num ) { | |
g <- x[i] * exp( -(u * x[i])^2 / 2) | |
cdf[i] <- mean(g) / sqrt(2 * pi) + 0.5 |