There are similar questions to this one available but none is addressing this question like [Changing column names of a data frame in R](https://stackoverflow.com/questions/6081439/changing-column-names-of-a-data-frame-in-r)

actually, I have a matrix like below 

```
M <- data.frame(matrix(rnorm(5),100,50))

```

I was trying to make a name list for each column of it as follows:

```
colnames(M) <- paste( LETTERS, "col", sep ="")

```

this would work if the number of columns are equal or less than the number of letters. what if I want to 

1- repeat the letters after it riches the end 

2- randomly generate names for each column with a specific word but random letters 
like Ccol GFcol Mercol as many columns or as many rows as it has ?