generate_tree <- function(parent_id, max_width, max_depth) { sibling_num <- min(sample(seq_len(max_width), 1), 9) depth_num <- sample(seq_len(max_depth)-1, sibling_num, replace = TRUE) child_ids <- paste0(parent_id, seq_len(sibling_num)) result <- data.frame(parent=parent_id, child=child_ids, stringsAsFactors = FALSE) for(i in seq_len(sibling_num)) { if(depth_num[i] != 0) { child_tree <- generate_
この文章は、pipeR 0.5 README を適当に翻訳したものです。 https://github.com/renkun-ken/pipeR/tree/0.5 pipeR の最新バージョン(v0.6)の翻訳は下記にあります。 https://github.com/renkun-ken/pipeR/blob/master/README.ja.md pipeR は、パイプ演算子(%>>%)およびパイプ関数(Pipe())を提供する R パッケージです。 シンタックスとして、 関数の最初の引数にパイプ 表現式中のドット(.)にパイプ ラムダ式でパイプ 副作用ありパイプ 代入ありパイプ をサポートしています。 これらのシンタックスは、パイプラインの可読性を上げるためにデザインされています。 インストール CRAN からインストール(v0.4-2):
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く