View source: R/prepare_for_plotting.R
make_new_data | R Documentation |
Generates a new dataset to feed into the plotting functions (plot_transfers
)
make_new_data( from_part, to_part, fixed_values, dataset, units = NULL, specified_units = NULL, comp_labels, lower_quantile = 0.05, upper_quantile = 0.95, granularity = 10000 )
from_part |
Should be an element of |
to_part |
Should be an element of |
fixed_values |
If |
dataset |
Dataset to use to inform range of data used (should be dataset model was developed on) |
units |
What should the units of the compositional variables be in any output? Currently available are "unitless" (where working in terms of proportions), "hr/day", "hr/wk", "min/day", "min/wk" and "specified", in which case the |
specified_units |
If units are being specified via the composition sum, this is where it is done. It should be a vector where the first argument is a string describing the units, and the second argument is the expected sum of a composition e.g. |
comp_labels |
The labels of the compositional columns. |
lower_quantile |
If set, this gives the lower limit of plotting (as a quantile for both variables of interest). In practice, the current behaviour is to calculate the range of both variables between the upper and lower quantile, and use the narrower one. |
upper_quantile |
If set, this gives the upper limit of plotting (as a quantile for both variables of interest). |
granularity |
Does not usually require setting. If set, gives the number of points plotted on the graph. If it is too low, the plot will contain gaps. If it is too high, plotting will be slow. |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.