私はこのような何かを探していますSelect only the first rows for each unique value of a column in R しかし、IDごとの年の最初の値を含むすべての行を保持する必要があります。 itherの言葉では、最初の年のデータセットを個々のIDでサブセット化する必要があります。 IDは最初に 年を1,2または3年にすることができ、最初の年のすべての
Rでsqldfを使用すると、2つのコマンドが異なる結果になるのはなぜですか? sqldf('select species,
avg([Petal.Width]/[Petal.Length])
as petalratio from iris group by species')
sqldf('select species,
([Petal.Width]/[Petal