axjack's blog

### axjack is said to be an abbreviation for An eXistent JApanese Cool Klutz ###

2020-07-26から1日間の記事一覧

Rで文字列→数値に変換する際、NAs introduced by coercionが出て困った時のtips

R

次のような変換を考えます。 "1名" → 1 "2名" → 2 "なし" → 0 "調査中" → NA これをdplyrのパイプの中でmutate( case_when(...) )を駆使して実行していたのですが、エラーとなってしまいました。 データフレーム(見栄えのためtibble) mydf <- tibble( 同居…

axjack is said to be an abbreviation for An eXistent JApanese Cool Klutz.