Re: [R] Do you keep an archive of "useful" R code? and if so - how?
I 've used tiddlywiki a personal notebook for other things but not for R. It may be useful to write a css that separates out code from description. http://www.tiddlywiki.com/ On 22 Nov 2009, at 11:53AM, Tal Galili wrote: Hello all, When using R for some time, one comes across more and more useful functions. But naturally we can't remember all of them, so I imagine some of you save these snippets of code. My question to you is how do you manage that code? Do you use special software, or archiving system? Any advice is welcomed. Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com/ (English) -- [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Do you keep an archive of "useful" R code? and if so - how?
Hello, I do keep a blog with R and non R related "snippets" of code. Besides that, something like Alfresco, Plone or other document management systems could be useful. Maybe the solution is too complex for a single user, but you can keep tags and other kind of metadata attached to your code and you would have an integrated search engine. Best regards, Carlos J. Gil Bellosta http://www.datanalytics.com Tal Galili wrote: Hello all, When using R for some time, one comes across more and more useful functions. But naturally we can't remember all of them, so I imagine some of you save these snippets of code. My question to you is how do you manage that code? Do you use special software, or archiving system? Any advice is welcomed. Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com/ (English) -- [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Do you keep an archive of "useful" R code? and if so - how?
I accidentally sent this directly to the author and didn't reply to the whole list, I am sorry, I need to remember to hit reply all instead of reply to the R help list, heres my message: I keep a separate R file of code I commonly use but more generic. So if I am making contingency tables I say: ftable(category, category[top]) or if I am wanting to subset data: subset2$X5<-recode(subset2$X5, "6:10=1:5") things like that, generic code that I can refer to and include my variables in as necessary (as you can tell the "top" mark I made in ftable isn't in the code but reminds me how the table structures itself. Since I am a newbie at R I am still keeping notes, I do this for importing things, also graphics: xyplot(value~X1,data=subset1,groups=factor(X2), type=c("b","g"),ylim=c(0,1),xlim=c(1,5),lwd=1,cex = 1, plot.points = TRUE,auto.key = list(points = TRUE,lines = TRUE, space = "inside"), label.curves=FALSE,xlab = "x axis title", ylab = " y axis title ") so it just lets me organize my codes on my local system. R wiki is ok, but will be much better as people expand it, I am sure very soon it will grow exponentially as a good resource. (as you can tell some of the code I save includes old variable names instead of neutral ones, but easy enough to change). Joe King 206-913-2912 j...@joepking.com "Never throughout history has a man who lived a life of ease left a name worth remembering." --Theodore Roosevelt -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Tal Galili Sent: Sunday, November 22, 2009 10:31 AM To: Marc Schwartz Cc: r-help@r-project.org; Barry Rowlingson; jeff.la...@noaa.gov Subject: Re: [R] Do you keep an archive of "useful" R code? and if so - how? Marc and Barry, many thanks for your detailed answers. Marc - I thank you for the links and ideas. Thanks to your advice I will look more into SVN in the future, although it sounds on the surface to require some learning curve, so It could take me some time to start using it. Barry - I am actually a blog builder in my side profession, I already built myself a blog called: r-statistics.com On which I intend to put up good code I will come across. The problem with it though is that I don't see blogs as a good information management system. Since on a blog one is open to the public and doesn't want to leave half scribles of thoughts (which IS what ends up happening when managing snippets of code). Also, blogging is not build for easy hierarchical ordering. The idea of a wiki is more appealing. BTW - another suggestion I got was using MS onenote. Although it is not open source (which is my preference as well), I understood it offers a powerful solution. I hope more people will share how they manage their snippets of code. Best to all of you, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com/ (English) -- On Sun, Nov 22, 2009 at 8:09 PM, Marc Schwartz wrote: > Tal, > > I would still use Subversion. > > Think of Subversion as as an electronic filing system. You can organize > code into project trees, with sub-folders and so forth. > > As you come across code snippets that you want to save, copy them to a file > and commit the file to a project tree or sub-folder, based upon the domain > of functionality. Add related code snippets to the same domains. That way, > you have related code snippets in a common area, making recall easier. > > The advantage of using a VCS is that you can make trackable modifications > to the code over time, as your functional requirements change or as you > discover bugs, etc. to existing code. > > In terms of a GUI, for Windows, it seems that most use Tortoise SVN: > > http://tortoisesvn.net/ > > There are cross-platform GUIs such as RapidSVN ( > http://rapidsvn.tigris.org/), but it all depends upon personal > preferences. More links here: > > http://subversion.tigris.org/links.html#all-clients > > There are also Subversion extensions for editors, such as Emacs, like > psvn.el (http://www.xsteve.at/prg/vc_svn/) which enable a blending of > functionality into environments that you may already be using, such as ESS. > > Last but not least, there are also commercial variants of Subversion > clients, which of course have a cost associated with them. These are also > listed on the clients link above. > > An alternative would be to create a local wiki, the implementation details, > as with a Subversion repo, would be dependent upon wheth
Re: [R] Do you keep an archive of "useful" R code? and if so - how?
> Marc - > I thank you for the links and ideas. Thanks to your advice I will look more > into SVN in the future, although it sounds on the surface to require some > learning curve, so It could take me some time to start using it. If you consider investing time to learn a version control system, I would recommend looking into a distributed one. - Personally I use git. http://git-scm.com/ is a good start, http://www.github.com can be used to store code 'in the cloud'. Cheers, Hans-Peter __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Do you keep an archive of "useful" R code? and if so - how?
Marc and Barry, many thanks for your detailed answers. Marc - I thank you for the links and ideas. Thanks to your advice I will look more into SVN in the future, although it sounds on the surface to require some learning curve, so It could take me some time to start using it. Barry - I am actually a blog builder in my side profession, I already built myself a blog called: r-statistics.com On which I intend to put up good code I will come across. The problem with it though is that I don't see blogs as a good information management system. Since on a blog one is open to the public and doesn't want to leave half scribles of thoughts (which IS what ends up happening when managing snippets of code). Also, blogging is not build for easy hierarchical ordering. The idea of a wiki is more appealing. BTW - another suggestion I got was using MS onenote. Although it is not open source (which is my preference as well), I understood it offers a powerful solution. I hope more people will share how they manage their snippets of code. Best to all of you, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com/ (English) -- On Sun, Nov 22, 2009 at 8:09 PM, Marc Schwartz wrote: > Tal, > > I would still use Subversion. > > Think of Subversion as as an electronic filing system. You can organize > code into project trees, with sub-folders and so forth. > > As you come across code snippets that you want to save, copy them to a file > and commit the file to a project tree or sub-folder, based upon the domain > of functionality. Add related code snippets to the same domains. That way, > you have related code snippets in a common area, making recall easier. > > The advantage of using a VCS is that you can make trackable modifications > to the code over time, as your functional requirements change or as you > discover bugs, etc. to existing code. > > In terms of a GUI, for Windows, it seems that most use Tortoise SVN: > > http://tortoisesvn.net/ > > There are cross-platform GUIs such as RapidSVN ( > http://rapidsvn.tigris.org/), but it all depends upon personal > preferences. More links here: > > http://subversion.tigris.org/links.html#all-clients > > There are also Subversion extensions for editors, such as Emacs, like > psvn.el (http://www.xsteve.at/prg/vc_svn/) which enable a blending of > functionality into environments that you may already be using, such as ESS. > > Last but not least, there are also commercial variants of Subversion > clients, which of course have a cost associated with them. These are also > listed on the clients link above. > > An alternative would be to create a local wiki, the implementation details, > as with a Subversion repo, would be dependent upon whether or not you are > the only person that needs access or if access and/or content modification > are to be shared. > > HTH, > > Marc > > On Nov 22, 2009, at 11:45 AM, Tal Galili wrote: > > Hello Marc and Jeff, > Thank you for replying. > > I am using winXP, and any recommendation for GUI based system will be > welcomed. > > However, my initial question was not how to maintain code that I write > and develop, but rather how to keep a "filing system" for other peoples code > that I find useful. > Here are some simple examples: > >- A code to allow me to start a window with "history" recording turned >on. >- A code to have wider margins so to allow more space for the plot >labels. >- A code for creating an ellipse plot of a matrix of correlations. > > All of these example are things I wouldn't put into a Subversion system or > a new package. > > I hope my question was made more clear, and your answer will be much > appreciated. > > Best, > Tal > > > On Sun, Nov 22, 2009 at 7:13 PM, Marc Schwartz wrote: > >> On Nov 22, 2009, at 10:53 AM, Tal Galili wrote: >> >> Hello all, >>> >>> When using R for some time, one comes across more and more useful >>> functions. >>> But naturally we can't remember all of them, so I imagine some of you >>> save >>> these snippets of code. >>> My question to you is how do you manage that code? >>> Do you use special software, or archiving system? >>> >>> Any advice is welcomed. >>> >>> Tal >>> >> >> >> One word: Subversion (http://subversion.tigris.org/) >> >> A version control system is a critical part of any code management >> process. >> >> If you or other users may not be comfortable at the command line using it, >> there are a plethora of GUI based clients for Subversion available depending >> upon the operating systems you are using. >> >> HTH, >> >> Marc Schwartz >> >> > > [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat
Re: [R] Do you keep an archive of "useful" R code? and if so - how?
Tal, I would still use Subversion. Think of Subversion as as an electronic filing system. You can organize code into project trees, with sub-folders and so forth. As you come across code snippets that you want to save, copy them to a file and commit the file to a project tree or sub-folder, based upon the domain of functionality. Add related code snippets to the same domains. That way, you have related code snippets in a common area, making recall easier. The advantage of using a VCS is that you can make trackable modifications to the code over time, as your functional requirements change or as you discover bugs, etc. to existing code. In terms of a GUI, for Windows, it seems that most use Tortoise SVN: http://tortoisesvn.net/ There are cross-platform GUIs such as RapidSVN (http://rapidsvn.tigris.org/ ), but it all depends upon personal preferences. More links here: http://subversion.tigris.org/links.html#all-clients There are also Subversion extensions for editors, such as Emacs, like psvn.el (http://www.xsteve.at/prg/vc_svn/) which enable a blending of functionality into environments that you may already be using, such as ESS. Last but not least, there are also commercial variants of Subversion clients, which of course have a cost associated with them. These are also listed on the clients link above. An alternative would be to create a local wiki, the implementation details, as with a Subversion repo, would be dependent upon whether or not you are the only person that needs access or if access and/or content modification are to be shared. HTH, Marc On Nov 22, 2009, at 11:45 AM, Tal Galili wrote: > Hello Marc and Jeff, > Thank you for replying. > > I am using winXP, and any recommendation for GUI based system will > be welcomed. > > However, my initial question was not how to maintain code that I > write and develop, but rather how to keep a "filing system" for > other peoples code that I find useful. > Here are some simple examples: > A code to allow me to start a window with "history" recording turned > on. > A code to have wider margins so to allow more space for the plot > labels. > A code for creating an ellipse plot of a matrix of correlations. > All of these example are things I wouldn't put into a Subversion > system or a new package. > > I hope my question was made more clear, and your answer will be much > appreciated. > > Best, > Tal > On Sun, Nov 22, 2009 at 7:13 PM, Marc Schwartz > wrote: > On Nov 22, 2009, at 10:53 AM, Tal Galili wrote: > > Hello all, > > When using R for some time, one comes across more and more useful > functions. > But naturally we can't remember all of them, so I imagine some of > you save > these snippets of code. > My question to you is how do you manage that code? > Do you use special software, or archiving system? > > Any advice is welcomed. > > Tal > > > One word: Subversion (http://subversion.tigris.org/) > > A version control system is a critical part of any code management > process. > > If you or other users may not be comfortable at the command line > using it, there are a plethora of GUI based clients for Subversion > available depending upon the operating systems you are using. > > HTH, > > Marc Schwartz > > [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Do you keep an archive of "useful" R code? and if so - how?
On Sun, Nov 22, 2009 at 5:45 PM, Tal Galili wrote: > Hello Marc and Jeff, > Thank you for replying. > > I am using winXP, and any recommendation for GUI based system will be > welcomed. > > However, my initial question was not how to maintain code that I write > and develop, but rather how to keep a "filing system" for other peoples code > that I find useful. > Here are some simple examples: > > - A code to allow me to start a window with "history" recording turned > on. > - A code to have wider margins so to allow more space for the plot > labels. > - A code for creating an ellipse plot of a matrix of correlations. > > All of these example are things I wouldn't put into a Subversion system or a > new package. I just use plain text files for keeping notes - generally each project directory I work on has a 'notes.txt' file which is a working log of what I'm doing. If I think 'how did I do that the other day?' I can search my text files. Recently I've been experimenting with using 'personal' or 'desktop' wiki systems for this. Like Wikipedia but just for you, and stored as files on your PC, and edited with a local client program instead of over the web (although some personal wikis work over the web). I've found 'zim' to be pretty good for this. It organises notes, lets you link pages, timestamps things, has various plugins and MOST importantly it's Open Source so you won't ever have your notes locked up in a proprietary format that you need to keep paying a license fee for. Not sure if there's a Windows port of it, but I'm certain similar systems exist for Windows. Another idea is to have a public blog for R tips and tricks. That way not only do you get free storage (from blogspot.com or some other blog provider) but also it's searchable and other people can find it and comment and improve on it. Or you could contribute to the R-wiki: http://wiki.r-project.org/rwiki/doku.php?id=tips:tips Barry __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Do you keep an archive of "useful" R code? and if so - how?
Hello Marc and Jeff, Thank you for replying. I am using winXP, and any recommendation for GUI based system will be welcomed. However, my initial question was not how to maintain code that I write and develop, but rather how to keep a "filing system" for other peoples code that I find useful. Here are some simple examples: - A code to allow me to start a window with "history" recording turned on. - A code to have wider margins so to allow more space for the plot labels. - A code for creating an ellipse plot of a matrix of correlations. All of these example are things I wouldn't put into a Subversion system or a new package. I hope my question was made more clear, and your answer will be much appreciated. Best, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com/ (English) -- On Sun, Nov 22, 2009 at 7:13 PM, Marc Schwartz wrote: > On Nov 22, 2009, at 10:53 AM, Tal Galili wrote: > > Hello all, >> >> When using R for some time, one comes across more and more useful >> functions. >> But naturally we can't remember all of them, so I imagine some of you save >> these snippets of code. >> My question to you is how do you manage that code? >> Do you use special software, or archiving system? >> >> Any advice is welcomed. >> >> Tal >> > > > One word: Subversion (http://subversion.tigris.org/) > > A version control system is a critical part of any code management process. > > If you or other users may not be comfortable at the command line using it, > there are a plethora of GUI based clients for Subversion available depending > upon the operating systems you are using. > > HTH, > > Marc Schwartz > > [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Do you keep an archive of "useful" R code? and if so - how?
On Nov 22, 2009, at 10:53 AM, Tal Galili wrote: Hello all, When using R for some time, one comes across more and more useful functions. But naturally we can't remember all of them, so I imagine some of you save these snippets of code. My question to you is how do you manage that code? Do you use special software, or archiving system? Any advice is welcomed. Tal One word: Subversion (http://subversion.tigris.org/) A version control system is a critical part of any code management process. If you or other users may not be comfortable at the command line using it, there are a plethora of GUI based clients for Subversion available depending upon the operating systems you are using. HTH, Marc Schwartz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Do you keep an archive of "useful" R code? and if so - how?
Hello all, When using R for some time, one comes across more and more useful functions. But naturally we can't remember all of them, so I imagine some of you save these snippets of code. My question to you is how do you manage that code? Do you use special software, or archiving system? Any advice is welcomed. Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com/ (English) -- [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.