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
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))
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
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
persisting attribute.
The more difficult part may to be the binding of objects.
Heinz
-Original Message-
From: Heinz Tuechler [mailto:tuech...@gmx.at]
Sent: jueves, 09 de julio de 2009 10:56
To: Bengoechea Bartolomé Enrique (SIES 73); Tony Plate; r-devel@r-project.org
Cc: Henrik