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

  • Home
  • SEARCH
  • 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 8773783
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T18:23:31+00:00 2026-06-13T18:23:31+00:00

Possible Duplicate: Why and where are \n newline characters getting introduced to c()? I

  • 0

Possible Duplicate:
Why and where are \n newline characters getting introduced to c()?

I am running R (version 2.15.1) in a bash shell (version 4.2.36(1)) in the GNOME terminal (version 3.4.1.1). Sometimes I write my code in a text file and then paste it directly into the console (when running R). I didn’t have any problems until the scripts I was pasting grew in length. Now, it appears that any code greater than 4206 characters (including \n) is rejected (i.e., the first 4206 characters are accepted and the remaining code is truncated; the truncation is accompanied by the terminal “bell” sound). This character limit is not specific to bash or GNOME terminal because I do not observe a character limit when pasting into e.g., vi. Therefore, I suspect that the character limit is imposed by R, but do not know how to change it, assuming it is a user-configurable parameter. Can the paste limit be changed and if so, what parameter governs it?

  • 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-13T18:23:32+00:00Added an answer on June 13, 2026 at 6:23 pm

    It looks like you’re running into a known limitation of the console. As it says in Section 1.8 – R commands, case sensitivity, etc. of An Introduction to R:

    Command lines entered at the console are limited[3] to about 4095 bytes (not characters).

    [3] some of the consoles will not allow you to enter more, and amongst those which do some will silently discard the excess and some will use it as the start of the next line.

    Either put the command in a file and source it, or break the code into multiple lines by inserting your own newlines at appropriate points (between commas).

    The value is hard-coded in src/include/Defn.h : #define CONSOLE_BUFFER_SIZE 4096, so you would need to recompile R to change it.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Printf example in bash does not create a newline I have a
Possible Duplicate: && operator in Javascript In the sample code of the ExtJS web
Possible Duplicate: How to print in Python without newline or space? How to print
Possible Duplicate: Interpreting newlines with XSLT xsl:text? How to convert newline into <br/> with
Possible Duplicate: Problems with newline in Graphics2D.drawString String eol =System.lineSeparator(); String sampleText =epcURNText +eol+studentName+eol+DelayComments+eol+ArrivalMethodComments+eol;
Possible Duplicate: Capture newline from a textarea input I have a text area where
Possible Duplicate: “No newline at end of file” compiler warning i am a Linux
Possible Duplicate: Why does printf not flush after the call unless a newline is
Possible Duplicate: Learning to write a compiler I looked around trying to find out
Possible Duplicate: How do I add a newline to a TextView in Android? I

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.