我有一個數據框,顯示年份的出版物數量。但我只對會議和期刊出版物感興趣。我想總結其他類型的所有其他類別。數據幀的按類別使用R的總變量條件
例子:
year type n
1994 Conference 2
1994 Journal 3
1995 Conference 10
1995 Editorship 3
1996 Conference 20
1996 Editorship 2
1996 Books and Thesis 3
其結果將是:
year type n
1994 Conference 2
1994 Journal 3
1995 Conference 10
1995 Other 3
1996 Conference 20
1996 Other 5
https://stackoverflow.com/questions/1660124/how-to-sum的可能的複製-a-variable-by-group – akrun
你並沒有總結他人 - 因爲有兩個其他人。你只是想將編輯,書籍和論文重新命名爲他人。或者你想總結髮布的所有內容 –