[Rd] levels for list and data.frame
Gregor Gorjanc
gregor.gorjanc at gmail.com
Wed Mar 22 08:52:13 CET 2006
Martin Maechler wrote:
>>>>>>"Gregor" == Gregor Gorjanc <gregor.gorjanc at gmail.com>
>>>>>> on Tue, 21 Mar 2006 20:50:21 +0100 writes:
>
>
> Gregor> Martin Maechler wrote:
> >> Hi Gregor,
> >>
> >> before even considering methods for "list" and
> >> "data.frame", can you explain why you think it is
> >> important for levels() to become a generic function at
> >> all? For me, levels belong to factors (or then to
> >> contour plots, or co-plots ) but exactly because level is
> >> a too generic word, it seems to me to be problematic as a
> >> generic function.
> >>
> >> How would describe the purpose of the levels() generic?
> >>
>
> Gregor> You are right. I was in situation where I wanted to
> Gregor> get levels from all entries (factors) of a list and
> Gregor> considered to write a method for this instead of
> Gregor> always using lapply(). It went quite smoothly, if I
> Gregor> skip R CMD check error. After that I began to think
> Gregor> and post a question to R-devel. Perhaps levels is
> Gregor> really to generic, however one can set levels also
> Gregor> for non-factors. Although, I agree that this is of
> Gregor> no use. I was also playing with levels<- and find it
> Gregor> quite hard to do something general and usable for
> Gregor> lists and data.frame.
>
> Gregor> If we put levels aside, is there any opinion/policy
> Gregor> about list, data.frame methods? Just curiosity.
>
> I don't understand the question. Do you mean the question if
> methods should be written for "list" or for "data.frame" (which
> inherit from "list")?
Yes.
> But in any case, can you please take this back to R-devel?
> It has started there, and people should be able to see the
> continuation / conclusion.
>
Hmm, replay all to your mail does not include r-devel, weird. Done.
--
Lep pozdrav / With regards,
Gregor Gorjanc
----------------------------------------------------------------------
University of Ljubljana PhD student
Biotechnical Faculty
Zootechnical Department URI: http://www.bfro.uni-lj.si/MR/ggorjan
Groblje 3 mail: gregor.gorjanc <at> bfro.uni-lj.si
SI-1230 Domzale tel: +386 (0)1 72 17 861
Slovenia, Europe fax: +386 (0)1 72 17 888
----------------------------------------------------------------------
"One must learn by doing the thing; for though you think you know it,
you have no certainty until you try." Sophocles ~ 450 B.C.
More information about the R-devel
mailing list