Thanks, worked like a charm.
Greg.
On Feb 22, 1:58 pm, Gavin Simpson gavin.simp...@ucl.ac.uk wrote:
On Sun, 2009-02-22 at 20:52 +1100, Jim Lemon wrote:
Greg wrote:
I'm trying to write a simple function with a data parameter.
tfun - function(x, y, data = NULL) {
I'm trying to write a simple function with a data parameter.
tfun - function(x, y, data = NULL) {
if(missing(data))
dt - data.frame(x=x, group=y)
else {
dt - with(data, data.frame(x=x, group=y))
}
return(dt)
}
If I pass variables
Greg wrote:
I'm trying to write a simple function with a data parameter.
tfun - function(x, y, data = NULL) {
if(missing(data))
dt - data.frame(x=x, group=y)
else {
dt - with(data, data.frame(x=x, group=y))
}
return(dt)
}
If I
On Sun, 2009-02-22 at 20:52 +1100, Jim Lemon wrote:
Greg wrote:
I'm trying to write a simple function with a data parameter.
tfun - function(x, y, data = NULL) {
if(missing(data))
dt - data.frame(x=x, group=y)
else {
dt - with(data, data.frame(x=x,
4 matches
Mail list logo