A very useful function: eval parse text paste


A very useful function: eval parse text paste

When creating evolutions models and simulations in R, code can quickly become messy and slow. Functions that require fewer lines of code can speed up your program, and make it easier to follow what is happening. There are also often variables, such as number of alleles or loci, that need to be manipulated easily, without the requirement of changing multiple lines of code. This is where eval parse text paste becomes useful. The four stages of this can be understood by considering each of them individually, in reverse order.

paste simply converts something into text, and can combine several pieces of text together. For example. In the code below, we can paste the generation number of a program i next to the word generation. ,sep="" means there is no gap between the two pieces we are pasting together. We could make…

View original post 796 more words