Auto-completion in Notepad++ for R Script | /en/2010/08/auto-completion-in-notepad-for-r-script/
Auto-completion in Notepad++ for R Script
https://yihui.org/en/2010/08/auto-completion-in-notepad-for-r-script/
https://yihui.org/en/2010/08/auto-completion-in-notepad-for-r-script/
Guest *agri521'blog* @ 2010-08-15 08:22:26 originally posted:
Thanks a lot. Here it is.
Guest *Werner* @ 2010-08-15 17:05:31 originally posted:
Hi there,
Thanks for your work for creating this Notepad++ script. I have now have auto-completion for all the different packages i use. Keep up the great work.
Greetings,
Werner
Guest *Tal Galili* @ 2010-08-15 20:10:43 originally posted:
You beat me to writing this :)
Good post.
Cheers,
Tal
Guest *lee* @ 2010-08-15 21:05:40 originally posted:
Nice, but who still uses Windows? (Joking)
This will be sweet for using R at work.
Good work!
Guest *Mike* @ 2010-08-16 03:29:11 originally posted:
Have you considered sending this to the Notepad++ team to include in newer versions?
Thanks for the suggestion! I've submitted a request to them: https://sourceforge.net/tracker/?func=detail&aid=3045837&group_id=95717&atid=612385
Originally posted on 2010-08-16 05:57:18
Guest *Guido* @ 2010-08-16 15:24:11 originally posted:
Maybe the UseR 2010 slides are of some interest: http://user2010.org/slides/Redd.pdf
Thanks! As a matter of fact, I attended his talk there at useR!2010, and that is exactly why I began to use Notepad++ under Windows :)
Originally posted on 2010-08-17 00:01:45
Guest *Phil* @ 2010-08-16 16:46:57 originally posted:
Fantastic!!! Many thanks.
Guest *alessandro* @ 2010-08-16 16:54:08 originally posted:
Thanks for posting this! It's incredibly useful. Some function hints are too long to be displayed on one line (think read.table) , can this be fixed with some n's in the code or does it require a change to notepad++'s code?
Good point. I'm not sure if the line break should be 'n' or '<br />' -- likely to be the latter one, I guess ('cause XML is more similar with HTML, rather than C or R). I'll try when I switch to my Windows system.
Originally posted on 2010-08-17 00:04:15
Hi, I've figured out how to break the long lines now. Both the XML file and R code have been updated in the blog entry above.
Originally posted on 2010-08-18 00:52:40
Guest *TM* @ 2010-08-29 23:50:31 originally posted:
Thanks! This will save me a lot of time since I won't have to look up the documentation when I forget the argument names and order.
Guest *charlie* @ 2010-09-18 05:55:29 originally posted:
hi hihui, most excellent work. thanks a lot for making the file available! (i loved the completion feature in sciviews-k but was struggling with komodo-edit somewhat). charlie.
Guest *liyun* @ 2010-09-19 12:50:11 originally posted:
Just saw this post.... Tried, and it's perfect! Many thanks :)
Guest *W.C Zhu* @ 2010-10-09 07:13:33 originally posted:
Wow,it becomes much more flexible to write R code! Thanks for your great work!
访客 *李青龙* @ 2010-10-12 12:10:02 写道:
EXCELLENT!!!
Guest *JS* @ 2010-10-18 16:20:01 originally posted:
Hi!
Excellent work. However, having trouble setting it up since I converted to 64-bits Win7.
I am getting this error message on my setup when running your script
(Windows 7 64-bit, R 2.12.0 x64)
>Error in file(file, ifelse(append, "a", "w")) :
> cannot open the connection
>In addition: Warning message:
>In file(file, ifelse(append, "a", "w")) :
> cannot open file 'R.xml': Permission denied
It produces the file R.xml, however it doesnt work (maybe the script was stopped prematurely?)
Changing directory with setwd() to e.g. "Desktop" or "Documents" or others still gives permission problems (although these directories have all permissions (read/write).
When using the R.xml supplied on your web site auto-completion works, but that file doesn't include autocompletion for packages such as e.g. ggplot2 and plyr, which I use quite often, so it is of limited value to me.
That's weird. I created the file under 64-bit Win7 too. Can you try the temporary dir? I think that should give you permission to read/write files anyway. E.g. setwd(tempdir()) and run the code above, then go to tempdir() to pick up R.xml.
Originally posted on 2010-10-18 18:32:49
Guest *Brandon Bertelsen* @ 2010-10-18 23:25:05 originally posted:
This is ridiculously useful. Thanks!
Guest *Markus Schuller* @ 2010-11-22 19:56:49 originally posted:
Thank you so very much!
Guest *ygc* @ 2010-12-01 09:24:42 originally posted:
awesome, thanks.
Guest *Manel* @ 2011-01-19 15:48:33 originally posted:
Thanks, it si very usefull, but it is possible to get the hints for S3 methods?
I think it is possible, but I do not have time to implement it. The main part to generate the hints is from the line if (mode(obj) == "function") {. For example, you can extract the arguments of the plot method on the table class:
formals(getS3method('plot', 'table'))
Originally posted on 2011-01-19 20:28:43
Guest *fraggins* @ 2011-02-28 00:11:53 originally posted:
Incredibly useful. Thanks so much!
Guest *Jeffrey Marcus* @ 2011-07-21 20:05:47 originally posted:
auto complete for viariables would be really nice too...
Guest *Antonio* @ 2011-09-10 06:53:36 originally posted:
thank you very much!!
Guest *h* @ 2011-11-16 16:15:44 originally posted:
thanks for the .xml! :)))))
Guest *tensi_med* @ 2011-11-17 23:39:54 originally posted:
thank you! this is really really useful
访客 *小鱼老了* @ 2011-12-15 10:27:17 写道:
very useful,zan
Guest *Guest* @ 2012-04-22 11:19:48 originally posted:
Great!
Guest *imbenzene* @ 2012-05-11 22:51:18 originally posted:
Awesome!! I have been looking for the xml file since weeks.
Guest *Kay Cichini* @ 2012-06-18 08:09:50 originally posted:
This is great!!
Guest *Xisphias* @ 2013-03-05 22:21:58 originally posted:
I have followed your instructions for adding auto completion. I generated the r.xml, copied to the APIs directory and enabled auto-completion and function hints in the settings of npp. I can get the word/function completion to work, but the function parameter hints do not work. Any suggestions on what to do to make the hints work? I just upgraded to Windows7, I had everything working before on XP.
Sorry I have been using the unbeatable RStudio for a long time and have lost interest in other editors. You need to figure it out by yourself, or switch to RStudio which already has everything you need.
Originally posted on 2013-03-06 03:16:41
Guest *Colin* @ 2013-04-11 21:30:13 originally posted:
I saw your comment about using R Studio now, but just wanted to say that I still appreciate this script. I use R studio as well, but still find myself drawn back to the syntax highlighting and general flexibility of Notepad++ for a variety of languages, even more so now with this script. Thanks!
No problem. Please feel free to improve the script :)
Originally posted on 2013-04-12 00:36:51
Sign in to join the discussion
Sign in with GitHub