[Sprint-user] sprint papply
Terry Sloan
tms at epcc.ed.ac.uk
Thu May 9 18:21:29 CEST 2013
A SPRINT user asked in February 2013
===================================
In sprint manual, for papply(), it said data could be array, list or ff
object.
I just tried papply(0 for a list, but got an error:
x <- list(a = 1:10, beta = exp(-3:3), logic = c(TRUE,FALSE,FALSE,TRUE))
papply(x, mean)
Error in papply(x, mean) : could not find function "is.ff"
It runs fine with lapply(x, mean). Could you let me know whether I am
missing anything?
A member of the SPRINT team replied in February 2013
====================================================
Thanks for raising the issue with papply.
On investigation it seems that papply expects you to have called
'library(ff)' before
papply and also that our implementation of papply is limited to working
on lists of
numbers or lists of matrices only. I will update our documentation and
improve the error
messages in the code, and make a note of improvements that should be
made to fully
implement papply.
In the meantime, here are a couple of working examples of papply:
library(sprint)
library(ff)
papply(list(1:10), mean)
1?
[1] 5.5
listt = list(matrix(sin(1:100), ncol=20), matrix(sin(1:100), ncol=25),
matrix(sin(1:10), ncol=5))
papply(listt, mean)
--
----------------------------------------------------------------------
Terry Sloan Email: t.sloan at epcc.ed.ac.uk
EPCC Phone: +44 131 650 5155
WWW : http://www.epcc.ed.ac.uk/
----------------------------------------------------------------------
The University of Edinburgh is a charitable body, registered in
Scotland, with registration number SC005336.
More information about the Sprint-user
mailing list