Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write a function to build the layout matrix #54

Closed
sfcheung opened this issue Jun 15, 2020 · 1 comment
Closed

Write a function to build the layout matrix #54

sfcheung opened this issue Jun 15, 2020 · 1 comment
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@sfcheung
Copy link
Owner

sfcheung commented Jun 15, 2020

In semPaths, to specify the layout of nodes, we need to prepare a matrix:

m <- matrix(c("x1",   NA,  NA,   NA,
                NA, "x3",  NA, "x4",
              "x2",   NA,  NA,   NA), byrow = TRUE, 3, 4)

This will become inefficient to create and modify if the number of variables is large. We can write a function to create the matrix this way:

m <- fct(x1 = c(2, 1),
         x2 = c(3, 1),
         x3 = c(2, 2),
         x4 = c(2, 4))

This may look less intuitive, but is much easier to modify when the number of variables is large.

Status

Done (bfd921e)

@sfcheung sfcheung added enhancement New feature or request low priority labels Jun 15, 2020
@sfcheung sfcheung added this to the Version 0.2.9 milestone Jun 15, 2020
@sfcheung
Copy link
Owner Author

Function drafted. Being tested in the experimental branch experimental_sf

@sfcheung sfcheung self-assigned this Jun 17, 2020
@sfcheung sfcheung added this to To do in semptools_project May 18, 2021
@sfcheung sfcheung removed this from To do in semptools_project Jul 27, 2021
@sfcheung sfcheung added this to To do in semptools_project via automation Jul 27, 2021
@sfcheung sfcheung moved this from To do to In Progress in semptools_project Aug 17, 2021
semptools_project automation moved this from In Progress to Done Aug 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

1 participant