{"action":"created","issue":{"url":"https://api.github.com/repos/jamovi/jamovi/issues/633","repository_url":"https://api.github.com/repos/jamovi/jamovi","labels_url":"https://api.github.com/repos/jamovi/jamovi/issues/633/labels{/name}","comments_url":"https://api.github.com/repos/jamovi/jamovi/issues/633/comments","events_url":"https://api.github.com/repos/jamovi/jamovi/issues/633/events","html_url":"https://github.com/jamovi/jamovi/issues/633","id":387898198,"node_id":"MDU6SXNzdWUzODc4OTgxOTg=","number":633,"title":"RJEditor doesn't connect with system R","user":{"login":"saikong","id":22305310,"node_id":"MDQ6VXNlcjIyMzA1MzEw","avatar_url":"https://avatars1.githubusercontent.com/u/22305310?v=4","gravatar_id":"","url":"https://api.github.com/users/saikong","html_url":"https://github.com/saikong","followers_url":"https://api.github.com/users/saikong/followers","following_url":"https://api.github.com/users/saikong/following{/other_user}","gists_url":"https://api.github.com/users/saikong/gists{/gist_id}","starred_url":"https://api.github.com/users/saikong/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/saikong/subscriptions","organizations_url":"https://api.github.com/users/saikong/orgs","repos_url":"https://api.github.com/users/saikong/repos","events_url":"https://api.github.com/users/saikong/events{/privacy}","received_events_url":"https://api.github.com/users/saikong/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-12-05T18:57:57Z","updated_at":"2018-12-05T21:55:13Z","closed_at":null,"author_association":"NONE","body":"I looked at all the other resolved issues related to the system RJ Editor, and cant figure out what's wrong here.\r\n\r\nHere's a screenshot.\r\n\r\n![2018-12-06_024457](https://user-images.githubusercontent.com/22305310/49536255-093bd600-f901-11e8-81dc-77935de85c27.png)\r\n\r\nSo, as you can see, it writes \" \r\nEven tried the R <- findR() function, and it returns nothing.\r\n\r\n```\r\n> install.packages('jmvconnect')\r\nInstalling package into ‘C:/Users/Fili/Documents/R/win-library/3.5’\r\n(as ‘lib’ is unspecified)\r\ntrying URL 'https://cran.rstudio.com/bin/windows/contrib/3.5/jmvconnect_1.0.7.zip'\r\nContent type 'application/zip' length 609396 bytes (595 KB)\r\ndownloaded 595 KB\r\n\r\npackage ‘jmvconnect’ successfully unpacked and MD5 sums checked\r\n\r\nThe downloaded binary packages are in\r\n\tC:\\Users\\Fili\\AppData\\Local\\Temp\\RtmpeizNkg\\downloaded_packages\r\n> require(jmvconnect)\r\nLoading required package: jmvconnect\r\n> packageVersion(\"jmvconnect\")\r\n[1] ‘1.0.7’\r\n> packageVersion(\"jmv\")\r\n[1] ‘0.9.5’\r\n> packageVersion(\"jmvcore\")\r\n[1] ‘0.9.5’\r\n> jmvconnect::what()\r\n\r\n Available Data Sets               \r\n ───────────────────────────────── \r\n        Title       Rows    Cols   \r\n ───────────────────────────────── \r\n   1    Untitled       0       3   \r\n ───────────────────────────────── \r\n\r\n> jmvconnect::read(1)\r\n[1] A B C\r\n<0 rows> (or 0-length row.names)\r\n> jmvconnect:::eval('jmv::descriptives(data)', ToothGrowth, echo=TRUE)\r\n\r\n RESULTS\r\n> jmv::descriptives(data)\r\n DESCRIPTIVES\r\n\r\n Descriptives                         \r\n ──────────────────────────────────── \r\n              len     supp    dose    \r\n ──────────────────────────────────── \r\n   N            60      60       60   \r\n   Missing       0       0        0   \r\n   Mean       18.8             1.17   \r\n   Median     19.2             1.00   \r\n   Minimum    4.20            0.500   \r\n   Maximum    33.9             2.00   \r\n ──────────────────────────────────── \r\n\r\n\r\n DESCRIPTIVES\r\n\r\n Descriptives                         \r\n ------------------------------------ \r\n              len     supp    dose    \r\n ------------------------------------ \r\n   N            60      60       60   \r\n   Missing       0       0        0   \r\n   Mean       18.8             1.17   \r\n   Median     19.2             1.00   \r\n   Minimum    4.20            0.500   \r\n   Maximum    33.9             2.00   \r\n ------------------------------------ \r\n```\r\nand\r\n```\r\n> findR <- function() {\r\n+     \r\n+     version <- Sys.readlink('/Library/Frameworks/R.framework/Versions/Current')\r\n+     path <- file.path('/Library/Frameworks/R.framework/Versions', version)\r\n+     path <- file.path(path, 'Resources', 'bin', 'R')\r\n+     \r\n+     if (file.exists(path))\r\n+         return(path)\r\n+     if (file.exists('/usr/bin/R'))\r\n+         return('/usr/bin/R')\r\n+     if (file.exists('/usr/local/bin/R'))\r\n+         return('/usr/local/bin/R')\r\n+     if (file.exists('/opt/local/bin/R'))\r\n+         return('/opt/local/bin/R')\r\n+ }\r\n> findR()\r\n> version <- Sys.readlink('/Library/Frameworks/R.framework/Versions/Current')\r\n> path <- file.path('/Library/Frameworks/R.framework/Versions', version)\r\n> path <- file.path(path, 'Resources', 'bin', 'R')\r\n> version\r\n[1] \"\"\r\n> path\r\n[1] \"/Library/Frameworks/R.framework/Versions/Resources/bin/R\"\r\n```\r\n\r\nWhat am I doing wrong?\r\n"},"comment":{"url":"https://api.github.com/repos/jamovi/jamovi/issues/comments/444665308","html_url":"https://github.com/jamovi/jamovi/issues/633#issuecomment-444665308","issue_url":"https://api.github.com/repos/jamovi/jamovi/issues/633","id":444665308,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NDY2NTMwOA==","user":{"login":"jonathon-love","id":3240247,"node_id":"MDQ6VXNlcjMyNDAyNDc=","avatar_url":"https://avatars0.githubusercontent.com/u/3240247?v=4","gravatar_id":"","url":"https://api.github.com/users/jonathon-love","html_url":"https://github.com/jonathon-love","followers_url":"https://api.github.com/users/jonathon-love/followers","following_url":"https://api.github.com/users/jonathon-love/following{/other_user}","gists_url":"https://api.github.com/users/jonathon-love/gists{/gist_id}","starred_url":"https://api.github.com/users/jonathon-love/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonathon-love/subscriptions","organizations_url":"https://api.github.com/users/jonathon-love/orgs","repos_url":"https://api.github.com/users/jonathon-love/repos","events_url":"https://api.github.com/users/jonathon-love/events{/privacy}","received_events_url":"https://api.github.com/users/jonathon-love/received_events","type":"User","site_admin":false},"created_at":"2018-12-05T21:55:13Z","updated_at":"2018-12-05T21:55:13Z","author_association":"COLLABORATOR","body":"yeah, sometimes R doesn't set up the `.libPaths()` paths correctly (who knows why), and i'd say that's what's happening here. i might get the chance to look at this today, and see if i can figure out a work-around.\r\n\r\nbut wait, your `findR()` looks to be for macOS, try this one:\r\n\r\n```r\r\nfindR <- function() {\r\n\r\n    os <- Sys.info()[['sysname']]\r\n\r\n    if (os == 'Darwin') {\r\n        version <- Sys.readlink('/Library/Frameworks/R.framework/Versions/Current')\r\n        path <- file.path('/Library/Frameworks/R.framework/Versions', version)\r\n        path <- file.path(path, 'Resources', 'bin', 'R')\r\n\r\n        if (file.exists(path))\r\n            return(path)\r\n        if (file.exists('/usr/bin/R'))\r\n            return('/usr/bin/R')\r\n        if (file.exists('/usr/local/bin/R'))\r\n            return('/usr/local/bin/R')\r\n        if (file.exists('/opt/local/bin/R'))\r\n            return('/opt/local/bin/R')\r\n\r\n    } else if (os == 'Windows') {\r\n\r\n        entries <- try(readRegistry('Software\\\\R-core\\\\R', 'HLM'))\r\n        if (inherits(entries, 'try-error'))\r\n            stop('Could not find system R (no appropriate registry entries)')\r\n        home <- entries$InstallPath\r\n        path <- file.path(home, 'bin', 'x64', 'R.exe')\r\n        if (file.exists(path))\r\n            return(path)\r\n        stop('Could not find system R (registry entries are incorrect)')\r\n\r\n    } else {\r\n        path <- system2('which', args='R', stdout=TRUE)\r\n        if (file.exists(path))\r\n            return(path)\r\n        if (file.exists('/usr/bin/R'))\r\n            return('/usr/bin/R')\r\n        if (file.exists('/usr/local/bin/R'))\r\n            return('/usr/local/bin/R')\r\n    }\r\n\r\n    stop('Could not find system R')\r\n}\r\n```"}}
{"actor":{"display_login":"jonathon-love"}}