{"id":18765493,"url":"https://github.com/brandmaier/onyxr","last_synced_at":"2025-04-13T05:11:39.297Z","repository":{"id":75277865,"uuid":"75722659","full_name":"brandmaier/onyxR","owner":"brandmaier","description":"Starting Onyx from R ","archived":false,"fork":false,"pushed_at":"2021-11-02T19:46:16.000Z","size":127,"stargazers_count":16,"open_issues_count":3,"forks_count":2,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-26T22:03:16.904Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brandmaier.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2016-12-06T10:53:24.000Z","updated_at":"2024-08-21T08:50:55.000Z","dependencies_parsed_at":"2023-06-06T00:15:08.734Z","dependency_job_id":null,"html_url":"https://github.com/brandmaier/onyxR","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandmaier%2FonyxR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandmaier%2FonyxR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandmaier%2FonyxR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brandmaier%2FonyxR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brandmaier","download_url":"https://codeload.github.com/brandmaier/onyxR/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248665745,"owners_count":21142123,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-07T18:34:20.462Z","updated_at":"2025-04-13T05:11:39.261Z","avatar_url":"https://github.com/brandmaier.png","language":"R","funding_links":[],"categories":[],"sub_categories":[],"readme":"# onyxR\n\nAn R package for calling Onyx GUI from R when using OpenMx or lavaan packages for Structural Equation Modelling.\nThe package provides a simple onyx() function that takes either an OpenMx model or a lavaan model (either a\nfitted lavaan model or string specification). If a local onyx executable is available, its path can be passed to the function.\nOtherwise, it will attempt to download a copy of Onyx from the official repository. A recent version of\nJAVA (version 1.6+) is required to be installed on the system.\n\n## Install\n\nTo install the onyxR package directly from GitHub, copy the following line into R:\n```{r, eval=FALSE}\nsource('https://raw.githubusercontent.com/brandmaier/onyxR/master/tools/install.R')\n```\n\n## Usage\n\nUsing onyxR is as simple as that. In lavaan\n\n````{r, eval=FALSE}\nHS.model \u003c- ' visual  =~ x1 + x2 + x3 \n              textual =~ x4 + x5 + x6\n              speed   =~ x7 + x8 + x9 '\n\nfit \u003c- cfa(HS.model, data = HolzingerSwineford1939)\n\nsummary(fit, fit.measures = TRUE)\n\nonyx(fit)\n````\n\nAlternatively, we can use onyxR to generate a path diagram for an OpenMx RAM-type model:\n\n````{r, eval=FALSE}\ndata(demoOneFactor)\nmanifests \u003c- names(demoOneFactor)\nlatents \u003c- c(\"G\")\nfactorModel \u003c- mxModel(\"One Factor\",\n                       type=\"RAM\",\n                       manifestVars = manifests,\n                       latentVars = latents,\n                       mxPath(from=latents, to=manifests),\n                       mxPath(from=manifests, arrows=2),\n                       mxPath(from=latents, arrows=2,\n                              free=FALSE, values=1.0),\n                       mxData(cov(demoOneFactor), type=\"cov\",\n                              numObs=500))\nfit \u003c- mxRun(factorModel)\n\nonyx(fit)\n````\n\n![openmx](https://github.com/brandmaier/onyxR/blob/master/inst/openmx-factor.png?raw=true)\n\n## Demo\n\nIn a simple demo, we have wrapped the above example.  We define the HS model with three independent factors in lavaan and pass this to Onyx to display the path diagram.\n````{r, eval=FALSE}\nrequire(onyxR)\ndemo(lavaanHS)\n```\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrandmaier%2Fonyxr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrandmaier%2Fonyxr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrandmaier%2Fonyxr/lists"}