S-News List,
I have been trying to create a function that will simplify a graphing
function for me that intend to do frequently. The trouble is that when I use
a function within the user-defined function, objects are not available. Is
there a way around this?
Here is a relatively simple example of what I am trying to do:
uni.g<-function(v1,dat)
{
a<-bwplot(~v1,data=dat)
print(a,split=c(1,1,2,2))
}
When I try to call the function by specifying something like:
uni.g(VARNAME,DATAFRAME)
I get an error saying that object v1 not identified. Is this because of the
Trellis function or more general to the use of objects within functions?
Can anyone help with a solution?
Thanks
Tom
*** ++++++++++++ ***
Thomas D. Fletcher
Department of Psychology
Old Dominion University
Office (757) 683 - 3725
tflet002@odu.edu
*** ++++++++++++ ***
|