| To: | s-news@lists.biostat.wustl.edu |
|---|---|
| Subject: | Passing arguments to a function |
| From: | "Walter R. Paczkowski" <dataanalytics@earthlink.net> |
| Date: | Thu, 23 Nov 2006 08:20:30 -0500 |
| Domainkey-signature: | a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=earthlink.net; b=owm2LFXsKYfNfqaoDyr3bQ6ckD2Y3pOHzPYdAFXlu3/Mvp8lbJ89zc1XAjIDRbXL; h=Received:X-Mailer:Date:To:From:Subject:Mime-Version:Content-Type:Message-ID:X-ELNK-Trace:X-Originating-IP; |
|
Hi, I wrote a function to produce crosstabs for a special layout my client asked for. The function works by calling the S-Plus crosstab function. My function works fine for my purpose but I want to generalize it. Basically, the function is fn.tabs <- function(data){ } Every time I want to change the x and y to tab new variables, I have to edit the function. How can I pass x and y as a formula such as fn.tabs(~x + y, data)? Thanks, Walt Paczkowski Walter R. Paczkowski, Ph.D. Data Analytics Corp. 44 Hamilton Lane Plainsboro, NJ 08536 (V) 609-936-8999 (F) 609-936-3733 |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | DSC 2007 registration and scientific program, Paul Murrell |
|---|---|
| Next by Date: | confidence interval for Odds Ratio for Mantel-Haenszel test, Dr. Takashi Kikuchi |
| Previous by Thread: | DSC 2007 registration and scientific program, Paul Murrell |
| Next by Thread: | confidence interval for Odds Ratio for Mantel-Haenszel test, Dr. Takashi Kikuchi |
| Indexes: | [Date] [Thread] [Top] [All Lists] |