項目 | サンプル | |||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
整数に型変換したい(double -> int) |
|
|||||||||||||||||||||||||||
整数に型変換したい(string -> int) |
|
|||||||||||||||||||||||||||
小数に型変換したい(int -> double) |
|
|||||||||||||||||||||||||||
小数に型変換したい(string -> double) |
|
|||||||||||||||||||||||||||
文字列に型変換したい(int -> string) |
|
|||||||||||||||||||||||||||
文字列に型変換したい(double -> string) |
|
|||||||||||||||||||||||||||
数列に整数をかけたい |
|
|||||||||||||||||||||||||||
数列に小数をかけたい |
|
|||||||||||||||||||||||||||
数列に数列をかけ合わせたい |
|
|||||||||||||||||||||||||||
2つの文字列をつなげたい |
|
|||||||||||||||||||||||||||
文字列を区切り文字(,)で分けたい |
|
|
=> |
|
table("C1") = {1.0, 2.4, 3.5, -4.4, -5.5};
//
result = as.integer(table);
|
=> |
|
table("C1") = {"1", "+2.4", "3.5", "-4.4", "0.55e01", "abc"};
//
result = as.integer(table);
|
=> |
|
table("C1") = {1, 2, 3, -4};
//
result = as.real(table);
result = table*1.0;
|
=> |
|
table("C1") = {"1", "+2.4", "3.5", "-4.4", "0.55e01", "abc"};
//
result = as.real(table);
|
=> |
|
table("C1") = {1, 2, 3, -4};
//
result = as.string(table);
|
=> |
|
table("C1") = {1.0, 2.4, 3.5, -4.4, -5.5};
//
result = as.string(table);
|
=> |
|
c1("C1i") = {1:5};
c2("C2d") = {1.0, 2.4, 3.5, -4.4, -5.5};
table = cbind(c1,c2);
//
result = table*2;
|
=> |
|
c1("C1i") = {1:5};
c2("C2d") = {1.0, 2.4, 3.5, -4.4, -5.5};
table = cbind(c1,c2);
//
result = table*2.0;
| x |
|
=> |
|
c1("C1i") = {1:5};
c2("C2d") = {1.0, 2.4, 3.5, -4.4, -5.5};
//
result("C3d") = c1 * c2;
|
=> |
|
N = 4;
c1("C1") = format_str("a%02d", {1:N});
c2("C2") = format_str("b%02d", {1:N});
table = cbind(c1,c2);
//
result("C3") = paste(table("C1"),"-",table("C2"));
|
=> |
|
dtfmt1="YYYY/MM/DD hh:mm:ss";
dtfmt2="yyyy/MM/dd HH:mm:ss";
N = 4;
sN = as.string(N);
// 現時刻
dts("now") = now(dtfmt1);
// N 秒後の時刻
c1 = {};
for (i in {1:N}) {
c1 = rbind(c1, date_proc_offset(dts,dtfmt2,i,"秒数"));
}
//
r = split.str(c1," ","");
result("YYYY/MM/DD","hh:mm:ss") = cbind(r(1),r(2));