Function to produce density curves comparing the distribution of a variable across different samples.
| 1 2 3 4 | 
| items | a character vector of items used to index dat | 
| var_name | a string contianing the name of the variable to be described | 
| dat | a matrix or dataframe containing describing each item in the population on the dimensions to be plotted | 
| G | a list describing each group of items | 
| xlab | string containing x axis label | 
| ylab | string containing y axis label | 
| selected_col | colour for plotting selected items | 
| nonselected_col | colour for plotting nonselected items | 
| na.rm | logical denoting whether to remove missing values from density calculation | 
| include_nonsampled | logical denoting whether to plot nonsampled items | 
| xlim | an xlim vector | 
| textsize | cex value for descriptive text (default=1) | 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.