Saturday, 15 September 2012

R Plyr Rename multiple columns in list of dataframes -


Only search for Plyr Rows of tons have saved great. But I have a problem of changing another name that I can not understand.

I have a list that has many data frames (this is a subset because actually there are 108 in the actual list).

& gt; Str (mydata) 4 $ C11 list: 'data.frame': 8 obs. 3 variables: .. $ X: Factor w / 8 level "n> = 1", "n> = 2", ..: 1 2 3 4 5 6 7 8 .. $ n.ENSEMBLE. COVERAGE: Num [1: 8] 1 1 1 1 0.96 0.91 0.74 0.5 .. $ N. Encelable. Recall: Number [1: 8] 0.88 0.88 0.88 0.88 0.9 0.91 0.94 0.95 $ C12: 'data.frame': 8 Objects 3 variables: .. $ X: Factor w / 8 level "n> = 1", "n> = 2", ..: 1 2 3 4 5 6 7 8 .. $ n.ENSEMBLE. COVERAGE: Num [1: 8] 1 1 1 1 0.96 0.8 9 0.86 0.72 .. $ n.ENSEMBLE.RECALL: num [1: 8] 0.91 0.91 0.91 0.91 0.93 0.96 0.97 0.98 $ C13: 'data.frame': 8 Obs 3 variables: .. $ X: Factor w / 8 level "n> = 1", "n> = 2", ..: 1 2 3 4 5 6 7 8 .. $ n.ENSEMBLE .COVERAGE: Number [1: 8] 1 1 1 1 0.94 0.7 9 0.65 0.46. $ N.ENSEMBLE.RECALL: Number [1: 8] 0.85 0.85 0.85 0.85 0.88 0.9 0.92 0.91 $ C14: 'data.frame': 8 obs 3 variables: .. $ X: Factor w / 8th And "n> = 1", "n> = 2", ..: 1 2 3 4 5 6 7 8 .. $ n.ENSEMBLE.COVERAGE: Num [1: 8] 1 1 1 1 0.98 0.95 0.88 0.74 .. $ n.ENSEMBLE.RECALL: num [1: 8] 0.91 0.91 0.91 0.91 0.92 0.94 0.95 0.98

Do I really want to get every data frame That's to join the columns with the title of dataframe. Therefore the columns in the example would be:

C11.X , C11.n.ENSEMBLE.COVERAGE & amp; C11.n.ENSEMBLE.RECALL

C12.X , C12.n.ENSEMBLE.COVERAGE & amp; C12.n.ENSEMBLE.RECALL

C13.X , C13.n.ENSEMBLE.COVERAGE & amp; C13.n.ENSEMBLE.RECALL

C14.X , C14.n.ENSEMBLE.COVERAGE & amp; C14.n.ENSEMBLE.RECALL

Can someone suggest a brilliant approach to change the name of this column?

No comments:

Post a Comment