Re: [rkward-devel] Provide a UI for CRAN mirrors

2009-11-26 Thread Prasenjit Kapat
Hi,

2009/11/26 meik michalke meik.micha...@uni-duesseldorf.de:
 Am Donnerstag, 26. November 2009 12:05:35 schrieb Prasenjit Kapat:
 This has been a very long standing itch of mine - to get rid of the
 ugly (and very minimally informative) Tcl/Tk box to choose the CRAN
 mirrors (one that pops up during install.packages or update.packages
 or ...). Basically, to set options(repos=c(CRAN=)) with an actual
 url instead of '@CRAN@'.

 i like the idea :-) theoretically you could replace @CRAN@ with a mirror of
 your choice, but a combobox to me seems more flexible and intuitive (however,
 consequently it should fully replace the @CRAN@ entry).

Yeah, that would be great. Unfortunately I've no idea how to do that
:-( I think this will need a lot  more structural changes in the code.
We could include all the entries in /etc/R/repositories in the listbox
here and store the selected ones in ~/.R/repositories -- a GUI for
setRepositories()!

Regards,
-- 
Prasenjit

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
RKWard-devel mailing list
RKWard-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rkward-devel


Re: [rkward-devel] Provide a UI for CRAN mirrors

2009-11-26 Thread Thomas Friedrichsmeier
Hi,

On Thursday 26 November 2009, Prasenjit Kapat wrote:
 (2) If the urls are stored, then
 we'll have to do an indexOf(...) search for the hostname combobox,
 everytime the settings dialog is loaded.

not to worry. The main rule of thumb is: If each call of the code is a direct 
result of a user action, then wasting a couple thousand CPU cycles is nothing. 
Performance is often an issue for something that may run in a loop of some 
sort, but rarely for anything else.

 But the only difference (for better) would be to read the mirror list
 from getCRANmirrors() instead of the hard coded file on disk, right?

Yes.

 But remember that the hard coding is done for a specific version of R.
 If R changes, then we anyway have to recompile rkward. And as I
 commented in the code, my ideal solution is to create a .h file
 during the configure/make process (using CRAN_mirror_list.R) and this
 .h file will just contain the definition of two QStringLists (or even
 one list may work actually). Now, I do not know how to trigger the
 creation from either configure/make. But if you can give me a working
 .h file containing the two lists (hard coded) then I can modify
 CRAN_mirror_list.R to generate this .h file dynamically.

Yes, that would make things a lot less scary. Of course mirrors may change 
independently of the R installation (and BTW, getCRANmirrors() fetches a list 
of mirrors from the net, by default). I admit, in practice, that's probably 
not something to worry about, though.

 (2) I like the idea to give the user more readable choices, like the
 ones in the combobox (Country, State, City, Hostname), rather than the
 choices offered using the Tcl/Tk menu box.
 (3) Also, being able to store the choice is a plus point, I think.

Both are good points. But perhaps both are solvable without hardcoding 
anything:

1) In the settings, perhaps we could offer a pick from list button, which 
quite simply calls chooseCRANmirror() in R. Hence we'd have a dropdown choice, 
and still be able to save the result.
2) We could replace chooseCRANmirror() to offer a nicer menu, with all the 
additional info from getCRANmirrors().

Would that cover all wishes?

Regards
Thomas


signature.asc
Description: This is a digitally signed message part.
--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july___
RKWard-devel mailing list
RKWard-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rkward-devel