Re: [R] "object not found" within function

2009-11-03 Thread Thushyanthan Baskaran
Hi Thomas, sorry, I should have mentioned that I was using the survey package. But thank you very much for your quick response. Your first solution worked perfectly. Best, Thushyanthan tlum...@u.washington.edu wrote: On Mon, 2 Nov 2009, Thushyanthan Baskaran wrote: Hi, I am trying to

Re: [R] "object not found" within function

2009-11-03 Thread Uwe Ligges
Thushyanthan Baskaran wrote: Hi, I am trying to write a function to compute many cross-tabulations with the -svytable- command. Here is a simplified example of the structure of my code (adapted from the -svytable- help file): data(api) func.example<-function(variable){ dclus1<-svydesign(

Re: [R] "object not found" within function

2009-11-03 Thread tlumley
On Mon, 2 Nov 2009, Thushyanthan Baskaran wrote: Hi, I am trying to write a function to compute many cross-tabulations with the -svytable- command. Here is a simplified example of the structure of my code (adapted from the -svytable- help file): In the 'survey' package -- if you say what pa

[R] "object not found" within function

2009-11-02 Thread Thushyanthan Baskaran
Hi, I am trying to write a function to compute many cross-tabulations with the -svytable- command. Here is a simplified example of the structure of my code (adapted from the -svytable- help file): data(api) func.example<-function(variable){ dclus1<-svydesign(id=~1, weights=~pw,data=apiclus1