Comments (3)
I learned today through @noamross that {labelled}
is well-integrated with RStudio.
Digging through the code, it looks like it's not an integration specifically for {labelled}
, but a generic feature for attr(, "label")
.
I think this looks quite nice so we should either switch to {labelled}
, or for a base approach, replace attr(, "tag")
by attr(, "label")
in {linelist}
.
from linelist.
I've been doing a little bit more digging. The two approaches are actually much more different than what I said in my previous message:
{labelled}
set tags to the specific columns{linelist}
set tags to the data.frame
There are benefits to both approaches. In particular:
{labelled}
:- it is harder to drop the
attr()
by accident names<-()
,rename()
work out of the box without the need for a specific method- internal code can be greatly simplified in many cases
- integrates well with RStudio UI
- it is harder to drop the
{linelist}
:- it is possible to retain tags even after columns are dropped but I don't believe this functionality is exposed to users
- internal code can be greatly simplified in many cases (e.g., selecting specific tags can be done more easily, without having to loop through columns to extract their label)
Overall, it may be visible from my message that I prefer the attr()
by column approach. However, I think it would require a major rewrite of the package and possibly cause some breaking changes, which is much more than what I had in mind when I started looking at this issue.
from linelist.
Another alternative to mention in the README: https://github.com/karoliskoncevicius/annmatrix
from linelist.
Related Issues (20)
- Consider whether tag loss should lead to error by default HOT 1
- Replace for loops by functional equivalents HOT 1
- R CMD CHECK: `set_tags` deprecated
- Release linelist 1.1.0
- Allow users to set a default for `lost_tags_action()` via an environment variable
- methods may need to pass through an appropriate `strict` argument to `modify_defaults()` HOT 1
- Merge conflict left in vignette
- Compatibility linelist-dplyr HOT 4
- Tweak README incidence plot HOT 1
- Document the meaning of each tag HOT 1
- Anonymisation and anonymity testing HOT 3
- Clarify policy on tag inclusion
- Tagging and validating aggregated epi data HOT 3
- Move dplyr to Suggests
- Release linelist 1.0.0
- Use rlang dynamic dots instead of custom solution
- Vectorize `tag_variable()`
- Add class to linelist tag loss conditions
- Typo in NEWS
- Deprecated templates in .github directory
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 linelist.