- COPYRIGHT AND LICENSE
Chart::GGPlot::Util - Utility functions
remove_missing($df, :$na_rm=false, :$vars=$df->names, :$name='', :$finite=false)
Remove all non-complete rows, with a warning if
$na_rm is false. For those stats which require complete data, missing values will be automatically removed with a warning. If
$na_rm is true, the warning will be suppressed.
Data frame object.
If true, will suppres warning message.
An arrayref of variables to check for missings in.
Optional function name to improve error message.
If true, will also remove non-finite values.
$x is a coderef, call it with
@args, otherwise returns
Given an array of functions, for those with "color" in names, create alias function with "colour" in name, and return an array of all aliased and non-aliased.
This can be used in a packge like
our @EXPORT_OK = alias_color_functions(__PACKAGE__, @function_names);
resolution(Piddle1D $x, $zero=true)
The resolution is the smallest non-zero distance between adjacent values.
$x has a single value, or an interger vector which can be assumed to represent a discrete value, then the resolution is 1. If
$x is a float vector, the resolution is the minimal distance between ajacent values in sorted
$zero is true, 0 would be inserted into the vector, if it's does not already in the vector, when computing the resolution.
Can be used in
aes() quosure values as a flag to Chart::GGPlot to indicate that you want to use calculated aesthetics produced by the statistic.
Note that this function has same name as Perl's CORE
Stephan Loyd <firstname.lastname@example.org>
This software is copyright (c) 2019 by Stephan Loyd.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.