Thanks, worked like a charm.
Greg.
On Feb 22, 1:58 pm, Gavin Simpson 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) {
> > > if(missing(data))
> > >
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, d
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
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
4 matches
Mail list logo