Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8216671
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T12:12:45+00:00 2026-06-07T12:12:45+00:00

I have a text document that I would like to substring. I’m using the

  • 0

I have a text document that I would like to substring. I’m using the following code to substring:

substr(text, start,start+end)

start has a vector of 60 elements. However, the above code only returns the equivalent of substr(text,1109,1109+199). How do I get it to return all 60 elements, namely

  • substr(text,1109,1109+199)
  • substr(text,11590,11590+199)
  • ….

Sample data

start

[1] 11009 11590 11972 15674 16274 16659 19866 20541 20963 24787 25376
[12] 25746 29458 30011 30363 34086 34702 35087 38643 39095 39416 42626
[23] 43188 43545 46731 47367 47757 51029 51673 52072 55444 56076 56470
[34] 59794 60445 60851 64267 64877 65276 68659 69200 69547 72747 73303
[45] 73657 76896 77648 78103 81541 82050 82391 85277 85848 86227 89128
[56] 89656 90010 92830 93329 93656

end

[1] 199 199 199 201 201 201 218 218 218 186 186 186 177 177 177 192 192
[18] 192 160 160 160 178 178 178 194 194 194 200 200 200 197 197 197 205
[35] 205 205 200 200 200 174 174 174 178 178 178 235 235 235 171 171 171
[52] 190 190 190 179 179 179 169 169 169
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-07T12:12:47+00:00Added an answer on June 7, 2026 at 12:12 pm

    In stead of substr you could use substring :

    substring(your_text,first=start,last=(start+end))
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a document that has two content types: text/xml and text/html. I would
I have an HTML document where I would like to semantically group text to
I have an xml document that I would to parse using SSIS 2005 to
I have a page that has a few links that I would like to
I have a word document that I would like to have viewed as an
I would like to modify text in a document that is in the form
I have a text document that contains a list of numbers and I want
I have a javascript that displays a generated text into a div: document.getElementById('phrase').innerHTML =
I'm doing a bind to document like below, $(document).bind('click',doThis); But i have a text
I have text documents like the following which contain single and multiple variables: title::

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.