Minimal reproducible example consists of the following items:
A minimal dataset which is necessary to reproduce the error.
The minimal runnable code necessary to reproduce the error, which can be run on the given dataset.
If there’s random processes, a seed (set by set.seed()) for reproducibility
The necessary information on the used packages, R version and system it’s run on.
You can also look for the examples in the help files of the used function it’s often helpful. Therefore in general all the codes given can fulfill the requirements of a minimal reproducible example: minimal code is provided, data is provided and everything in runnable.
To quickly create a dput of your data just copy the data (only a line or two) to clipboard and run the following command in R:
For Excel:
dput(read.table("clipboard",sep="\t",header=TRUE))
For txt file:
dput(read.table("clipboard",sep="",header=TRUE))
If your data is in the clipboard of course then you can also change the sep.