This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import breeze.linalg._ | |
val cv = new DenseMatrix(2,0,Array[Double]()) | |
val rv = new DenseMatrix(0,2,Array[Double]()) | |
rv * cv | |
// res1: breeze.linalg.DenseMatrix[Double] = | |
cv * rv | |
// res0: breeze.linalg.DenseMatrix[Double] = | |
// 0.0 0.0 | |
// 0.0 0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## mdires.R | |
## 1. | |
library(ebimetagenomics) | |
ps = getProjectSummary("SRP066323") | |
samples = projectSamples(ps) | |
otu1 = getSampleOtu(ps,samples[1]) | |
otu2 = getSampleOtu(ps,samples[2]) | |
## 2. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# sads-test.R | |
package=function(somepackage) | |
{ | |
cpackage <- as.character(substitute(somepackage)) | |
if(!require(cpackage,character.only=TRUE)){ | |
install.packages(cpackage) | |
library(cpackage,character.only=TRUE) | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#> b=breezeInterpreter() | |
#> b%~%'import breeze.stats.distributions._' | |
#ScalaInterpreterReference... engine: javax.script.ScriptEngine | |
#> b%~%'Poisson(10).sample(20).toArray' | |
# [1] 10 12 15 11 11 8 12 6 10 10 11 11 17 5 13 8 7 15 11 11 | |
#> summary(b%~%'Gamma(3,2).sample(10000).toArray') | |
# Min. 1st Qu. Median Mean 3rd Qu. Max. | |
# 0.2244 3.4770 5.3070 5.9590 7.7770 25.8700 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package=function(somepackage) | |
{ | |
cpackage <- as.character(substitute(somepackage)) | |
if(!require(cpackage,character.only=TRUE)){ | |
install.packages(cpackage) | |
library(cpackage,character.only=TRUE) | |
} | |
} |