Quine is a self-reproducing function or a computer program that will output its source source or itself. Terms used are for these programs are also self-replicating programs, self-reproducing programs or self-copying programs (courtesy of wikipedia).
Many programming languages have been known to do this, for example in Python, a simple Quine would look like this:
Similar to Python, quine can be written in R as well. Simple example would be:
Example consists of two blocks; the first block contains the function that will perform the process of replication
And the second part contains the code that will be outputted.
When we run the command, the script will return itself, revealing the complete input command.
Word quine primarily comes from the biology, precisely from the self-replication, and it consists of two parts, first part is the code that performs the replication and the second is the data that contains all the code, script, instructions to perform the replication process.
The value of variable a can hold basically any text or any additional information, since the function in R is using string manipulation functions sub and deparse.