{"action":"created","issue":{"url":"https://api.github.com/repos/OpenMx/OpenMx/issues/98","repository_url":"https://api.github.com/repos/OpenMx/OpenMx","labels_url":"https://api.github.com/repos/OpenMx/OpenMx/issues/98/labels{/name}","comments_url":"https://api.github.com/repos/OpenMx/OpenMx/issues/98/comments","events_url":"https://api.github.com/repos/OpenMx/OpenMx/issues/98/events","html_url":"https://github.com/OpenMx/OpenMx/issues/98","id":351119621,"node_id":"MDU6SXNzdWUzNTExMTk2MjE=","number":98,"title":"Different behaviour when loading or attaching","user":{"login":"ToMul09","id":42435070,"node_id":"MDQ6VXNlcjQyNDM1MDcw","avatar_url":"https://avatars1.githubusercontent.com/u/42435070?v=4","gravatar_id":"","url":"https://api.github.com/users/ToMul09","html_url":"https://github.com/ToMul09","followers_url":"https://api.github.com/users/ToMul09/followers","following_url":"https://api.github.com/users/ToMul09/following{/other_user}","gists_url":"https://api.github.com/users/ToMul09/gists{/gist_id}","starred_url":"https://api.github.com/users/ToMul09/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ToMul09/subscriptions","organizations_url":"https://api.github.com/users/ToMul09/orgs","repos_url":"https://api.github.com/users/ToMul09/repos","events_url":"https://api.github.com/users/ToMul09/events{/privacy}","received_events_url":"https://api.github.com/users/ToMul09/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-08-16T09:11:08Z","updated_at":"2018-08-16T15:11:49Z","closed_at":null,"author_association":"NONE","body":"I'm using the package \"metaSEM\" and encountered a different behaviour depending on whether the package is loaded or attached. I posted the issue in the \"OpenMx\" repository since I'm assuming it is related to \"OpenMx\". If I just load \"metaSEM\" (and thereby also load \"OpenMx\", the following code\r\n```{r}\r\nexample_data <- data.frame(\"y\" = 1:5, \"v\" = 1 / 5:1)\r\nloadNamespace(\"metaSEM\")\r\nml_fit <- metaSEM::meta(y = y, v = v, data = example_data, intervals.type = \"LB\")\r\nml_fit_summary <- summary(ml_fit)$coefficients[\"Intercept1\", ]\r\nc(\"pointEst_effect\" = ml_fit_summary$Estimate, \r\n  \"CI_lower\" = ml_fit_summary$lbound, \r\n  \"CI_upper\" = ml_fit_summary$ubound)\r\n```\r\nproduces:\r\n```{r}\r\npointEst_effect        CI_lower        CI_upper\r\n       2.820254              NA              NA\r\n```\r\nHowever, if I _attach_ the package (after restarting the R session), the following code\r\n```{r}\r\nexample_data <- data.frame(\"y\" = 1:5, \"v\" = 1 / 5:1)\r\nlibrary(metaSEM)\r\nml_fit <- meta(y = y, v = v, data = example_data, intervals.type = \"LB\")\r\nml_fit_summary <- summary(ml_fit)$coefficients[\"Intercept1\", ]\r\nc(\"pointEst_effect\" = ml_fit_summary$Estimate, \r\n  \"CI_lower\" = ml_fit_summary$lbound, \r\n  \"CI_upper\" = ml_fit_summary$ubound)\r\n```\r\nproduces:\r\n```{r}\r\npointEst_effect        CI_lower        CI_upper\r\n       2.820255        1.439689        4.388500\r\n```\r\nFor other example data, I even get non-NA CI bounds when loading the package (but not attaching it) which differ slightly from the CI bounds when attaching the package (making it even harder to tell that there's a difference when looking at the results at a first glance).\r\nAfter inspecting the source code of \"metaSEM\" and \"OpenMx\", I think the problem might be the definition of .onLoad() in \"OpenMx\": In .onLoad(), default options are set which somehow seem to be overwritten when attaching the package. You can tell that by running\r\n```{r}\r\nexample_data <- data.frame(\"y\" = 1:5, \"v\" = 1 / 5:1)\r\nlibrary(metaSEM)\r\nOpenMx::mxSetDefaultOptions()\r\nml_fit <- meta(y = y, v = v, data = example_data, intervals.type = \"LB\")\r\nml_fit_summary <- summary(ml_fit)$coefficients[\"Intercept1\", ]\r\nc(\"pointEst_effect\" = ml_fit_summary$Estimate, \r\n  \"CI_lower\" = ml_fit_summary$lbound, \r\n  \"CI_upper\" = ml_fit_summary$ubound)\r\n```\r\nwhich produces the same result as when loading the package (but not attaching it). So my question is: Is this intentional behaviour or might this be a bug?"},"comment":{"url":"https://api.github.com/repos/OpenMx/OpenMx/issues/comments/413580198","html_url":"https://github.com/OpenMx/OpenMx/issues/98#issuecomment-413580198","issue_url":"https://api.github.com/repos/OpenMx/OpenMx/issues/98","id":413580198,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzU4MDE5OA==","user":{"login":"ToMul09","id":42435070,"node_id":"MDQ6VXNlcjQyNDM1MDcw","avatar_url":"https://avatars1.githubusercontent.com/u/42435070?v=4","gravatar_id":"","url":"https://api.github.com/users/ToMul09","html_url":"https://github.com/ToMul09","followers_url":"https://api.github.com/users/ToMul09/followers","following_url":"https://api.github.com/users/ToMul09/following{/other_user}","gists_url":"https://api.github.com/users/ToMul09/gists{/gist_id}","starred_url":"https://api.github.com/users/ToMul09/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ToMul09/subscriptions","organizations_url":"https://api.github.com/users/ToMul09/orgs","repos_url":"https://api.github.com/users/ToMul09/repos","events_url":"https://api.github.com/users/ToMul09/events{/privacy}","received_events_url":"https://api.github.com/users/ToMul09/received_events","type":"User","site_admin":false},"created_at":"2018-08-16T15:11:49Z","updated_at":"2018-08-16T15:11:49Z","author_association":"NONE","body":"I can't install the current GitHub version. Running `devtools::install_github(\"OpenMx/OpenMx\")` gives:\r\n```{r}\r\nfatal error: omxSymbolTable.h: No such file or directory\r\n```"}}
{"actor":{"display_login":"ToMul09"}}