[Rd] Color coding
I'm probably not the first with this idea so I guess that there's a complex issue behind it but since I couldn't find an answer I just though to ask: Wouldn't it be nice to have color coded objects as output of ls() statement? Functions of one color and rest with other (at least). So when I issue an ls() I could visually discern different types of objects. I often find myself opening old files and spending time figuring which is which. I know this just means I'm not aoranized, but still...color coding would help. Regards to everyone, ___ Gasper Cankar researcher National Examinations Centre (Ric) [EMAIL PROTECTED] tel. +386 1 54 84 682 fax. +386 1 54 84 601 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] (PR#10437) segfault on functions with 'source' attribute
For the record: The reason I used attr(myfun, "source") = FALSE, is that I misread the example 'Tidying R Code' in 'Writing R Extensions', which calls for attr(myfun, "source") = NULL. Somehow setting 'source' to FALSE seems more natural to me than setting it to NULL. [EMAIL PROTECTED]: > I am not sure why you would want to do that, but the C code does assume > source attributes were put there by R, and changing tests from !isNull to > isString in a few places will fix that. -- Karl Ove Hufthammer __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] (PR#10437) segfault on functions with 'source' attribute
On Tue, 20 Nov 2007, [EMAIL PROTECTED] wrote: > For the record: The reason I used attr(myfun, "source") = FALSE, is that I > misread the example 'Tidying R Code' in 'Writing R Extensions', which calls > for attr(myfun, "source") = NULL. > > Somehow setting 'source' to FALSE seems more natural to me than > setting it to NULL. attr(myfun, "source") <- NULL does not 'set it to NULL', it removes the attribute. > [EMAIL PROTECTED]: > >> I am not sure why you would want to do that, but the C code does assume >> source attributes were put there by R, and changing tests from !isNull to >> isString in a few places will fix that. > > -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Color coding
On Wed, 21 Nov 2007, Gasper Cankar wrote: > I'm probably not the first with this idea so I guess that there's a > complex issue behind it but since I couldn't find an answer I just > though to ask: > > Wouldn't it be nice to have color coded objects as output of ls() > statement? Functions of one color and rest with other (at least). So > when I issue an ls() I could visually discern different types of > objects. > > I often find myself opening old files and spending time figuring which > is which. I know this just means I'm not aoranized, but still...color > coding would help. You haven't mentioned your platform: you would have to be working in a console which supported this, and e.g. the Windows GUI console does not. Once you know the escape codes to change colour, it would be easy to write a listing function which did this. You would almost certainly have to write some C code to find out what the codes are for the current terminal (on a modern system via the terminfo database): the GNU ls (part of coreutils) would provide you example code. So, this is project for a package: are you volunteering? -- Brian D. Ripley, [EMAIL PROTECTED] Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel
Re: [Rd] Color coding
Unfortunately, the problem is the way the R output is set up---there's no portable way (at the moment) to tag output with different attributes. On Nov 21, 2007 4:11 AM, Gasper Cankar <[EMAIL PROTECTED]> wrote: > I'm probably not the first with this idea so I guess that there's a > complex issue behind it but since I couldn't find an answer I just > though to ask: > > Wouldn't it be nice to have color coded objects as output of ls() > statement? Functions of one color and rest with other (at least). So > when I issue an ls() I could visually discern different types of > objects. > > I often find myself opening old files and spending time figuring which > is which. I know this just means I'm not aoranized, but still...color > coding would help. > > Regards to everyone, > > ___ > Gasper Cankar > researcher > National Examinations Centre (Ric) > [EMAIL PROTECTED] > tel. +386 1 54 84 682 > fax. +386 1 54 84 601 > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > -- Byron Ellis ([EMAIL PROTECTED]) "Oook" -- The Librarian __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel