Comments (6)
@mhunter1, @RMKirkpatrick I need help on finalizing the pull request, I was about add a test unit for the PR, but I noticed that if i add:
`+.MxModel` <- function (e1, e2) {
mxModel(e1, e2)
}
to MxModel.R, then build with make install
and then run my tests, the new overloading is not being picked up and the test errs. Am I adding that code to the wrong place?
My test file looks like the following:
library(OpenMx)
library(testthat)
context("Plus operator")
mb <- mxModel("bivariate Heterogeneity Path Specification",
type = "RAM",
manifestVars = c("X", "Y")
) +
mxPath(from = c("X", "Y"), arrows = 2, free = T, values = 1, lbound = .01) +
mxPath(from = "X", to = "Y", arrows = 2, free = T, values = .2, lbound = .01) +
mxPath(
from = "one", to = c("X", "Y"), arrows = 1, free = T, values = c(0.1, -0.1),
ubound = c(NA, 0), lbound = c(0, NA)
)
mb <- mxGenerateData(mb, nrows = 1000, returnModel = T)
out <- try(mxRun(mb))
omxCheckEquals(is(out, "try-error"), FALSE)
The error:
from openmx.
On a second thought, I remember in R one needs to export a new function in order to be available to the user, otherwise it is just for internal use, is that it?
from openmx.
On a second thought, I remember in R one needs to export a new function in order to be available to the user, otherwise it is just for internal use, is that it?
Yes, I think you'll need to add the appropriate line to the NAMESPACE file.
from openmx.
Ok, done.
Will move on to #351 and then back. Thanks for the help.
from openmx.
You can also use roxygen to document, handle the namespace etc. in-line. Some OpenMx functions use this, most hand-write it all. It's a bit of a doctrinaire issue :-)
This is a stub I use, but you can learn more by searching #' in the code or https://roxygen2.r-lib.org
#' TITLE
#'
#' @description myfunc is a function which
#'
#' @details If any
#'
#' @param param a something to DO WHAT?
#' @return - what i return
#' @export
#' @family
#' @Seealso - [omxSimilarFunction()]
#' @references - if any
#' @md
#' @examples
#' myfunc(param)
#' \dontrun{
#'
#' }
from openmx.
from openmx.
Related Issues (20)
- Installation failed HOT 2
- ERROR: compilation failed for package βOpenMxβ HOT 2
- Catch user trying to apply `mxAutoStart` to multilevel model
- Option to build libnpsol from source? HOT 2
- Cannot use mxRun(model, unsafe=T) within mxTryHardOrdinal
- Try to figure out why vignettes only works on windows HOT 7
- deleted
- lavaan-like syntax for OpenMx RAM-type models HOT 6
- Fix `mxFactorScores()` for RAM-specified Matrix Models
- Document novel `mxGetExpected()` behavior for state space models
- mxPath: Adding undirected effect removes directed effect HOT 6
- Resolve performance regression in WLS for large sample sizes HOT 4
- rows that are all NAs alter reported RMSEA HOT 2
- Installation script for NPSOL version fails -- wrong repo url HOT 1
- Installing Documentation for Users HOT 2
- Parallelize CI calculation HOT 5
- [MacPorts] Error during install: `cp: *.gcno: No such file or directory: make: [save-gcno] Error 1 (ignored)` HOT 7
- builds failing on travis. Move to rhub? HOT 1
- Extend `mxCheckIdentification()` for definition variables HOT 1
- Adding latent variables to a model with just a single latent variable produces error 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 openmx.