[R] Hot Air Balloon Weather Briefings

Rasmus Liland jr@| @end|ng |rom po@teo@no
Sat Aug 15 01:35:15 CEST 2020


On 2020-08-14 15:56 -0700, Bert Gunter wrote:
| On Fri, Aug 14, 2020 at 3:21 PM Rasmus Liland wrote:
| |
| | As to Bert's reply, I am a loss as 
| | how to use the lengths list in 
| | rle(rap$Speed) for this ...
| 
| I showed how in my message for one 
| interpretation of the query. I would 
| need further clarification for other 
| interpretations, but note that in my 
| reply,   rep(z|9, z)  gives a logical 
| vector in which all rows in which a 
| speed of 0 appears in a run of 10 or 
| greater (as no other speed would be 
| replicated) is TRUE, FALSE otherwise.  
| ( z = $lengths).  I would agree that 
| whether this is a good starting point 
| for other interpretations remains to 
| be seen.

Yes, the time cols might be omitted to 
complete this.

	z <- rle(rap$Speed)$lengths
	rap[rep(x=z<10, times=z),]

This is not bad.

/Rasmus

P.S. Adding this back to the list (this 
ends up in a searchable archive, and so 
on and so fourth). 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20200815/bbbfbc2e/attachment.sig>


More information about the R-help mailing list