Skip to content
Back to formatted view

Raw Message

Message-ID: <CAHby=D1UYkGp-L_hVgy8Xus=_wVjDmV=6_x39Dyd0Pt38-H02w@mail.gmail.com>
Date: 2016-05-11T20:12:34Z
From: derek
Subject: break string at specified possitions

Dear R-help

I would like to split long string at specified precomputed positions.
'substring' needs beginings and ends. Is there a native function which
accepts positions so I don't have to count second argument?

For example I have vector of possitions pos<-c(5,10,19). Substring
needs input first=c(1,6,11) and last=c(5,10,19). There is no problem
to write my own function. Just asking.

Derek