Skip to content

copy/paste problems

11 messages · Kjell Konis, Simon Urbanek, Christoph Hofer +1 more

#
Hello

I have the following problem:

I installed R by source (version 2.3.1, OS X 10.4.8)

./configure --with-blas=-framework vecLib --with-tcltk --with-lapack  
--with-x --enable-R-shlib --enable-R-framework --with-readline --with- 
aqua
make

I use R as command line interface in the OS X terminal. Now when I  
copy some R-code into the terminal, i only can paste some 38 rows of  
the code
. Then R hangs, which mean that i can not paste more than 38 rows of  
R code into the R application running in the terminal.


Does someone have the same problem or has a solution?


Best regards

Christoph
#
You could use the source function.  For instance if your code is in  
the file someCode.q then you can have R execute it by running

 > source("someCode.q")

For this to work someCode.q must be in R's current working directory  
which you can check with the getwd() function.  Otherwise you have to  
use the full path to someCode.q which you can find by dropping  
someCode.q onto your terminal window.  Good luck.

Kjell
On Nov 13, 2006, at 10:28 AM, Christoph Hofer wrote:

            
#
Thanks for the answer Kjell. But i am wonder why i can only paste  
certain number of R code rows
to the r application in the terminal and how i can fix this strange  
behavior.

Christoph

Am 13.11.2006 um 11:46 schrieb Kjell Konis:
#
I generally use R in the terminal and build it with '--enable-R-shlib  
--disable-R-framework --without-aqua' and I am able to paste even  
thousands of lines into the terminal.  The only problem is that,  
since I do enable readline, R prints out a listing of the working  
directory every time it encounters a tab.

Kjell
On Nov 13, 2006, at 11:44 AM, Christoph Hofer wrote:

            
#
On Nov 13, 2006, at 5:28 AM, Christoph Hofer wrote:

            
I have encountered a similar problem at times - the number of lines  
is not fixed, it depends on the text and it doesn't always happen.  
The problem is in the Terminal application, not R (i.e. you get the  
same problem with other applications run in the Terminal). You may  
want to use the R GUI instead which doesn't have such limitation.

Cheers,
Simon
#
Dear Simon

I think the problem is in R (or how I configured it). If  i open an  
Terminal
i can paste so many lines i want. But when i start R the the number of
the lines is limited.

Best Regards

Christoph

Am 13.11.2006 um 15:29 schrieb Simon Urbanek:
#
I've experienced this in the past as well.
What I've noticed (although not able to reproduce anything now) is  
that this problem occurs in the definition of a function or when  
there is a for-loop. I mean in between { } in such two cases.
It is like some escape char is passed to (or by) the Terminal.app and  
the R parser raise an error.

I think Simon is right. Could you try to copy and paste to R from  
xterm shell ? (X11.app, new terminal and then paste)

Another test: try to copy and paste from a different editor to see if  
it always happens at the same line.


stefano
On 13/nov/06, at 23:45, Christoph Hofer wrote:

            
#
The X11 application shows the same behavior as the Terminal  
application does, which means i can only paste a limited number os rows.
I also tried to copy the code in different editors with the same  
results. I only can paste a certain number of rows of the R code.

Regards

Christoph


Am 13.11.2006 um 16:27 schrieb stefano iacus:
#
On Nov 13, 2006, at 9:45 AM, Christoph Hofer wrote:

            
Ok, then it's a different issue from what I was observing.

Do you have a reproducible example? (i.e. can you send us the code  
you run or some code that triggers the problem?).

Also can you try the CRAN binary version of R? If it is a problem  
with your compilation, then the CRAN binary may show a different  
behavior.

Thanks,
Simon
#
Dear Simon

I installed the binary version of R. And now i can paste as many
rows of R code as i want. I used a wrong Fortran Complier.
I downloaded the Fortran Complier from here:  http://gcc.gnu.org/ 
fortran/

But know i have the right compiler from here:
On 13.11.2006, at 19:38, Simon Urbanek wrote: http:// 
hpc.sourceforge.net/

and every thing works find.

Thank you very much for your help.

Best regards


Christoph
#
On 13/nov/06, at 21:36, Kjell Konis wrote:

            
yes, that's was what I get, and that's why it always happen to me in  
the definition of long functions or loop, because I was using tabs :)

stefano