pik-piam / gdx Goto Github PK
View Code? Open in Web Editor NEWR package | readGDX package for R
License: Other
R package | readGDX package for R
License: Other
Line 221 in 6a32a33
How about changing the default of parameter react
in readGDX()
from warning
to silent
?
Line 99 in 1f3c0c5
Little code-census: searching through calls to readGDX()
in all pik-piam
packages:
react |
count |
---|---|
<none> |
1151 |
'silent' |
107 |
'warning' |
8 |
'error' |
0 |
'quiet' |
5 |
F |
2 |
Most users don't seem to care too much whether objects are found or not, and of those who seem to care, most are actually ok with silent
, and some don't care enough to put down a legal parameter.
Of the first group (not caring or ok with silent
), 544 calls are in the remind
package, which elicits a truck load of warnings about
<some_parameter> not found in GDX! <some_parameter2> returned
due to all the renaming that has been going on.
This makes warnings quite meaningless, because a) this is designed-for behaviour and b) it also makes it impossible to see any other warnings, since R only keeps 50 of them.
So how about changing the default to silent
, cutting down on all those warnings?
Using this file /p/projects/rd3mod/gdx_file_breaking_readGDX.gdx
,
this works:
str(readGDX('gdx_file_breaking_readGDX.gdx', 'v37_emiIndCCSmax', field = 'l'))
Formal class 'magpie' [package "magclass"] with 1 slot
..@ .Data: num [1:12, 1:40, 1:5] 0 0 0 0 0 0 0 0 0 0 ...
.. ..- attr(*, "dimnames")=List of 3
.. .. ..$ all_regi: chr [1:12] "CAZ" "CHA" "EUR" "IND" ...
.. .. ..$ ttot : chr [1:40] "y1900" "y1905" "y1910" "y1915" ...
.. .. ..$ emiInd37: chr [1:5] "co2cement_process" "co2cement" "co2chemicals" "co2steel" ...
but this doesn't:
readGDX('gdx_file_breaking_readGDX.gdx', 'v37_emiIndCCSmax', field = 'l',
format = 'first_found')
NULL
Warning message:
In readGDX("gdx_file_breaking_readGDX.gdx", "v37_emiIndCCSmax", :
No element of v37_emiIndCCSmax found in GDX! NULL returned
Using the current REMIND input.gdx
works, though. Really weird interaction of .gdx
file and readGDX()
code.
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.