Fixing dimnames(x) of xts objects in R via loop
问题 Assume I have a list of variables (class:xts) in .GlobalEnv identified as follows: ABC.xyz DEF.xyz GHI.xyz These variables are generated via a function. At present, the "column headers" in each variable are nonsense from the output of the original function. I would like to rename the columns in each of these variables to the first three letters of the variable name, followed by a generic suffix; say: ".XXX" I have tried to write a quick loop that uses the function dimnames(x) to achieve this