{"id":21682621,"url":"https://github.com/chairco/pyrscript","last_synced_at":"2026-05-21T05:37:21.669Z","repository":{"id":62583266,"uuid":"112581253","full_name":"chairco/pyRscript","owner":"chairco","description":null,"archived":false,"fork":false,"pushed_at":"2017-12-19T12:51:49.000Z","size":37,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-28T10:00:56.638Z","etag":null,"topics":["r","rscript"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chairco.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-11-30T07:45:26.000Z","updated_at":"2017-12-01T07:56:54.000Z","dependencies_parsed_at":"2022-11-03T21:57:54.567Z","dependency_job_id":null,"html_url":"https://github.com/chairco/pyRscript","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chairco%2FpyRscript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chairco%2FpyRscript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chairco%2FpyRscript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chairco%2FpyRscript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chairco","download_url":"https://codeload.github.com/chairco/pyRscript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244600725,"owners_count":20479307,"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":["r","rscript"],"created_at":"2024-11-25T15:38:53.654Z","updated_at":"2026-05-21T05:37:21.639Z","avatar_url":"https://github.com/chairco.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Documentation Status](https://readthedocs.org/projects/pyrscript/badge/?version=latest)](http://pyrscript.readthedocs.io/en/latest/?badge=latest)\n\n# pyRscript\n\nIt's a easy tool to use subprocess call `Rscript` and execute R program then get the return's information: `returncode`, `stdout`, `stderr`.\n\nBe careful of this is running R on your device machine not vritual machine, be sure the R enivronmet is good on your computer.\n\n\nParameter:\n+ path: the target R's absolute path.\n+ file: R program.\n+ cmd: Not necessary but if need parameter use str and split with comma(`,`).\n\n\nSample Usage:\n```python\n\u003e\u003e\u003e import os\n\u003e\u003e\u003e from pyRscript import pyRscript\n\u003e\u003e\u003e RPATH = '/home/pyRscript'\n\u003e\u003e\u003e cmd = '-d,SN1234,-t,2017-07-13 00:00:00'\n\u003e\u003e\u003e r = pyRscript.Rscript(path=RPATH, file='test.R', cmd=cmd)\n\u003e\u003e\u003e print(r)\n\u003e\u003e\u003e \u003cParameter test.R /home/pyRscript ['-d', 'SN1234', '-t', '2017-07-13 00:00:00']\u003e\n\u003e\u003e\u003e ret = r.execute()\n\u003e\u003e\u003e print(ret)\n\u003e\u003e\u003e ParsedCompletedCommand(returncode=0, args=['Rscript', 'test.R', '-d', 'SN1234', '-t', '2017-07-13 00:00:00'], stdout='2017-12-03 11:35:38 INFO::Execute R\\n2017-12-03 11:35:39 INFO::id: SN1234, time: 2017-07-13 00:00:00', stderr='Loading required package: methods')\n\u003e\u003e\u003e print(ret.returncode)\n\u003e\u003e\u003e 0\n\u003e\u003e\u003e print(ret.stdout)\n\u003e\u003e\u003e '2017-12-03 11:37:59 INFO::Execute R\\n2017-12-03 11:37:59 INFO::id: SN1234, time: 2017-07-13 00:00:00'\n\u003e\u003e\u003e print(ret.stderr)\n\u003e\u003e\u003e 'Loading required package: methods'\n```\n\n\n## Install\n\n```\n$ pip install pyRscript\n```\n\n\n## Test\n\n```\npython -m pytest\n```\n\n\n## Lincese\n\nMIT LICENSE\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchairco%2Fpyrscript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchairco%2Fpyrscript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchairco%2Fpyrscript/lists"}