Publications by datadebrief
EmEditor Professional as an R script editor
R is not supported “out of the box” by EmEditor, so here’s a few tips I’ve found for using it as a great editor for R.Code Syntax highlighting Executing R scripts and capturing outputUse ctags symbols to navigate files.If you create packages for CRAN or like neat code, you might like to use a macro to tidy it up. Getting the ...
3804 sym R (325 sym/1 pcs) 2 img
Auto-complete for R in EmEditor
This will work for any language you have a syntax file for, but I’ll use R as the example.1. Open an R file, and on the plugins menu, click “Word Complete”2. Type a couple of letters e.g. rn and then press ctrl+space (default word suggest keyboard combination) and hopefully an auto-suggest popup menu will appear.3. If nothing seems to happ...
1185 sym 6 img
Plotting time vs date in R
Having done the plot with python+matplotlib, thought I would have a go reproducing it in R, using only the builtin “plot”. So, just to recap – this is a plot of the sun times (rise/set,twilight and blinding) as generated by the great python library pyephem. The R code reads in a csv file as output from a modified version of the ...
1009 sym R (5634 sym/3 pcs) 2 img
EmEditor R code macro – Almost interactive R development for Emeditor
Get the new macro now hosted on githubEdit 18th Jan 2011: The below text refers to the old version of the macro and is no longer relevant, a new post will describe the new macro, and it is also documented on the github site.As a follow up to the earlier post regarding Emeditor Professional as an editor for R development, I have updated the sc...
2255 sym
Ascii code table in R
A quick method to enumerate the printable ascii characters with their hex & decimal values.The following code relies on taking the “raw” value of a base 10 int (this gives a hex value), and then using the builtin function rawToChar, which gives a character. You can of course change the range (up to 255). Not sure and haven’t tes...
1081 sym R (1414 sym/4 pcs)
10 R One Liners to Impress Your Friends
Following the trend of one liners for various languages (Haskell, Scala, Python), here’s some examples in RMultiply Each Item in a List by 2#lists lapply(list(1:4),function(n){n*2}) # otherwise (1:4)*2 Sum a List of Numbers#lists lapply(list(1:4),sum) # otherwise sum(unlist(list(1:4))) # or simply sum(1:4) Verify if Exists in a S...
761 sym R (1230 sym/10 pcs)