[6487] in s-news-athena
sapply
daemon@ATHENA.MIT.EDU (Viviane Grunert)
Wed Feb 22 13:06:07 1995
Date: Wed, 22 Feb 95 16:50:58 GMT
From: V.Grunert@sheffield.ac.uk (Viviane Grunert)
To: s-news@utstat.toronto.edu
Dear S-Plus users,
Just to introduce myself, I'm a first-year PhD-student in the School of
Mathematics & Statistics, University of Sheffield, U.K.
I wonder if there is any explanation for the following:
The call (for example)
> sapply(c(1,2),integrate,f=sin,lower=0)
returns
[,1] [,2]
[1,] 0.4596977 1.416147
[2,] 5.10367e-15 1.572239e-14
[3,] 1 1
[4,] normal termination normal termination
[5,] list, 12 list, 12
[6,] call, 4 call, 4
attr(, "names"):
[1] "integral" "abs.error" "subdivisions" "message" "aux" [6] "call" "integral" "abs.error" "subdivisions" "message" [11] "aux" "call"
BUT, mapping 'sin` to any other vector which contains a Zero, for example
sapply(c(0,2),integrate,f=sin,lower=0)
results in an output which contains the complete definition of the function
'integrate`.
I am using: Version 3.2 Release 1 for Sun SPARC, SunOS 4.x : 1993.
Thanks in advance for any help.
Viviane
#########################################################################
Viviane Grunert
School of Mathematics & Statistics
University of Sheffield
P.O. Box 597
Sheffield
S10 2UN
U.K.
e-mail: v.grunert@sheffield.ac.uk
#########################################################################