Re: [Rd] Documentation examples for lm and glm

2018-12-17 Thread Heinz Tuechler
ne I don't need an example for the use of a data argument each time I look in help. best, Heinz Fox, John wrote/hat geschrieben on/am 17.12.2018 16:23: Dear Heinz, -- On Dec 17, 2018, at 10:19 AM, Heinz Tuechler wrote: Dear All, do you thin

Re: [Rd] Documentation examples for lm and glm

2018-12-17 Thread Heinz Tuechler
Dear All, do you think that use of a data argument is best practice in the example below? regards, Heinz ### trivial example plotwithline <- function(x, y) { plot(x, y) abline(lm(y~x)) ## data argument? } set.seed(25) df0 <- data.frame(x=rnorm(20), y=rnorm(20)) plotwithline(df0[['x

Re: [Rd] Easily switchable factor levels

2011-02-23 Thread Heinz Tuechler
To me this is a common situation, especially to switch between two languages. I solve it by separating the coding of values and their labels. Values are coded numerically or as character, and their labels are attached by a value.label attribute. When needed a modified factor function transforms

Re: [Rd] rbind on data.frame that contains a column that is also a data.frame

2010-08-06 Thread Heinz Tuechler
Also Surv objects are matrices and they share the same problem when rbind-ing data.frames. If contained in a data.frame, Surv objects loose their class after rbind and therefore do not more represent Surv objects afterwards. Using rbind with Surv objects outside of data.frames shows a similar pr

Re: [Rd] Suggestion: Dimension-sensitive attributes

2009-07-09 Thread Heinz Tuechler
ions, i.e. parts of an object should stay in this object-related attribute and be extracted on subsetting. Since subsetting an object leads to a new object, this could then have its own, new persisting attribute. The more difficult part may to be the binding of objects. Heinz -Or

Re: [Rd] Suggestion: Dimension-sensitive attributes

2009-07-09 Thread Heinz Tuechler
At 10:01 09.07.2009, SIES 73 wrote: I've also had several use cases where I needed "cell-like" attributes, that is, attributes that have the same dimensions as the original array and are subsetted in the same way --along all its dimensions. So we're talking about a way to add metadata to mat

Re: [Rd] Unexpected result of as.character() and unlist() appliedto a data frame

2007-03-28 Thread Heinz Tuechler
At 17:25 27.03.2007 +0200, Martin Maechler wrote: >> "Herve" == Herve Pages <[EMAIL PROTECTED]> >> on Mon, 26 Mar 2007 20:48:33 -0700 writes: > >Herve> Hi, >>> dd <- data.frame(A=c("b","c","a"), B=3:1) dd >Herve> A B 1 b 3 2 c 2 3 a 1 >>> unlist(dd) >Herve> A1 A2 A

[Rd] raw data documentation

2006-07-18 Thread Heinz Tuechler
Dear Developers, after several discussions on r-help I got the impression that the "standard" R distribution, including the recommended packages, does not offer much to document raw data, imported into R. Hmisc has some functionality in this respect, and others like Richard Heiberger solved some o