問題タブ [rr]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
1 に答える
157 参照

regex - 文字ベクトルの長さが1より大きいgreplを使用するには?

dummy variable (c)と に変換b >= xする条件を作成しようとしてc = 1b < xますc = 0

次の場合の出力例x = 3:

上記のifelse()関数を使用してみましたが、grepl長さ 1 の文字しか使用できません。

grepl(b[b <= 3],df$b) : (引数 'pattern' の長さは > 1 で、最初の要素のみが使用されます)