Comments (5)
Now approaching this using eml_config
, which will allow the user to create S4 objects that can be passed in for frequently used values. These objects can then be loaded from the custom environment hash using:
get("defaultElementName", envir=remlCache)
- Need to add a method to write out and load in cache between R sessions. Where is a good place to write to for this?
system.file
?
Still expanding this function. Commonly reused elements we will want to create and provide in this function:
- intellectualRights element
- default creator element
- default contact element
- multiple saved taxonomic coverage elements (for researcher working on common set of species)
- default geographic coverage (multiple) (researcher working with common set of field sites)
- default software element (commonly used software).
- ...
will continue to amend list as we think of more. feel free to add suggestions.
from eml.
Anyone ( @mbjones @duncantl @ALL) have advice on a good strategy to cache package settings between R sessions?
We want a user to be able to enter their contact information once and have R remember for future use. We could write this just to the working directory, which has advantages (e.g. could configure different working directories differently), or we could write to some global scratch. My intuition would be to create a hidden/dotfile in the user's home directory; not sure if that would work for windows users, etc?
from eml.
Isn’t this exactly what we’d use the .rprofile for? For e.g. I keep this in mine for devtools
package creation:
options(devtools.desc.author = "'Karthik Ram <[email protected]> [aut, cre]'")
options(devtools.desc.license = "CC0”)
Can’t we do something similar?
from eml.
@karthik Sorry, I should have been clearer -- was thinking about an interactive cache of R objects. Typically we've done that by asking a user to edit .rprofile
by hand. Sure, we could writeLines()
to .rprofile, but that is poor style, since this could potentially be a large chunk of information (okay, not that big) that isn't needed by every R session. I'd rather load a cache only when reml
is loaded.
Thinking this out a bit more, I'm leaning towards doing away with saved configurations as I think it is more likely to create errors and not be flexible enough. For instance, consider the use-case of coverage metadata. While it would be annoying to have to specify the complete geographic coverage for a site you work on all the time, you don't exactly want that coverage metadata be loaded automatically either. You'd rather write the coverage to a file once, and then just copy it over when you need it later, e.g.
eml <- read.eml("my_earlier_eml.xml")
sagehen <- geographic_coverage(eml)
karthik <- creator(eml)
The user that wanted to save the eml element for later reuse in the standard way (e.g .save(sagehen, "sagehen.rda")
), or just extract it from an eml as above. Then it can be written into future EML files explicitly but without going through the tedium of constructing the geographic coverage node, e.g.
write.eml(dat, ..., creator = karthik, geographic_coverage = sagehen)
In general this assigning variable names to reused elements is probably more natural and flexible than trying to remember previous values and re-using them automatically. Sound good?
from eml.
Working along these lines, I think we'll drop eml_config
and illustrate element reuse as above instead. This would better fit the use-case of groups like Harvard Forest, who currently generate EML using a mix of a generic XML editor (Oxygen) for metadata above the entity
level and Morpho for attribute details.
All arguments to eml_write
take either text-based arguments or existing S4 objects as shown above. See examples in #48.
from eml.
Related Issues (20)
- set_attributes forces all numeric fields to have storageType = "float" HOT 7
- Taxonomic Coverage and bibtex HOT 1
- Species name epithet is not handled the way specified in the EML schema HOT 2
- Error with molePerKilogram in unit list returned by get_unitList() HOT 3
- dataset and datatable entries from README example fail HOT 2
- `shiny_attributes` performance improvments HOT 8
- Revisit how users can find a learn to use the `eml$*` constructors HOT 2
- Add a minimum version requirement on taxadb and wait to release the next version of this package HOT 1
- Web scraping | sapply function | Error in readBin(5L, "raw", 65536L) : Failure when receiving data from the peer HOT 1
- Creating EML elements with XML attributes HOT 2
- Duplicate person when using `write_eml()` HOT 2
- Set attributes for properties, e.g. `<title xml:lang="eng">` HOT 3
- Function to convert DataCite metadata to EML: good fit for this package? HOT 7
- `<![CDATA[` not always recognized HOT 1
- [Units] Discussion about current unit list HOT 5
- `set_coverage()`: Express common names in `commonName` in `taxonomicCoverage` HOT 10
- `set_responsibleParty()`: allow to create organization parties HOT 1
- namespace conflict introduced when importing/exporting EML generated under older schema
- EML::eml_validate conflicts with knb.ecoinformatics.org parser & appears to introduce invalid xml into valid files HOT 1
- EML seems to have trouble with foreign key constraints HOT 2
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 eml.