{ "info": { "author": "Randy Lai", "author_email": "", "bugtrack_url": null, "classifiers": [], "description": "# radian: A 21 century R console\n\n[![CircleCI](https://circleci.com/gh/randy3k/radian/tree/master.svg?style=shield)](https://circleci.com/gh/randy3k/radian/tree/master)\n[![Build status](https://ci.appveyor.com/api/projects/status/3i4826t9lclr4vqd/branch/master?svg=true)](https://ci.appveyor.com/project/randy3k/radian/branch/master)\n[![Github Action](https://github.com/randy3k/radian/workflows/build/badge.svg)](https://github.com/randy3k/radian/actions)\n[![codecov](https://codecov.io/gh/randy3k/radian/branch/master/graph/badge.svg)](https://codecov.io/gh/randy3k/radian)\n[![](https://img.shields.io/pypi/v/radian.svg)](https://pypi.org/project/radian/)\n\n\n\n\n\n\n_radian_ is an alternative console for the R program with multiline editing and rich syntax highlight.\nOne would consider _radian_ as a [ipython](https://github.com/ipython/ipython) clone for R, though its design is more aligned to [julia](https://julialang.org).\n\n\n\n\n## Features\n\n- cross platform, runs on Windows, macOS and Linux\n- shell mode: hit `;` to enter and `` to leave\n- reticulate python repl mode: hit `~` to enter\n- improved R prompt and reticulate python prompt\n - multiline editing\n - syntax highlight\n - auto completion (reticulate autocompletion depends on `jedi`)\n- unicode support\n- auto matching parens/quotes.\n- brackated paste mode\n- emacs/vi editing mode\n- automiatically adjust to terminal width\n- read more than 4096 bytes per line\n\n\n## Installation\n\nRequirements:\n\n- An installation of R (version 3.4.0 or above) is required to use _radian_, an R installation binary for your system can be downloaded from https://cran.r-project.org.\n- `python` is also required to install _radian_. If your system doesn't come with a python distribution, it can be downloaded from https://conda.io/en/latest/miniconda.html. Both version 2 and version 3 should work, though python 3 is recommended.\n- `pip` is optional but it makes the installation a bit easier.\n\n```sh\n# install released version\npip install -U radian\n# to run radian\nradian\n```\n\n```sh\n# or the development version\npip install -U git+https://github.com/randy3k/radian\n```\n\n## Alias on unix system\n\nYou could alias `r` to _radian_ by putting\n\n```bash\nalias r=\"radian\"\n```\nin `~/.bash_profile` such that `r` would open _radian_ and `R` would still open the traditional R console.\n(`R` is still useful, e.g, running `R CMD BUILD`.)\n\n\n## Settings\n\n_radian_ can be customized by specifying the following options in `.Rprofile`\nat your user home directory. However, when running _radian_ in vanilla mode\n(`radian --vanilla`), the file `.Rprofile` would not be executed. If\npersistent settings are required, one could put those options in `.radian_profile`.\nThis file will be executed even if `radian` is in vanilla mode.\n\n\n*Do not copy the whole configuration, just specify what you need!*\n\n```r\n# see https://help.farbox.com/pygments.html\n# for a list of supported color schemes, default scheme is \"native\"\noptions(radian.color_scheme = \"native\")\n\n# either `\"emacs\"` (default) or `\"vi\"`.\noptions(radian.editing_mode = \"emacs\")\n\n# indent continuation lines\n# turn this off if you want to copy code without the extra indentation;\n# but it leads to less elegent layout\noptions(radian.indent_lines = TRUE)\n\n# auto match brackets and quotes\noptions(radian.auto_match = FALSE)\n\n# auto indentation for new line and curly braces\noptions(radian.auto_indentation = TRUE)\noptions(radian.tab_size = 4)\n\n# pop up completion while typing\noptions(radian.complete_while_typing = TRUE)\n# timeout in seconds to cancel completion if it takes too long\n# set it to 0 to disable it\noptions(radian.completion_timeout = 0.05)\n\n# automatically adjust R buffer size based on terminal width\noptions(radian.auto_width = TRUE)\n\n# insert new line between prompts, turning it off may hide buffered lines\noptions(radian.insert_new_line = TRUE)\n\n# when using history search (ctrl-r/ctrl-s in emacs mode), do not show duplicate results\noptions(radian.history_search_no_duplicates = FALSE)\n\n# custom prompt for different modes\noptions(radian.prompt = \"\\033[0;34mr$>\\033[0m \")\noptions(radian.shell_prompt = \"\\033[0;31m#!>\\033[0m \")\noptions(radian.browse_prompt = \"\\033[0;33mBrowse[{}]>\\033[0m \")\n\n# show vi mode state when radian.editing_mode is `vi`\noptions(radian.show_vi_mode_prompt = TRUE)\noptions(radian.vi_mode_prompt = \"\\033[34m[{}]\\033[0m \")\n\n# stderr color format\noptions(radian.stderr_format = \"\\033[0;31m{}\\033[0m\")\n\n# suppress the loading message for reticulate\noptions(radian.suppress_reticulate_message = FALSE)\n# enable reticulate prompt and trigger `~`\noptions(radian.enable_reticulate_prompt = TRUE)\n```\n\n### Custom key bindings\n\n```r\n# allows user defined shortcuts, these keys should be escaped when send through the terminal.\n# In the following example, `esc` + `-` sends `<-` and `esc` + `m` sends `%>%`.\n# Note that in some terminals, you could mark `alt` as `escape` so you could use `alt` + `-` instead.\noptions(radian.escape_key_map = list(\n list(key = \"-\", value = \" <- \"),\n list(key = \"m\", value = \" %>% \")\n))\n```\n\n## FAQ\n\n#### How to specify R_HOME location\n\nIf _radian_ cannot locate the installation of R automatically. The best option is to expose the R binary to the system `PATH` variable. \n\nIn Linux/macOS, you could also export the environment variable `R_HOME`. For example,\n```sh\n$ export R_HOME=/usr/local/lib/R\n$ radian\n```\n\nPlease also make sure that R was installed with the R shared library `libR.so` or `libR.dylib` or `libR.dll`. On Linux, the flag `--enable-R-shlib` may be needed to install R from the source.\n\n\n#### how to use local history file\n\n_radian_ maintains its own history file `.radian_history` and doesn't use the `.Rhistory` file. A local `.radian_history` is used if it is found in the launching directory. Otherwise, the global history file `~/.radian_history` would be used. To override the default behavior, you could launch _radian_ with the options: `radian --local-history`, `radian --global-history` or `radian --no-history`.\n\n\n#### Does it slow down my R program?\n\n_radian_ only provides a frontend to the R program, the actual running eventloop is the same as that of the traditional R console. There is no performance sacrifice (or gain) while using this modern command line interface. \n\n#### Nvim-R support\n\nPut\n```vim\nlet R_app = \"radian\"\nlet R_cmd = \"R\"\nlet R_hl_term = 0\nlet R_args = [] \" if you had set any\nlet R_bracketed_paste = 1\n```\nin your vim config. \n\n\n#### `reticulate` Auto Completions\n\nTo enable reticulate prompt completions, make sure that `jedi` is installed.\n\n```sh\npip install jedi\n```\n\n#### Readline Error\n\n```\nlibreadline.so.6: undefined symbol: PC\n```\n\nIt may occurr if python and R use different two versions of `libreadline`. You could try preloading a version of `libreadline.so` first, e.g.,\n\n```\nenv LD_PRELOAD=/lib64/libreadline.so.6 radian\n```\n\n#### `setTimeLimit` not working\n\n_radian_ utilizes the function `setTimeLimit` to set timeout for long completion. Users may notice that `setTimeLimit` is not working under the\nglobal environment. A workaround is to put the code inside a block or a function,\n\n```r\n{\n setTimeLimit(1)\n while(1) {}\n setTimeLimit()\n}\n```\n\n#### Prompt not shown inside a docker container\n\nIt maybe caused by the invalid terminal size, try running `stty size` in your terminal\nto see if it returns a correct size. You could change the values of it from the environmental variables\n`$COLUMNS` and `$LINES` when you log-in the docker container.\n\n```\ndocker exec -it bash -c \"stty cols $COLUMNS rows $LINES && bash\"\n```\n\n## Why called _radian_?\n\n_radian_ is powered by (\u03c0)thon.\n\n## Credits\n\n_radian_ wouldn't be possible without the creative work [prompt_toolkit](https://github.com/jonathanslenders/python-prompt-toolkit/) by Jonathan Slenders.", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/randy3k/radian", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "radian", "package_url": "https://pypi.org/project/radian/", "platform": "", "project_url": "https://pypi.org/project/radian/", "project_urls": { "Homepage": "https://github.com/randy3k/radian" }, "release_url": "https://pypi.org/project/radian/0.4.2/", "requires_dist": null, "requires_python": "", "summary": "A 21 century R console", "version": "0.4.2" }, "last_serial": 5953175, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "cb24b569043266f5a8594fa633111a34", "sha256": "2152837ac3d72bc9b523c5aa35679f15696785c1f48183a45a86845059a7315a" }, "downloads": -1, "filename": "radian-0.0.1.tar.gz", "has_sig": false, "md5_digest": "cb24b569043266f5a8594fa633111a34", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20560, "upload_time": "2018-12-18T02:06:25", "url": "https://files.pythonhosted.org/packages/68/79/083c46079eb01931558cbdeb9de8701e2382e0135c0dfc31594782fd0240/radian-0.0.1.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "2a830dd049516f3e7110e28c57fe6b83", "sha256": "87b137fa011e958a651e656e955da8cfe6a1f74f4440d6bea729f203adcebb83" }, "downloads": -1, "filename": "radian-0.3.0.tar.gz", "has_sig": false, "md5_digest": "2a830dd049516f3e7110e28c57fe6b83", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20805, "upload_time": "2018-12-18T22:03:16", "url": "https://files.pythonhosted.org/packages/e1/6f/ab595f7b8843df466d3ec3ec98d102e53049517a4e5b3d735f6ac1a2fa86/radian-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "2fbeb7b282828e5bb8f06dafece0aec0", "sha256": "1cdf4e1f2b150c8c9c5eee4643cb2e2edd22fd79195c3908aa4a23ca9a79c174" }, "downloads": -1, "filename": "radian-0.3.1.tar.gz", "has_sig": false, "md5_digest": "2fbeb7b282828e5bb8f06dafece0aec0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20656, "upload_time": "2018-12-28T03:31:52", "url": "https://files.pythonhosted.org/packages/23/28/0068f74df61487cb7c8f9974d1771b4cf3f156fe4c6e90132ba0ed71bef6/radian-0.3.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "7de951a0408872822510d563935ffde3", "sha256": "b392445d28c68581e0df0cb43f7f6dc88a89eb732dbaaa8088aa67af39819b6c" }, "downloads": -1, "filename": "radian-0.3.2.tar.gz", "has_sig": false, "md5_digest": "7de951a0408872822510d563935ffde3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 20816, "upload_time": "2019-02-25T21:28:54", "url": "https://files.pythonhosted.org/packages/4f/d3/3849e53e7a3519fb75eb6bec056e0d67204020a3613244828789d7f7c86e/radian-0.3.2.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "93e543a02e47142fad2866ab9d761554", "sha256": "606de0c7f54329c3a4f637da644c9db1a64b3820e65ee4adcffee0081891f90b" }, "downloads": -1, "filename": "radian-0.3.3.tar.gz", "has_sig": false, "md5_digest": "93e543a02e47142fad2866ab9d761554", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21470, "upload_time": "2019-03-08T19:57:41", "url": "https://files.pythonhosted.org/packages/14/dd/0c9d568c793f2304046cde54ae5127a8701548f05fc550c50f2dcfa5acba/radian-0.3.3.tar.gz" } ], "0.3.4": [ { "comment_text": "", "digests": { "md5": "c562b0aa4c8cf353ef70c9bf09653351", "sha256": "71f8cb25b34c1a349e81d1873f9446a3dd9daa9292fb649f3f09eb765f274706" }, "downloads": -1, "filename": "radian-0.3.4.tar.gz", "has_sig": false, "md5_digest": "c562b0aa4c8cf353ef70c9bf09653351", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21386, "upload_time": "2019-03-12T18:15:56", "url": "https://files.pythonhosted.org/packages/22/c9/b220cb2edb8de9b59bb8cdf54ce729238f3aea3284a2b5ec136d2da84b84/radian-0.3.4.tar.gz" } ], "0.4.0": [ { "comment_text": "", "digests": { "md5": "9bf7660896e960dc9428d3a568caeb0e", "sha256": "9d5d1faffa8bdf7cbe02d5979422839c588510ddf345f3ff3610c98e64023971" }, "downloads": -1, "filename": "radian-0.4.0.tar.gz", "has_sig": false, "md5_digest": "9bf7660896e960dc9428d3a568caeb0e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 21585, "upload_time": "2019-05-12T23:03:51", "url": "https://files.pythonhosted.org/packages/69/91/ba68d2e3c042571a83ae90a4c516ec88636c739db92c1c77d1f79ac1dc51/radian-0.4.0.tar.gz" } ], "0.4.0.dev0": [ { "comment_text": "", "digests": { "md5": "bb65bfdaf3ba33b2c691f354cecaae93", "sha256": "d71cb3bf7588ea85e0382f28789ffc4f3c8123f761e6baea7c3958ee6b9696ca" }, "downloads": -1, "filename": "radian-0.4.0.dev0.tar.gz", "has_sig": false, "md5_digest": "bb65bfdaf3ba33b2c691f354cecaae93", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 19388, "upload_time": "2019-05-01T04:58:22", "url": "https://files.pythonhosted.org/packages/5b/de/c2cef4c4c5b7c9e93f05003cc55a68ab766d3a63dba5dabad35383916d17/radian-0.4.0.dev0.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "45f5b7a086f6734e27d5a21fb887f655", "sha256": "2efb10cc7bb2dbfc136a618d869b125cfe7004587eab8dfd94d5024562889ccb" }, "downloads": -1, "filename": "radian-0.4.1.tar.gz", "has_sig": false, "md5_digest": "45f5b7a086f6734e27d5a21fb887f655", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 23874, "upload_time": "2019-09-17T10:10:35", "url": "https://files.pythonhosted.org/packages/a6/eb/6f208a5e222b1563f4951f409582739a7be3e96a864840d729a839be3118/radian-0.4.1.tar.gz" } ], "0.4.2": [ { "comment_text": "", "digests": { "md5": "2f71b737a7e4e188738bcbe4e4169f54", "sha256": "6041a96c80ecf118176307c7dd691e7ed2e86b61b6c77b55951ab0ccdae8e6e6" }, "downloads": -1, "filename": "radian-0.4.2.tar.gz", "has_sig": false, "md5_digest": "2f71b737a7e4e188738bcbe4e4169f54", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24037, "upload_time": "2019-10-10T05:24:49", "url": "https://files.pythonhosted.org/packages/dc/65/208125032698bbc53064537abaca3a7e63e1a62add2c42055a764b7ae099/radian-0.4.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2f71b737a7e4e188738bcbe4e4169f54", "sha256": "6041a96c80ecf118176307c7dd691e7ed2e86b61b6c77b55951ab0ccdae8e6e6" }, "downloads": -1, "filename": "radian-0.4.2.tar.gz", "has_sig": false, "md5_digest": "2f71b737a7e4e188738bcbe4e4169f54", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 24037, "upload_time": "2019-10-10T05:24:49", "url": "https://files.pythonhosted.org/packages/dc/65/208125032698bbc53064537abaca3a7e63e1a62add2c42055a764b7ae099/radian-0.4.2.tar.gz" } ] }