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.
Rには、1行のテーブルがあります。それをベクトルに変換するにはどうすればよいですか?
具体的には、テーブルは次のとおりです。
0 1 2 3 4 21 35 46 62 36
ブラケット記法を試してみましたが、役に立ちませんでした!
またはあなたが使用することができますas.vector(x)
as.vector(x)
それはすでにベクトルです。
tbl <- table(rpois(100, 10)) tbl[1] tbl[2:5] tbl[tbl > 10]
テーブルの名前が x の場合は、c(x) を使用します。