I have data of 6 variables in excel (each variable in one column). But the length of each column is different.
I want to plot this data by par(mfrow=c(3,2))
to divide the plot in 6 parts and plot all plots together ,but using the name of variable for each graph like the pic I attached.
The variable names are: MKT SMB HML RMW CMA MOM
And the plot code is
MEplot(S,main = "variable name",cex.main=2,bty="n",cex.axis = 1.3,xlab = "", ylab = "")
I can plot the same photo, but I have to repeat code 6 times because the column name is different, so each time I have to specified the range of column and repeat the code. Could you please help? How can I plot this graph with one code using for loop?