データのソート (並べ替え) ベクトルのソートには sort 関数。あと、現在の順序から逆にするrev関数もある データフレームのソートには order 関数。 デフォルトは昇順 (小さい順)。マイナスをつけると降順 # データセットmtcarsを使う。 data(mtcars) mpg <- mtcars$mpg # ベクトルの並べ替え # 元の順序 mpg # 逆順 rev(mpg) # 昇順で並べ替え sort(mpg) # 元の順序で小さい順の添え字を調べるのがorder。小さい順のランキング order(mpg) order(-mpg) # 降順 mpg[order(mpg)] # sortを使ったときと同じ # データフレームの並べ替え # データフレームmtcarsをmpgで並べ替え head(mtcars) newdata <- mtcars[order(mtcars$mp
Getting started Introduction Quick Start Running The Quick Start On Heroku SpringSource Tool Suite Database.com Terminology Getting Support Persistence JPA Provider Overview Configuration Standard JPA Annotations Custom Database.com Annotations Creating, Updating, and Deleting Data Transactions Querying with JPQL Querying with SOQL Database.com Data Types Java to Database.com Data Types JPA 2.0 Sp
Legal notices Conditions of use Android is a trademark of Google inc. / © 2014 - 2024 Genymobile. All Rights Reserved Created with in Paris We are using cookies to provide statistics that help us give you the best experience of our site. By continuing to use the site you are agreeing to our use of cookies. You can find our Privacy Statement.
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く