[ESS] Finding 64-bit R versions on Windows
kevin.r.coombes at gmail.com
Wed Jul 9 14:36:31 CEST 2014
M-x R-newest on Windows (at least on my machine) always finds the newest
I can help test whatever gets developed, but it would certainly be
useful is someone else also tested it!
On 7/9/2014 7:09 AM, Stephen Eglen wrote:
> hi Kevin,
> I think we could add something like this, but as I'm not on Windows, we
> might need some help testing it (+ Rich?). On unix we already have "M-x
> R-newest"; what does that do for you on Windows?
> Perhaps on the mac we also have the choice of 64 or 32 bit? In which
> case we could have a variable like
> (defcustom ess-prefer-64bit t)
> to allow us to set a preference for 64 bit.
> Some help with elisp below:
>> ;; This hack finds the latest 64-bit version.
>> (defun R64 (&optional start-args)
>> "Call the latest 64-bit version of R"
>> (interactive "P")
>> ;; sweep through the list of R-version commands
>> ;; to find the 64-bit ones
>> (defun m64 (target)
>> "remove string '-64bit' from target"
>> (if (string-match "-64bit" target)
>> (replace-match "" t t target)
> if you have an (if ) with no else portion, as you do here, just rewrite
> it as:
> (when (string-match "-64bit" target)
> (replace-match "" t t target))
>> ;; now use the newest version that matches a 64-bit version
>> (defun krc-in-newest (source)
>> (if source
>> (if (string-match source ess-newest-R)
>> (concat source "-64bit")
> that can probably be simplified:
> (when (and source (string-match source ess-newest-R))
> (concat source "-64bit"))
> all untested though of course!
More information about the ESS-help