Norm Josephy <NJOSEPHY@bentley.edu> writes:
> Sir:
>
> I hope you do not mind me sending e-mail directly to you
> rather than to the developer's list. I wish to avoid
> unnecessary traffic on the list when the issue I raise may
> have already been fixed.
As a matter of principle: I *do* mind. One of the purposes of having a
list is that not everyone has the time to deal with questions at any
point in time. If you single out one person, you are in effect forcing
him either to write at least a polite reply explaining that he's busy
or impolitely ignore you...
But never mind: I'll just bounce you onto the list.
> There are two other places where I have induced a core dump.
>
> x1 <- 1:10
> f1 <- cut(x,5); f2 <- cut(x,4); f3 <- cut(x,3)
> as.matrix(list(f1,f2,f3))
> ----------------------------------------------------
>
> Just after start-up, as the first expression issued:
>
> strwidth("abcd")
> -----------------------------------------------------
>
> One other place: where the documentation says that f1:f2
> works when f1,f2 are factors
>
> f1 <- gl(3,2)
> f2 <- gl(2,3)
> f1:f2
>
> It doesn't core dump, but it doesn't seem to do anything
> useful either. Is the intent to create what
> tapply(1:6,list(f1,f2)) creates?
> ------------------------------------------------------
>
> I am starting this week to teach a 'graphical EDA using R'
> course to undergrauate business students with very little
> math or computer language experience. I have been
> intentionally 'abusing' R to look for places that my
> students might inadvertenly stumble into. The focus on the
> course is graphical exploration of data, and data
> manipulation will be an important component of my students
> learning experience.
>
> If I may, a personal comment about tapply. This may be just
> something that I don't understand fully. If this is just my
> confusion, or it no longer happens in the latest version,
> ignore my comments with my apologies.
>
> The core dump situation I described in my previous post came
> up in my attempt to 'generalize' the tapply function. In
> looking at ways to teach R, it seemed that tapply would
> accept a list of factors if the function being applied
> returned a scalar, or a single factor if the function being
> applied returned a vector, but it core dumped if it was used
> as
>
> tapply(x,listOfFactors,vectorReturningFunction)
>
> My naive solution was :
>
> j <- tapply(x, listOfFactors) # get the product factor
> answer <- tapply(x,j,vectorReturningFunction)
> .... CODE TO GET THE LABELS RIGHT ....
> ansmat <- array(unlist(answer), dim=someStuff,
> dimnames=otherStuff))
>
>
> The 'flexibility' of being passed back different structures
> (list, vector, matrix) depending upon the input structures
> somewhat complicates the explanation of the functions'
> usage. Uniformly returning a properly labelled array, in my
> naive way of looking at things, might have some merit.
>
> Although I am not new to programming (started as an
> undergraduate engineer in the early 60's) I am new to user
> group lists on the Internet. I don't know what the proper
> 'group etiquette' is on things like code bombing questions.
>
> Thank you,
>
>
> Norm
>
> Norman Josephy
> Department of Mathematical Sciences
> Bentley College
> Waltham, MA
> U.S.A.
>
> E-Mail: NJOSEPHY@BENTLEY.EDU
>
>
--
O__ ---- Peter Dalgaard Blegdamsvej 3
c/ /'_ --- Dept. of Biostatistics 2200 Cph. N
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard@biostat.ku.dk) FAX: (+45) 35327907
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To:
r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._