[R] replace certain elements in data frame

2011-04-23 Thread Yosub Jung
Hello, I have a data frame with 2 columns: year and code. In code column, I want to replace elements that are not "8210", "8310", or "9190" with "others". -- Sincerely, Yosub Jung. [[alternative HTML version deleted]] ___

[R] counting values in multiple columns

2011-04-19 Thread Yosub Jung
:1019838242824382609170 I want to count how many times each code appears in total and how many times it appears in each year. I don't think I can use table function. What can I do? Sincerely, Yosub Jung. [[alternative HTML version deleted]] __ R-h