Hi

I have written a code to do some averaging of data over uneven  
intervals. The for loop keeps missing particular depths and I once got  
an error message reading:

  *** caught segfault ***
address 0xc0000023, cause 'memory not mapped'

Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace

The portion of the code that is giving me problems is:

if(length(which( interp.depth == highres.depth[i] )) >0 ) {
			print(paste("depth = ",highres.depth[i],sep=""))
			depth.tracker <- c(highres.depth[i],depth.tracker)
			caco3.interp.vector <- c(mean(caco3.interp),caco3.interp.vector)
			caco3.interp <- numeric(0)
			}

When the routine misses a depth, it returns a length of zero for (say)  
depth = 1.4, or highres.depth[141]. but when i type in the value 1.4,  
I get the proper answer. Any idea what is going on here?

thanks
Matt

______________________________________________
Matthew S. Fantle
Assistant Professor
Department of Geosciences
Penn State University
212 Deike Bldg.
University Park, PA 16802

Phone: 814-863-9968
mfantle@psu.edu

Departmental Homepage
http://www.geosc.psu.edu/people/faculty/personalpages/mfantle/index.html





	[[alternative HTML version deleted]]


