{"id":18743091,"url":"https://github.com/kxsystems/embedr","last_synced_at":"2026-01-07T16:11:38.672Z","repository":{"id":53912308,"uuid":"110120231","full_name":"KxSystems/embedR","owner":"KxSystems","description":"Embedding R inside q","archived":false,"fork":false,"pushed_at":"2024-12-06T14:57:08.000Z","size":210,"stargazers_count":11,"open_issues_count":3,"forks_count":11,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-12T03:14:12.542Z","etag":null,"topics":["embedr","interface","kdb","q","r"],"latest_commit_sha":null,"homepage":"http://code.kx.com/q/interfaces","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KxSystems.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-09T13:41:29.000Z","updated_at":"2024-12-06T14:57:13.000Z","dependencies_parsed_at":"2022-08-13T04:01:24.424Z","dependency_job_id":null,"html_url":"https://github.com/KxSystems/embedR","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KxSystems%2FembedR","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KxSystems%2FembedR/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KxSystems%2FembedR/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KxSystems%2FembedR/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KxSystems","download_url":"https://codeload.github.com/KxSystems/embedR/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248633177,"owners_count":21136821,"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":["embedr","interface","kdb","q","r"],"created_at":"2024-11-07T16:09:59.574Z","updated_at":"2026-01-07T16:11:38.666Z","avatar_url":"https://github.com/KxSystems.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# embedR: Embedding R inside q\n\nA KX [Fusion interface](https://code.kx.com/q/interfaces)\n\n\n## Installation\n\n### Download\nDownload the appropriate release archive from [releases](../../releases/latest) page. \n\n### Unpack and install content of the archive \n\nenvironment     | action\n----------------|---------------------------------------------------------------------------------------\nLinux           | `tar xzvf embedr_linux-v*.tar.gz -C $QHOME --strip 1`\nmacOS           | `tar xzvf embedr_osx-v*.tar.gz -C $QHOME --strip 1`\nWindows         | Open the archive and copy content of the `embedr` folder (`embedr\\*`) to `%QHOME%` or `c:\\q`\u003cbr/\u003eCopy `R_HOME/x64/*.dll` or `R_HOME/i386/*.dll` to `QHOME/w64` or `QHOME/w32` respectively. \n\n\n## Calling R\n\nWhen calling R, you need to set `R_HOME`. Required are:\n\n```bash\n# Linux/macOS\nexport R_HOME=`R RHOME`\n# Windows\nfor /f \"delims=\" %a in ('R RHOME') do @set R_HOME=%a\n```\n\nThe library has the following methods:\n\n- `Ropen`: Initialise embedded R. Optional to call. Allows to set verbose mode as `Ropen 1`.\n- `Rcmd`: run an R command, do not return a result\n- `Rfunc`: run an R func with q parameter values (an alternative to `Rcmd`)\n- `Rget`: run an R command, return the result to q\n- `Rset`: set a variable in the R memory space\n\n\n### Interactive plotting\n\nIf using interactive plotting with `lattice` and/or `ggplot2` you will need to call `print` on a chart object. \n\n\n## Examples\n\nSee [examples](examples) folder. \n\nNote: Examples are kdb+ 3.5 or higher.\n\n\n### Example 1\n\n`e4.q` is a simple example of plot 'moving window volatility' of returns. Converted from http://www.mayin.org/ajayshah/KB/R/html/p4.html\n\n\n### Example 2\n\n`pcd.q` is based on [Corporate credit card transactions 2014-15](https://data.gov.uk/dataset/corporate-credit-card-transaction-2014-15).\n\nDownload CSV from the link above and save it in the same folder as `pcd.q` under name `pcd2014v1.csv`.\n\n\n### Example 3\n\n\u003chttp://data.london.gov.uk/datastore/package/tubenetwork-performance-data\u003e\n\nLeft for the reader :wink:\n\n## Documentation\n\n*    [User guide](docs/README.md)\n*    [Using R with kdb+](docs/r-and-q.md)\n*    [Examples using rkdb/embedR](docs/examples.md)\n*    [Other methods](docs/other-methods.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkxsystems%2Fembedr","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkxsystems%2Fembedr","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkxsystems%2Fembedr/lists"}