[R] finding warning point in function
Federico Calboli
f.calboli at imperial.ac.uk
Sun Mar 12 19:57:53 CET 2006
Hi everyone,
I would like to find out when and where exactly I get the following
warning in a piece of code I've written:
Error in "[<-"(`*tmp*`, iseq, value = numeric(0)) :
nothing to replace with
The code is a for () loop performing a somewhat trivial calculation,
modulated by a number of logical if(){} else(){} conditions, involving
the creation of a number of vectors that contain the elements that will
be manipulated.
The warning itself makes me suspicious that somewhere along the way a
vector ends up having length 0 for some of the elements of my dataset...
is there a way of finding out where the warning is generated that is
less verbose than printing out every single step?
Cheers,
Federico
--
Federico C. F. Calboli
Department of Epidemiology and Public Health
Imperial College, St Mary's Campus
Norfolk Place, London W2 1PG
Tel +44 (0)20 7594 1602 Fax (+44) 020 7594 3193
f.calboli [.a.t] imperial.ac.uk
f.calboli [.a.t] gmail.com
More information about the R-help
mailing list