rgui

Autosave R sources in RGui

拟墨画扇 提交于 2020-01-05 02:57:12
问题 Is it possible to tell RGui to autosave the *.R sources, so that they don't get lost in case of system crash? I miss this feature a lot since my system crashes now and then and I don't want to work with R-Studio or some other IDEs just because I need this feature... I like simplicity provided by RGui. 来源: https://stackoverflow.com/questions/28428038/autosave-r-sources-in-rgui

How can I set Rgui.exe for backward search

大兔子大兔子 提交于 2019-12-11 06:43:36
问题 If you use Rterm.exe , a nice feature is that: CTRL+R : backward search meaning CTRL+R+lib will show last command starting with lib like library(Rcpp) Rgui.exe seems to lack this feature. Can I add it somehow ?? I use Windows 7 , and changing is not an option. 回答1: This is what Brian Ripley had to say about this request (albeit 6 years ago): "https://stat.ethz.ch/pipermail/r-help/2006-February/087540.html" 来源: https://stackoverflow.com/questions/15073114/how-can-i-set-rgui-exe-for-backward

how to change line length on Rterm.exe

☆樱花仙子☆ 提交于 2019-12-10 13:24:38
问题 I am using R 2.15.2 on windows XP . I was used to use Rgui.exe but it was lacking the UNIX standards I like to use like CTRL+R <=>backward research and CTRL+U <=>erase line ... If I missed something please tell me ! Then I tried Rterm.exe (which looks identical to R.exe to me) which has all those nice features. I found how to tune it right clicking on the top of the window to set height-width (it is like tuning the window you get from cmd.exe ). The problem is that now I cannot see on the

How to suppress output in RStudio?

风流意气都作罢 提交于 2019-12-10 12:38:56
问题 I need to suppress my output when I run my R scripts in RStudio. There are a lot of comments in my scripts, and the comments are printed when I run the file. I realize that others have asked how to do this from the command prompt - How to suppress output. I'm not interested in that. I just want to know how to suppress the output in RStudio. The only exception to this should be print statements. Thanks in advance. 回答1: Use source instead of source with echo in R Studio. Same in MAC. 回答2: Ctrl

How do I superimpose a frequency polygon on top of a histogram in R?

梦想的初衷 提交于 2019-12-08 03:22:08
问题 Here is the code I used in R (using RGui 64-bit, R ver. 3.3.1) to plot a histogram of data along with a frequency polygon. I am not using ggplot2. How can I superimpose the frequency polygon on top of the histogram so that I don't have to do two separate graphs? That is, I want the histogram plotted, with the frequency polygon overlaid on top of it. # declare your variables data <- c(10, 7, 8, 4, 5, 6, 6, 9, 5, 6, 3, 8, + 4, 6, 10, 5, 9, 7, 6, 2, 6, 5, 4, 8, 7, 5, 6) # find the range range

Configure fix() and edit() to open in Notepad++ from R/RStudio

旧城冷巷雨未停 提交于 2019-12-07 03:01:07
问题 When I do this in RStudio or RGUI: fix(SomeFunction) (or using edit() ) I can see the function's code in Notepad. Is there any way that I could change this so that the code preview opens in Notepad++ rather than plain old Notepad? And similarly, is there anyway that I could force View(SomeDataFrame) to open up in Excel? 回答1: fix and edit functions invoke the editor defined in the "editor" argument. By default, that argument is set to getOption('editor') as shown in the edit function

Configure fix() and edit() to open in Notepad++ from R/RStudio

只愿长相守 提交于 2019-12-05 07:35:01
When I do this in RStudio or RGUI: fix(SomeFunction) (or using edit() ) I can see the function's code in Notepad. Is there any way that I could change this so that the code preview opens in Notepad++ rather than plain old Notepad? And similarly, is there anyway that I could force View(SomeDataFrame) to open up in Excel? fix and edit functions invoke the editor defined in the "editor" argument. By default, that argument is set to getOption('editor') as shown in the edit function documentation . Therefore, you can either pass the notepad++ path as function argument, i.e. : path <- "C:\\Program

R + Apache? Interactive R graphs and fast collaboration over internet

落花浮王杯 提交于 2019-12-01 14:53:21
I need GUI vizualiser that shows R graphs with tickers and such things in RStudio style but over the internet (and notice with commandline access, not in RStudio). I hope an easy browser based solution, running Apache server. How can I fast show some of my projects or graphs in an interactive way to my collegue (not necessarily technically-savy)? hhh RApache is probably something you are looking for, here . You can find an example code here . I haven't tested it yet but it may be useful. Older stuff I found the below material for some odd reason for this. I leave it here to get more refined.

R + Apache? Interactive R graphs and fast collaboration over internet

走远了吗. 提交于 2019-12-01 12:26:54
问题 I need GUI vizualiser that shows R graphs with tickers and such things in RStudio style but over the internet (and notice with commandline access, not in RStudio). I hope an easy browser based solution, running Apache server. How can I fast show some of my projects or graphs in an interactive way to my collegue (not necessarily technically-savy)? 回答1: RApache is probably something you are looking for, here. You can find an example code here. I haven't tested it yet but it may be useful. Older

Import multiline SQL query to single string

半世苍凉 提交于 2019-11-29 23:13:34
In R , how can I import the contents of a multiline text file (containing SQL) to a single string? The sql.txt file looks like this: SELECT TOP 100 setpoint, tph FROM rates I need to import that text file into an R string such that it looks like this: > sqlString [1] "SELECT TOP 100 setpoint, tph FROM rates" That's so that I can feed it to the RODBC like this > library(RODBC) > myconn<-odbcConnect("RPM") > results<-sqlQuery(myconn,sqlString) I've tried the readLines command as follows but it doesn't give the string format that RODBC needs. > filecon<-file("sql.txt","r") > sqlString<-readLines