Quite often when trying to get help people ask for reproducible examples. Sometimes sharing a text file is not possible so I was wondering if there is a function which outputs the copy/paste command to recreate a dataframe or matrix with my data in r.
For example if I have this matrix(3,3,3)
matrix I would like the output of the function to be something like this:
a <- data.frame(
1 = c(3, 3, 3),
2 = c(3, 3, 3),
3 = c(3, 3, 3)
)