Comments (5)
Fixed now. 10 * t or t * 10 returns "t * 10" as units. Same for other powers of ten except for a thousand tonnes, where the convent "1000 t" is used instead.
from flcore.
That was quick. What is the philosophy behind these changes in units? Why would I want t * 10 as a unit? Would it not be better to restrict to well-known units like g, kg, tonnes, kilotonnes and megatonnes? In the example I gave I would have stuck with tonnes and just multiply the value by 10.
Also, do I really want to change the unit when I multiply the value by a numeric factor? It is a bit strange that multiplying by 2 * 5 is doing something different from multiplying by 10.
from flcore.
The logic is mostly applied to a product of two FLQuants, one with an unit like 't' or 'kg', multiplied by one that consists of thousands of individuals, '1000'. This is not of course a real unit but a convention we follow for example for numbers of individuals in thousands. In this case 'kg' * '1000' leads to 't'.
This was then applied to a product of an FLQuant with units and a numeric value that matched one of those 'units' used for numbers. So 'FLQuant(20, units='kg') * 1000work this way, but not
FLQuant(20, units='kg') * 6`.
Maybe assuming the numeric value represents individuals, if it is a power of ten, is too much to do, and could limit this behaviour to operations with two FLQuant objects.
from flcore.
Yes, I think limiting the change of units to the operation between two FLQuants would be good. I think operation with a number should just change the numeric values.
from flcore.
uom() is not called anymore in operations between FLQuant and numeric, so units remain as those in the FLQuant object. 0f21520
from flcore.
Related Issues (20)
- no helpfile for qapply
- lattice plotting is erroring
- setting defaults for startf and endf HOT 1
- Option to include fitted models (GLM, GAM) into a FLSR-object HOT 3
- as.FLQuant(data.frame) should only alter the dimanmes added in dimnames= HOT 3
- Add R common scientific format for numbers to uomTable
- MAP missing Rd pages and how to build them with roxygen
- FLSAM - redirect for SAM is incorrect HOT 2
- Conversion of data.frame to FLStock does not name first dimension 'age' HOT 2
- Consistency between [email protected] and FLBiol@spwn HOT 7
- Extend FLStock class to include refpts and SRR HOT 2
- cv in invALK to be a vector of cv or sd
- Write roxygen help for growth models
- Generate catch-at-size dataset for ple4
- Length-based FLQuant converted to age-based when creating FLStock HOT 4
- harvest is different between FLCore 2.6.18 and 2.6.19 when importing SS output through ss3om::readFLSss3 HOT 5
- Add bevholtss3 to abpars()
- Inconsistent Parameter Estimation in fmle HOT 1
- Install Error HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flcore.