統計解析R たぶんpart3くらい (587レス)
統計解析R たぶんpart3くらい http://mevius.5ch.net/test/read.cgi/tech/1340339592/
上
下
前次
1-
新
通常表示
512バイト分割
レス栞
抽出解除
必死チェッカー(本家)
(べ)
自ID
レス栞
あぼーん
リロード規制
です。10分ほどで解除するので、
他のブラウザ
へ避難してください。
313: デフォルトの名無しさん [] 2019/11/01(金) 23:50:53.61 ID:JL+xq15p [JavaScript const in R](https://colinfay.me/js-const-r/) やってみる ``` {js} $ (window).on ('load', function () { const out = new Map (); out.hello = 'world'; $ ('#const-here').html (JSON.stringify (out)); }); ``` <pre id='const-here'></pre> ``` {r} with (list (), { your_name = function (x) deparse (substitute (x)); out = new.env (); lockBinding (your_name (out), environment ()); tryCatch ({ out $ hello = 'world'; }, error = function (ex) { assign ('hello', toString (ex), env = out); }); jsonlite::toJSON (as.list (out), auto = T); }); ``` ``` {Rcpp} #include <Rcpp.h> // [[Rcpp::export]] void kossori (Rcpp::List out, Rcpp::String key, Rcpp::RObject val) { out [key] = val; } ``` ``` {r} with (list (), { your_name = function (x) deparse (substitute (x)); out = list (hello = ''); lockBinding (your_name (out), environment ()); tryCatch ({ out $ hello = 'world'; }, error = function (ex) { kossori (out, 'hello', toString (ex)); }); jsonlite::toJSON (out, auto = T); }); ``` 仕様上は、`env`に対する`$`でのセッターは、たとえ`lockBinding`が 施されていても無問題と思うが、実際は、弾くようにしている。 何か理由があるのかな? http://mevius.5ch.net/test/read.cgi/tech/1340339592/313
メモ帳
(0/65535文字)
上
下
前次
1-
新
書
関
写
板
覧
索
設
栞
歴
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
0.030s