I often need to import data into R using the read.table command, but
my data files have header and footer information which shouldn't be
parsed by read.table. Here is a script which takes selected lines
from the active document and imports them to R using read.table:
-----
header_row_grep_text="run"
ignore_lines_at_end=2
# Find the header row, which always (and uniquely) contains the text
specified above.
X=`grep -n $header_row_grep_text $TM_FILEPATH | cut -f1 -d:`
# Determine the number of lines in file.
Y=`wc -l $TM_FILEPATH | cut -c 1-8`
# Tell R to read the data in this file, starting with line X which
has the variable names.
osascript -e 'tell application "R" to activate' -e "tell application
\"R\" to cmd \"data <- read.table(\\\"$TM_FILEPATH\\\", header=TRUE,
sep=\\\",\\\", skip=`expr $X - 1`, nrows=`expr $Y - $X -
$ignore_lines_at_end`)\""
-----
I have a more detailed explanation here: http://love.agent.ie/
articles/2006/07/02/sending-simulation-output-to-r
-Ana
Here is a slight modification of one of the R Bundle commands which
lets you send a file to be processed the R GUI. I started with the
built-in “Send selection to R” which looks like this:
osascript -e 'tell application "R" to activate' -e "tell application
\"R\" to cmd \"${TM_SELECTED_TEXT//\"/\\\"}\""
I replaced $TM_SELECTED_TEXT with source("$TM_FILEPATH"):
osascript -e 'tell application "R" to activate' -e "tell application
\"R\" to cmd \"source(\\\"$TM_FILEPATH\\\")\""
I have a more detailed explanation here: http://love.agent.ie/
articles/2006/07/02/passing-scripts-to-the-r-gui
-Ana
Hi all,
How are you guys managing svn properties while using TextMate?
Currently I drop back to the command line which is a tad
inconvenient. I haven't seen any way to modify properties from within
textmate, is there a way?
If not, what have you found to be an efficient way of modifying SVN
properties on version controlled files?
Thanks,
Luke.
The help file says ...
it is imperative that you set up the variable TM_GTD_CONTEXT to hold a
space-separated list of all the context you want to be using.
I'm sure how one does this must be obvious, since so many people are using
the (nice looking) bundle. Unfortunately, I'm one of those for whom the
obvious is sometimes obscure. How and where does one set up the variable?
Please?
Lewy
Hi Haris,
Thanks for your reply. For the heck of it I changed the output for
"Show All Next For Context" to New Document so I could see the HTML
it's generating, and noticed that the table does not specify a
class=grayscale (or any other).
Not sure if it's related but I'm also getting these error messages:
1) "Review" displays
"/tmp/temp_textmate.pg8Yyt:7: undefined method `process_directory' for
GTD:Module (NoMethodError)"
2) "Project Statistics" displays
"/tmp/temp_textmate.P7UfrN:4:in `require': No such file to load --
lib/dialog (LoadError) from /tmp/temp_textmate.P7UfrN:4"
FWIW, here's what "Show All for Context" looks for me:
http://nkvt.com/images/GTDAlt_screenshot.jpg
Many thanks for any help you can offer,
- Dave
> On Jul 1, 2006, at 9:27 AM, Charilaos Skiadas wrote:
>
> The GTDAlt bundle indeed uses the default.css file that lives in
> $TM_SUPPORT_PATH/css/default.css
> More particularly, the table has class="grayscale". Not sure why
> your changes were not visible.
> I've thought of allowing custom css files, but it hasn't happened yet.
>
> Haris