| To: | s-news@lists.biostat.wustl.edu |
|---|---|
| Subject: | Allowable names for sapply arguments |
| From: | Matt Calder <calder@phz.com> |
| Date: | Thu, 29 Nov 2001 10:36:06 -0500 (EST) |
Hi,
This may have been discussed here before, but if not,
> version
Version 6.0 Release 1 for Sun SPARC, SunOS 5.6 : 2000
> sapply(1:3, function(x,X) {print(x)}, X=1)
Problem in sapply(1:10, function(x, X): ":" is not a function
"1" is not a function
"3" is not a function
Hmm, it looks OK, what could be wrong?
> sapply(1:3, function(x,y) {print(x)}, y=1)
[1] 1
[1] 2
[1] 3
[1] 1 2 3
Oh! So it is no good to use 'X' as an auxilliary argument to sapply?
Matt
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: Colorful contour plot in Splus2000 Windows, Ian Jonsen |
|---|---|
| Next by Date: | clustered box plots, Jane Cahill |
| Previous by Thread: | How to drop unused factor levels globally?, Byers, Bob |
| Next by Thread: | Re: Allowable names for sapply arguments, David Smith |
| Indexes: | [Date] [Thread] [Top] [All Lists] |