Comments (10)
I will draft a function in the branch match_node_names to address this issue.
from semptools.
I will draft a function in the branch match_node_names to address this issue.
We decided not addressing this issue by matching node names. Instead, another function for changing node names will be written.
from semptools.
I will draft a function in the branch match_node_names to address this issue.
We decided not addressing this issue by matching node names. Instead, another function for changing node names will be written.
I will draft the function in this branch:
change_node_labels
from semptools.
I added an experimental function change_node_label2()
, which takes a named list as input, but then I found out your suggestion in #53. The function is not currently exported.
from semptools.
A bug has now been identified as set_curve()
and set_edge_label_position()
give an error when applying to objects returned by change_node_label()
. Still need more investigation, but most likely due to these functions not using the names of the named vector returned. @sfcheung do you think we should change all functions to allow them use the names of the named vector/list for the labels if they could not find a match?
from semptools.
I added an experimental function
change_node_label2()
, which takes a named list as input, but then I found out your suggestion in #53. The function is not currently exported.
I drafted this function to_list_of_lists
in the branch change_node_labels
to make it easier to specify the elements to be changed by supplying a named vector, rather a list of lists. We could have used this approach for all relevant functions but it is too late to rewrite them now. There may also be situations in which named vector will not work. Therefore, we can revise relevant functions such that, if they detected the input is a named vector rather than a list of lists, they will be converted to a list of lists internally. Then all previous examples will still work while users have two options to specify the nodes or paths to be changed.
P.S.: I forgot which branch is the active branch that we should work on. Given that change_node_labels
involves an urgent issue to handle, I drafted that function there.
from semptools.
A bug has now been identified as
set_curve()
andset_edge_label_position()
give an error when applying to objects returned bychange_node_label()
. Still need more investigation, but most likely due to these functions not using the names of the named vector returned. @sfcheung do you think we should change all functions to allow them use the names of the named vector/list for the labels if they could not find a match?
Agree, @marklhc . I will revise related functions in the branch change_node_labels
.
from semptools.
A bug has now been identified as
set_curve()
andset_edge_label_position()
give an error when applying to objects returned bychange_node_label()
. Still need more investigation, but most likely due to these functions not using the names of the named vector returned. @sfcheung do you think we should change all functions to allow them use the names of the named vector/list for the labels if they could not find a match?
@marklhc, I revised edge_index()
, which is used by set_curve()
and set_edge_label_position()
, following your advice on using the names of the named vector (...$graphAttributes$Nodes$names
) if no match was found. This should solve the bug you found (the tests in test-change-node have been passed). I will check which other functions need to be revised similarly (I created #58 to keep track of this task).
from semptools.
I added an experimental function
change_node_label2()
, which takes a named list as input, but then I found out your suggestion in #53. The function is not currently exported.
I revised change_node_label()
based on change_node_label2()
, adopted your approach in finding a match and allowing for using a named list (rather than a list of lists).
from semptools.
I am closing this issue because it should be been fixed when addressing other issues. The brnach https://github.com/sfcheung/semptools/tree/change_node_labels up to 2fb1d0b passed all tests. The remaining tasks are addressed in #58. If necessary, we can reopen this issue later.
from semptools.
Related Issues (20)
- Add support for 2nd order factors in `set_sem_layout()` HOT 1
- `set_sem_layout()`: Add an argument to shift the indicators to left/right or up/down
- `factor_point_to`: Use named vector to set the argument HOT 1
- `set_cfa_layout()`: Cannot handle a CFA plot with no factor covariances HOT 1
- `set_curve()`: Bug fix: Failed to work for some bidirecational edges
- Updat r-lib GitHub actions HOT 1
- `set_cfa_layout()`: Add support for models with factor covariances fixed to zero HOT 2
- Update the help page of `set_sem_layout()` on manifest vars and 2nd-order factors HOT 1
- When setting curve, positive means outward and negative means inward
- set_cfa_layout() HOT 4
- Remark that it only officially supports RAM-style plots HOT 1
- `set_edge_label_position()` does not work on factor loadings
- Find a better way to handle CFA models with items loading on more than one factor HOT 1
- CRAN 0.2.9.11
- Update articles HOT 1
- Revise the internal workflow
- Add more informative error and warning messages for `set_cfa_layout()` and `set_sem_layout()` HOT 1
- Reusing pipes
- A function to "expand" or "contract" a diagram
- Missing support for SEM models with single manifest (non-indicator) variables. HOT 4
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 semptools.