Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
NAR動物園シリーズで値をゼロに置き換えるにはどうすればよいですか? 私はna.locfandについて読んできましたna.omit が、私が必要としているものはどれもないと思います。
NA
na.locf
na.omit
ありがとう。
Zooシリーズには詳しくありませんが、これはベクトルで行う方法です。これはうまくいくはずです。
x = c(NA,1,2,3) x[ is.na(x) ] <- 0 print (x)
を使用しna.fillます。z動物園シリーズの場合:
na.fill
z
na.fill(z, fill = 0)