Re: [Rd] cat with backspace and newline characters

2013-11-05 Thread Yihui Xie
Yes, that indeed sounds like a problem, but example(txtProgressBar), which is based on \r, works well in the RStudio console. Anyway, thanks for all the experiments, and (to Renaud) support.rstudio.org is the place to report such problems. Regards, Yihui -- Yihui Xie Web: http://yihui.name Depart

Re: [Rd] Dynamic list creation (SEXP in C) returns error "unimplemented type (29) in 'duplicate'"

2013-11-05 Thread George Vega Yon
I'll use it and share the output with you. Thanks! George Vega Yon +56 9 7 647 2552 http://ggvega.cl 2013/11/5 Prof Brian Ripley : > On 05/11/2013 21:12, Gabriel Becker wrote: >> >> George, >> >> I don't see the relevance of the stackoverflow post you linked. In the >> post, the author wanted to

Re: [Rd] Dynamic list creation (SEXP in C) returns error "unimplemented type (29) in 'duplicate'"

2013-11-05 Thread George Vega Yon
Either way, understanding that it may not be the best way of do it, is there anything wrong in what I'm doing?? George Vega Yon +56 9 7 647 2552 http://ggvega.cl 2013/11/5 Gabriel Becker : > George, > > My point is you don't need to create them and then grow them > > > for(i=0;i { > // Crea

Re: [Rd] cat with backspace and newline characters

2013-11-05 Thread peter dalgaard
On 05 Nov 2013, at 17:53 , Martin Maechler wrote: >> "PhGr" == Philippe Grosjean >>on Tue, 5 Nov 2013 17:02:19 +0100 writes: > >PhGr> On 05 Nov 2013, at 14:22, Martin Maechler >PhGr> wrote: > Kenn Konstabel on Tue, 5 Nov 2013 13:25:20 +0200 writes: >>>

Re: [Rd] Dynamic list creation (SEXP in C) returns error "unimplemented type (29) in 'duplicate'"

2013-11-05 Thread Gabriel Becker
George, My point is you don't need to create them and then grow them for(i=0;i wrote: > Gabriel, > > While the length (in terms of number of SEXP elements it stores) of L1 > doesn't changes, the vectors within L1 do (sorry if I didn't explained > it well before). > > The post was about a SEX

Re: [Rd] Dynamic list creation (SEXP in C) returns error "unimplemented type (29) in 'duplicate'"

2013-11-05 Thread George Vega Yon
Gabriel, While the length (in terms of number of SEXP elements it stores) of L1 doesn't changes, the vectors within L1 do (sorry if I didn't explained it well before). The post was about a SEXP object that grows, in my case, every pair of vectors in L1 (id and lambda) can change lengths, this is

Re: [Rd] Dynamic list creation (SEXP in C) returns error "unimplemented type (29) in 'duplicate'"

2013-11-05 Thread Prof Brian Ripley
On 05/11/2013 21:12, Gabriel Becker wrote: George, I don't see the relevance of the stackoverflow post you linked. In the post, the author wanted to change the length of an existing "mother list" (matrix, etc), while you specifically state that the length of L1 will not change. You say that the

Re: [Rd] Dynamic list creation (SEXP in C) returns error "unimplemented type (29) in 'duplicate'"

2013-11-05 Thread Gabriel Becker
George, I don't see the relevance of the stackoverflow post you linked. In the post, the author wanted to change the length of an existing "mother list" (matrix, etc), while you specifically state that the length of L1 will not change. You say that the child lists (vectors if they are INTSXP/REAL

Re: [Rd] cat with backspace and newline characters

2013-11-05 Thread Martin Maechler
> "PhGr" == Philippe Grosjean > on Tue, 5 Nov 2013 17:02:19 +0100 writes: PhGr> On 05 Nov 2013, at 14:22, Martin Maechler PhGr> wrote: >>> Kenn Konstabel on Tue, 5 Nov >>> 2013 13:25:20 +0200 writes: >> >>> I just tried it on ubuntu but within RStud

Re: [Rd] [PATCH] minor suggestions for R-ints manual

2013-11-05 Thread Martin Maechler
> Scott Kostyshak > on Sat, 12 Oct 2013 17:50:52 -0400 writes: > Attached is a patch with minor suggestions for the R-ints > manual at r64048. The most substantial change is the > following: > The top layer comprises the graphics subsystems. Although > there is -

Re: [Rd] cat with backspace and newline characters

2013-11-05 Thread Philippe Grosjean
On 05 Nov 2013, at 14:22, Martin Maechler wrote: >> Kenn Konstabel >>on Tue, 5 Nov 2013 13:25:20 +0200 writes: > >> I just tried it on ubuntu but within RStudio: >>> cat("abc\b") >> ab >>> cat("abc\b\n") >> ab >>> sessionInfo() > > which --- as you allude to below --- shows that

Re: [Rd] cat with backspace and newline characters

2013-11-05 Thread Martin Maechler
> Brian G Peterson > on Tue, 5 Nov 2013 07:30:14 -0600 writes: > On 11/05/2013 07:22 AM, Martin Maechler wrote: >> which --- as you allude to below --- shows that RStudio >> has changed R in so far that it adds a '\n' even when R, >> i.e. cat() does not. >> >

Re: [Rd] cat with backspace and newline characters

2013-11-05 Thread Renaud Gaujoux
Thanks for the clarification. This appears to be a terminal behaviour issue. It is user lack-of-understanding: there is no error here. > I believe lack of understanding is probably amongst the top reasons why users post to the list and get happily enlightened. I don't think I said there was an er

Re: [Rd] cat with backspace and newline characters

2013-11-05 Thread Brian G. Peterson
On 11/05/2013 07:22 AM, Martin Maechler wrote: which --- as you allude to below --- shows that RStudio has changed R in so far that it adds a '\n' even when R, i.e. cat() does not. I can understand that the RStudio programmers want to protect their users (*) from getting funny looking outpu

Re: [Rd] cat with backspace and newline characters

2013-11-05 Thread Martin Maechler
> Kenn Konstabel > on Tue, 5 Nov 2013 13:25:20 +0200 writes: > I just tried it on ubuntu but within RStudio: >> cat("abc\b") > ab >> cat("abc\b\n") > ab >> sessionInfo() which --- as you allude to below --- shows that RStudio has changed R in so far that it

[Rd] Dynamic list creation (SEXP in C) returns error "unimplemented type (29) in 'duplicate'"

2013-11-05 Thread George Vega Yon
Dear R-devel, A couple of weeks ago I started to use the R C API for package development. Without knowing much about C, I've been able to write some routines sucessfully... until now. My problem consists in dynamically creating a list ("L1") of lists using .Call, the tricky part is that each elem

Re: [Rd] cat with backspace and newline characters

2013-11-05 Thread Prof Brian Ripley
It is user lack-of-understanding: there is no error here. R outputs a b c backspace newline How the terminal displays that is up to the terminal, which was unstated. (Capture the output and look at it in a hex editor.) For a b c backspace a normal terminal will output the prompt and overw

Re: [Rd] cat with backspace and newline characters

2013-11-05 Thread Kenn Konstabel
I just tried it on ubuntu but within RStudio: > cat("abc\b") ab > cat("abc\b\n") ab > sessionInfo() R version 3.0.2 (2013-09-25) Platform: x86_64-pc-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=C LC_COLLATE=C [5] LC_MONETARY=CLC_MESSAGES=CLC_P

Re: [Rd] cat with backspace and newline characters

2013-11-05 Thread Renaud Gaujoux
Maybe it's a Linux problem: > cat("abc\b") ab> cat("abc\b\n") abc > sessionInfo() R version 3.0.2 (2013-09-25) Platform: x86_64-pc-linux-gnu (64-bit) locale: [1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_US.UTF-8LC_COLLATE=en_US.UTF-8 [5] LC_MONETARY=en_US.UTF-8LC_MESS