Skip to content

loop searching the id corresponding to the given index (timestamp)

5 messages · Yolande Tra, Jean V Adams, Rui Barradas

#
Hello,

Try the following.

for(i in 1:dim(diveData_2008)[1]){
	# Which dive is this observation from
	thisIndex <- as.character(index(diveData_2008[i,]))
thisIndex <- as.POSIXct(thisIndex)
	dive_id   <- diveCond_all$dive_id[diveCond_all$timestamp == thisIndex]
	#
	[... etc ...]

And the same in the 2009 loop.

I think this is it.

Good luck,

Rui Barradas

Em 18-07-2012 14:47, Yolande Tra escreveu: