R search Number between two others in a vector -


i work rand have 2 vectors

> k_anfang [1]   11 1723 > k_ende [1]   14 1725 

i want have:

11,12,13,14,1723,1724,1725 

to skip these rows in loop

how numbers between 2 vectors?

is looking for?

k_anfang <- c(11, 1723) k_ende <- c(14, 1725)  c(k_anfang[1]:k_ende[1], k_anfang[2]:k_ende[2]) 

other option (in inspiration @jilber) is

unlist(mapply(seq, k_anfang, k_ende)) 

... , one

unlist(mapply(`:`, k_anfang, k_ende)) 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -