Re: [Rd] .Call - applying setAttrib(x, R_DimSymbol, s) to a matrix being an element of a list

2005-03-16 Thread Oleg Sklyar
Dear Simon, > you gave us only a fragment of your code, so I can only guess what the problem is: > What is imgSize? The behavior you describe seems as if you re-using the imgSize SEXP in all elements. > AFAIR in your case setAttrib doesn't copy the value, so you need to do so yourself (or alloc

[Rd] authentication support question

2005-03-16 Thread Vincent Carey 525-2265
I need to obtain username and password strings from the user of a certain process running in R. scan() can be used to get the strings, but the password will be echoed back as the user types it. Is there any way to load keyboard input to a variable without echoing the input back to the screen? Th

RE: Write Barrier: was: [Rd] function-like macros undefined

2005-03-16 Thread Prof Brian Ripley
On Wed, 16 Mar 2005, Vadim Ogranovich wrote: My actual problem was with the RAW() macro, it is not available as a function. I used INTEGER as an illustration because it was in the same group of macros, I guess I shouldn't have. It *is* available in R-devel, soon to be 2.1.0: the function was overl

RE: Write Barrier: was: [Rd] function-like macros undefined

2005-03-16 Thread Vadim Ogranovich
Luke, My actual problem was with the RAW() macro, it is not available as a function. I used INTEGER as an illustration because it was in the same group of macros, I guess I shouldn't have. Thank you for your other comments. I was confused, somehow I thought that in 2.0.x ALL access, even to the a

Re: Write Barrier: was: [Rd] function-like macros undefined

2005-03-16 Thread Luke Tierney
Your original question was about macro-like functions. INTEGER is available to internal R code as a macro; it is also available as a function. Code in packages that uses standard hearders will see the function, which is declared as int *(INTEGER)(SEXP x); I have no idea why you wanted to check wh

Re: Write Barrier: was: [Rd] function-like macros undefined

2005-03-16 Thread Simon Urbanek
On Mar 16, 2005, at 1:34 PM, Vadim Ogranovich wrote: * suppose that inside a C function I have a SEXP vector x of integers and I want to increment each element by one. I understand that Please correct me if I'm wrong, but I thought that the write barrier applies to assignments of SEXP values only

Write Barrier: was: [Rd] function-like macros undefined

2005-03-16 Thread Vadim Ogranovich
Hi, Thank you to Duncan Murdoch for pointing to http://www.stat.uiowa.edu/~luke/R/barrier.html. I have a couple of questions in this regard: * suppose that inside a C function I have a SEXP vector x of integers and I want to increment each element by one. I understand that int * xIPtr = INTEGER(

Re: [Rd] .Call - applying setAttrib(x, R_DimSymbol, s) to a matrix being an element of a list

2005-03-16 Thread Simon Urbanek
Oleg, you gave us only a fragment of your code, so I can only guess what the problem is: On Mar 16, 2005, at 12:40 PM, Oleg Sklyar wrote: // converting element into a matrix setAttrib(element, R_DimSymbol, imgSize); What is imgSize? The behavior you describe seems as if you re-using the imgSize

[Rd] .Call - applying setAttrib(x, R_DimSymbol, s) to a matrix being an element of a list

2005-03-16 Thread Oleg Sklyar
Dear R developers, I am writing some C code that loads multiple images into a list of R matrices. The whole R object is created within the C code. To simplify coding, elements of the list are first created as vectors and then converted to corresponding matrices using setAttrib(x, R_DimSymbol, s)

Re: [Rd] minor iconvlist() bug in r-devel

2005-03-16 Thread Prof Brian Ripley
On Wed, 16 Mar 2005, Deepayan Sarkar wrote: On Wednesday 16 March 2005 10:57, Prof Brian Ripley wrote: On Wed, 16 Mar 2005, Deepayan Sarkar wrote: On Wednesday 16 March 2005 10:11, Prof Brian Ripley wrote: That file is created by $(top_builddir)/library/$(pkg)/iconvlist: most @iconv -l > $

Re: [Rd] minor iconvlist() bug in r-devel

2005-03-16 Thread Deepayan Sarkar
On Wednesday 16 March 2005 10:57, Prof Brian Ripley wrote: > On Wed, 16 Mar 2005, Deepayan Sarkar wrote: > > On Wednesday 16 March 2005 10:11, Prof Brian Ripley wrote: > >> That file is created by > >> > >> $(top_builddir)/library/$(pkg)/iconvlist: most > >> @iconv -l > $@ 2> /dev/null ||

Re: [Rd] minor iconvlist() bug in r-devel

2005-03-16 Thread Prof Brian Ripley
On Wed, 16 Mar 2005, Deepayan Sarkar wrote: On Wednesday 16 March 2005 10:11, Prof Brian Ripley wrote: That file is created by $(top_builddir)/library/$(pkg)/iconvlist: most @iconv -l > $@ 2> /dev/null || touch $@ What version of iconv -l is that produces such a list? That in glibc 2.3.4

Re: [Rd] minor iconvlist() bug in r-devel

2005-03-16 Thread Deepayan Sarkar
On Wednesday 16 March 2005 10:11, Prof Brian Ripley wrote: > That file is created by > > $(top_builddir)/library/$(pkg)/iconvlist: most > @iconv -l > $@ 2> /dev/null || touch $@ > > What version of iconv -l is that produces such a list? That in glibc > 2.3.4 does not produce the header wh

Re: [Rd] minor iconvlist() bug in r-devel

2005-03-16 Thread Prof Brian Ripley
That file is created by $(top_builddir)/library/$(pkg)/iconvlist: most @iconv -l > $@ 2> /dev/null || touch $@ What version of iconv -l is that produces such a list? That in glibc 2.3.4 does not produce the header when redirected. Your fix is not safe: iconv in libiconv produces items se

[Rd] minor iconvlist() bug in r-devel

2005-03-16 Thread Deepayan Sarkar
This is on r-devel from 2005-03-15. iconvlist() uses (at least some of the time) icfile <- system.file("iconvlist", package = "utils") which looks like """ The following list contain all the coded character sets known. This does not necessarily mean that all combinations of these names can

Re: [Rd] function-like macros undefined

2005-03-16 Thread Duncan Murdoch
On Tue, 15 Mar 2005 18:58:32 -0800, "Vadim Ogranovich" <[EMAIL PROTECTED]> wrote : >Hi, > >Somehow function-like macros from Rinternals.h are not defined when I >include the file. > >foo.c >## >#include >#include > > >#ifndef NILSXP >#error("NILSXP") >#endif > > >#ifndef INTE

[Rd] Documentation: add link from "::" to "get" (PR#7729)

2005-03-16 Thread dkoschuetzki
Full_Name: Dirk Koschuetzki Version: 2.0.1 OS: Linux (Debian Sarge) Submission from: (NULL) (194.94.136.34) Please add a link from the page for "::" (accessing from name spaces) to the more general "get". Reason: Some package do not provide a name space add via "get" a (seoncd) method exists to

Re: [Rd] Trigonometric functions (PR#7728)

2005-03-16 Thread Robin Hankin
On Mar 15, 2005, at 11:26 pm, Thomas Lumley wrote: On Wed, 16 Mar 2005, Peter Kleiweg wrote: Thomas Lumley schreef op de 15e dag van de lentemaand van het jaar 2005: x<-sqrt(2) asin(x^2-1) result in: NaN The way I would deal with this would be to force asin() to work in complex mode: > x <-