nutterb / imprecise Goto Github PK
View Code? Open in Web Editor NEWMeasurement Precision and Significant Figures
License: MIT License
Measurement Precision and Significant Figures
License: MIT License
as_measured
numeric
or double
value.label
and units
arguments.precision
, label
, and units
that has class c("measured", "[orig_class]")
is.measured
is_measured
FALSE
with no warnings if applied to a non-numeric, non-double vector.as_calculated
numeric
or double
value.label
and units
arguments.precision
, label
, and units
that has class c("calculated", "measured", "[orig_class]")
is.measured
is_calculated
FALSE
with no warnings if applied to a non-numeric, non-double vector.set_precision
measured
but not of calculated
(precision may only be set on measurements)precision
attribute.measured
measured
get_precision
precision
attribute of a measured
vector.measured
but is numericInf
if the vector is numeric but not measured
set_label
label
attribute of a vector.get_label
label
attribute of a vector. If there is no label
attribute, returns the variable name as a string.set_units
units
attribute of a vectorget_units
units
attribute of a vector. If there is no units
attributes, an empty string is returned.set_sigfig
sigfig
attribute of a calculated
vectorcalculated
calculated
get_sigfig
sigfig
attribute of a calculated
vector.calculated
and is numeric.Inf
if the vector is numeric but not calculated
print.measured
print.calculated
Methods for
measured
or calculated
calculated
sigfig
attributeIf m
is a measured
object, m[2]
subsetting loses all of the attributes. There needs to be a method that gets the subset values of the vector and the precision
and sigfig
attributes to keep it all consistent.
The assignment methods seem to work okay. although it would be nice to have a process in set_precision
and set_sigfig
so that if I use set_precision(m[3], 2)
, the precision is set for the second element and everything else is preserved.
checkmate
style functionscheck_measured
test_measured
assert_measured
expect_measured
check_calculated
test_calculated
assert_calculated
expect_calculated
These will allow values to be printed rounded to the correct form when printed in a data frame.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.