D Numeric Library with R Syntax
Add next line to your dub.json
"dnumeric": "~>0.6.1"or dub.sdl
dependency "dnumeric" version="~>0.6.1"
- Caution : After
0.6.0, there are lots of changes.
# R
a = matrix(c(1,2,3,4), 2, 2, T)// DNumeric
import dnum.matrix;
auto a = matrix([1,2,3,4], 2, 2, true);# R
a = matrix(1:4, 2, 2, T)
print(a)// DNumeric
import dnum.matrix;
import std.stdio : writeln;
auto a = matrix([1,2,3,4], 2, 2, true);
a.writeln;