Re: [Rd] R with Array Hashes

2015-03-20 Thread Jeffrey Horner
On Fri, Mar 6, 2015 at 10:03 AM, Jeffrey Horner wrote: > On Fri, Mar 6, 2015 at 9:36 AM, Dirk Eddelbuettel wrote: [...] >> When you asked about benchmark code on Twitter, I shared the somewhat >> well-known (but no R ...) http://benchmarksgame.alioth.debian.org/ >> Did you

Re: [Rd] R with Array Hashes

2015-03-06 Thread Jeffrey Horner
On Fri, Mar 6, 2015 at 9:36 AM, Dirk Eddelbuettel wrote: > > Jeff, > > Nice writeup and promising idea. From the "gimme numbers" department: > > - do you pass the R regression tests? I made sure that the implementation passed 99% of the tests, however there were two that gave differing results

[Rd] R with Array Hashes

2015-03-06 Thread Jeffrey Horner
Hi, I wanted to share with the mailing list members here details about the project I've been working on: https://github.com/jeffreyhorner/R-Array-Hash This is a re-implementation of R's hashed environments, the global variable cache, the global string cache and symbol table with cache-conscious

Re: [Rd] When collected warnings exceeds 50

2011-11-15 Thread Jeffrey Horner
On Thu, Nov 10, 2011 at 11:00 PM, Jeffrey Horner wrote: > On Thu, Nov 10, 2011 at 10:54 PM, Jeffrey Horner > wrote: >> Hi, >> >> I've been tracking down a memory leak in an rApache application, >> http://data.vanderbilt.edu/rapache/bbplot. The code was d

Re: [Rd] When collected warnings exceeds 50

2011-11-10 Thread Jeffrey Horner
On Thu, Nov 10, 2011 at 10:54 PM, Jeffrey Horner wrote: > Hi, > > I've been tracking down a memory leak in an rApache application, > http://data.vanderbilt.edu/rapache/bbplot. The code was deployed in > 2007 and has survived numerous upgrades of both R and rApache > (incl

[Rd] When collected warnings exceeds 50

2011-11-10 Thread Jeffrey Horner
Hi, I've been tracking down a memory leak in an rApache application, http://data.vanderbilt.edu/rapache/bbplot. The code was deployed in 2007 and has survived numerous upgrades of both R and rApache (including upgrades and bugs in RMySQL). It's written in such a way so that web crawlers will downl

Re: [Rd] grep and PCRE fun

2011-09-29 Thread Jeffrey Horner
On Thu, Sep 29, 2011 at 4:00 PM, Jeffrey Horner wrote: > Hello, > > I think I've found a bug in the C function do_grep located in > src/main/grep.c. It seems to affect both the latest revisions of > R-2-13-branch and trunk when compiling R without optimizations and > with i

[Rd] grep and PCRE fun

2011-09-29 Thread Jeffrey Horner
Hello, I think I've found a bug in the C function do_grep located in src/main/grep.c. It seems to affect both the latest revisions of R-2-13-branch and trunk when compiling R without optimizations and with it's own version of pcre located in src/extra, at least on ubuntu 10.04. According to the

Re: [Rd] parse_Rd raises error when example section contains a quoted percent character

2011-04-12 Thread Jeffrey Horner
Thanks for setting me straight, Kurt. Problem solved. Jeff On Tue, Apr 12, 2011 at 11:29 AM, Kurt Hornik wrote: >>>>>> Jeffrey Horner writes: > > % is the Rd comment character, and almost always needs to be escaped. > > Best > -k > >> I was writing

[Rd] parse_Rd raises error when example section contains a quoted percent character

2011-04-12 Thread Jeffrey Horner
I was writing Rd documentation for a new package when I came across this issue. Here's the smallest example: > library(tools) > cat("\\examples{x <- '<%=rnorm(1)%>'}\n",file=file.path(tempdir(),'test.Rd')) > readLines(file.path(tempdir(),'test.Rd')) [1] "\\examples{x <- '<%=rnorm(1)%>'}" > parse_R

[Rd] Testing for a reference class object

2011-03-10 Thread Jeffrey Horner
Hi all, I've constructed the following function to test whether or not an object was created from a reference class: isRefClassObject <- function(x) isS4(x) && is.environment(attr(x,'.xData')) && exists('.refClassDef',attr(x,'.xData')) but I'm unsure if it's a complete test or if there's a bette

Re: [Rd] Creating a reference class object from a class definition in a package fails

2011-02-03 Thread Jeffrey Horner
Apparently reference classes must be declared in the NAMESPACE file via an S4 declaration. If I place the following in the NAMESPACE file all is well: exportClasses(TestClass) export(TestClass) Jeff On Wed, Feb 2, 2011 at 9:25 PM, Jeffrey Horner wrote: > Hi, > > I'm trying to cr

[Rd] Creating a reference class object from a class definition in a package fails

2011-02-02 Thread Jeffrey Horner
Hi, I'm trying to create a package that contains reference class definitions from which users can create reference objects, but there seems to be something awry. My toy example creates an empty package via package.skeleton('TestClass') to which I add the following R code: TestClass <- setRefClas

Re: [Rd] Will PrintWarnings remain non static?

2010-11-05 Thread Jeffrey Horner
Anyone have comments on this? PrintWarnings would be nice to utilize for those embedding R. Thanks, Jeff On Fri, Oct 1, 2010 at 4:49 PM, Jeffrey Horner wrote: > Hi, > > The C function PrintWarnings is currently not in the C API, but it is > declared non static in the svn trunk as

[Rd] Will PrintWarnings remain non static?

2010-10-01 Thread Jeffrey Horner
Hi, The C function PrintWarnings is currently not in the C API, but it is declared non static in the svn trunk as of revision 53110 . As this is the only function that creates the last.warning object used by the R function warnings(), I think it would be useful for programs that embed R to be able

Re: [Rd] Development environment for R extentions on Windows

2010-09-10 Thread Jeffrey Horner
On Wed, Sep 8, 2010 at 6:39 PM, Duncan Murdoch wrote: > On 08/09/2010 5:37 PM, Jeffrey Horner wrote: >> >> On Wed, Sep 8, 2010 at 1:01 PM, Jeffrey Horner >> wrote: >>> >>> On Wed, Sep 8, 2010 at 12:37 PM, Duncan Murdoch >>> wrote: >&g

Re: [Rd] Development environment for R extentions on Windows

2010-09-08 Thread Jeffrey Horner
On Wed, Sep 8, 2010 at 1:01 PM, Jeffrey Horner wrote: > On Wed, Sep 8, 2010 at 12:37 PM, Duncan Murdoch > wrote: >>  On 08/09/2010 1:21 PM, Jeffrey Horner wrote: >>> >>> Hi all, >>> >>> I'm setting up a development environment on Windows as t

Re: [Rd] Development environment for R extentions on Windows

2010-09-08 Thread Jeffrey Horner
On Wed, Sep 8, 2010 at 12:37 PM, Duncan Murdoch wrote: >  On 08/09/2010 1:21 PM, Jeffrey Horner wrote: >> >> Hi all, >> >> I'm setting up a development environment on Windows as the subject >> implies. I've downloaded and installed Rtools211.exe (wil

[Rd] Development environment for R extentions on Windows

2010-09-08 Thread Jeffrey Horner
Hi all, I'm setting up a development environment on Windows as the subject implies. I've downloaded and installed Rtools211.exe (will upgrade later when necessary) and I've also downloaded and installed mingw with the help of mingw-get.exe. I come from a UNIX development background, so I'm at the

[Rd] Best way to determine if you're running 32 or 64 bit R on windows

2010-07-02 Thread Jeffrey Horner
Hi, Is this sufficient? if (.Machine$sizeof.pointer==4){ cat('32\n') } else { cat('64\n') } Or is it better to test something in R.version, say os? I'd like to use this to specify appropriate linker arguments when building the RMySQL windows package. Jeff -- http://biostat.mc.vanderbilt.e

Re: [Rd] Active bindings in attached environments

2009-11-05 Thread Jeffrey Horner
On Thu, Nov 5, 2009 at 9:53 AM, Jeffrey Horner wrote: > > Hi, > > Is this expected behavior for active bindings in attached > environments, or is this a bug: > > > e <- new.env() > > makeActiveBinding('x',function() 'foo',e) > > l

[Rd] Because it's Friday. was creating environments in package's C code

2009-10-02 Thread Jeffrey Horner
Simon Urbanek wrote on 10/01/2009 11:51 AM: [...] I suspect you like reinventing the wheel ;). Your NewInteger is part of the R API and is called ScalarInteger(). When you need something, chances are that R has it already, so it's worth greping through the headers (and sometimes even through th

Re: [Rd] Capturing all warnings (with messages)

2009-02-04 Thread Jeffrey Horner
Jeffrey Horner wrote on 02/04/2009 01:19 PM: Jon Clayden wrote on 02/04/2009 12:11 PM: Dear Jeff, Many thanks for the suggestion, but I don't think tryCatch() is the answer, mainly because it causes code to stop executing when a warning is signalled: f <- function(w) print(w

Re: [Rd] Capturing all warnings (with messages)

2009-02-04 Thread Jeffrey Horner
ht now, the way rapache notifies users of R warnings and errors is crude but works.) Jeff Regards, Jon 2009/2/4 Jeffrey Horner : Jon Clayden wrote on 02/04/2009 06:59 AM: Dear all, For an open-source project that I'm working on (1), which uses R for all its heavy lifting but incl

Re: [Rd] Capturing all warnings (with messages)

2009-02-04 Thread Jeffrey Horner
Jon Clayden wrote on 02/04/2009 06:59 AM: Dear all, For an open-source project that I'm working on (1), which uses R for all its heavy lifting but includes a wrapper shell script, I was hoping to find a way to capture all warnings (and, in fact, errors too), and handle them in my own way. I r

[Rd] Recommendations for next maintenance release of RMySQL

2009-01-28 Thread Jeffrey Horner
Hi, Due to the recent release of RMySQL 0.7-2 and incompatibilities with the MySQL client libraries, I'm planning the following change: Load-time check of compiled vs. loaded MySQL client library version. The client library version is an integer value with the format XYYZZ where X is the maj

[Rd] Expose clearPushBack for connections

2008-10-09 Thread Jeffrey Horner
Hi all, rapache relies on embedding R and assigning it's own function to ptr_R_ReadConsole so that users can read HTTP POST data from a request with readLines() with the stdin() connection. However, since stdin() is a non-blocking text connection, incomplete lines are silently pushed back ont

Re: [Rd] suggestion of new API function for embedded programming.

2008-09-04 Thread Jeffrey Horner
EBo wrote on 09/04/2008 10:33 AM: Simon Urbanek <[EMAIL PROTECTED]> said: Why do you think is R_ParseVector not sufficient for this? That is what most of use use to achieve exactly what you describe... For something that even mimics the continuation behavior of the R console have a look at p

Re: [Rd] Parsing code with newlines

2008-08-04 Thread Jeffrey Horner
Duncan Murdoch wrote on 08/04/2008 08:11 AM: On 04/08/2008 8:50 AM, Peter Jaeger wrote: Dear List, When I try to parse code containing newline characters with R_ParseVector, I get a compilation error. How can I compile code that includes comments and newlines? I am using the following: voi

Re: [Rd] Snow or alternative MPI packages on Windows

2008-07-17 Thread Jeffrey Horner
[EMAIL PROTECTED] wrote on 07/16/2008 08:52 AM: Guys, I'm running R on both Windows & Linux. I'm looking at a number of packages for parallel execution. It seems that the most used packages are "snow" and "Rmpi". snow seems more user friendly, but it doesn't run on windows. I see from searching

Re: [Rd] Embedded R, last errormessage, and stack smashing

2008-07-16 Thread Jeffrey Horner
Laurent Gautier wrote on 07/16/2008 08:02 AM: The only way to overcome the problem I can find is to tweak the R_CStackLimit with: R_CStackLimit = (uintptr_t) -1; The question I am having now is: what are the implications of doing so, that is what are the potential problems ? The problem is a

Re: [Rd] RFC: Add 'postinstall' hook to R CMD INSTALL ?

2008-06-06 Thread Jeffrey Horner
Prof Brian Ripley wrote: On Fri, 6 Jun 2008, Dirk Eddelbuettel wrote: Brian, Thanks for the follow-up. On 6 June 2008 at 11:34, Prof Brian Ripley wrote: | Isn't this what Type: Frontend is for? That gives you complete control | and would seem appropriate for both of your examples. Interest

Re: [Rd] error: C stack usage is too close to the limit.

2008-05-28 Thread Jeffrey Horner
rapache version 1.0.4 and earlier attempted to turn off stack-checking *before* initializing R. After reading the source, it seems that it should turn it off *after* initializing R. I've fixed this in the latest release of 1.0.5. Sorry for the confusion; it's hard to understand just from readi

[Rd] R crashes with debug()

2008-02-15 Thread Jeffrey Horner
I know this may be a pathological case, but I found it while debugging PopCon: Invoking a debugged function prior to the conclusion of setup_Rmainloop() will cause R to crash because R_ConsoleIob is not initialized until run_Rmainloop(). Tested in R-2-6-branch and trunk on Linux. Crash it lik

Re: [Rd] Vector binding on harddisk

2008-02-14 Thread Jeffrey Horner
Paul Gilbert wrote on 02/14/2008 09:14 AM: > > _ wrote: >> Hi all, >> Using big vectors (more than 4GB) is unfortunately not possible under >> Windows or other OS's if not enough RAM exists. > > This is NOT true. It is not limited by RAM, but rather by RAM and swap > space. With 500G hard disk

[Rd] RFC for package PopCon: a popularity contest for R and packages

2008-02-13 Thread Jeffrey Horner
Hello all, I've developed a prototype package called PopCon (short for popularity contest), a package for tracking the popularity of R and its packages. I'd like this work to be similar in spirit to the Debian package popularity-contest: http://popcon.debian.org/. Once Popcon is loaded, it cap

Re: [Rd] R valgrind question

2008-02-04 Thread Jeffrey Horner
Daniel Oberski wrote on 02/04/2008 02:21 PM: > Dear R developers > > > I am running an instrumented build of R 2.6.1 on ubuntu, compiled with > option configure --with-valgrind-instrumentation=3. > > If run valgrind R then I get all sorts of warnings. I was wondering > whether I should worry abo

Re: [Rd] RSQLite indexing

2007-10-22 Thread Jeffrey Horner
Thomas Lumley wrote on 10/22/2007 04:54 PM: > I am trying to use RSQLite for storing data and I need to create indexes on > two variables in the table. It appears from searching the web that the CREATE > INDEX operation in SQLite is relatively slow for large files, and this has > been > my exp

Re: [Rd] R-Server remotecontrolled via browser-GUI

2007-09-28 Thread Jeffrey Horner
idontwant googeltospyafterme wrote on 09/28/2007 09:33 AM: > dear r-community, > > currently i have a workflow as following: > data in online-MYSQL-database via .csv into R for analysis, results > back to mysql. > generating graphics for reports also. > > that's ok, but i need some process-optimi

[Rd] Memory leak possible when redirecting R console

2007-09-02 Thread Jeffrey Horner
Hello, To trigger the memory leak, an application embedding R will have printed a vector element of size R_BUFSIZE or more to stdout, so long as the R_Outputfile pointer is NULL and R was compiled with vasprintf support. The leak is in Rcons_vprintf from printutils.c. It looks as though some

Re: [Rd] Friday question: negative zero

2007-09-01 Thread Jeffrey Horner
[EMAIL PROTECTED] wrote: > > On 8/31/07, Duncan Murdoch <[EMAIL PROTECTED]> wrote: >> The IEEE floating point standard allows for negative zero, but it's hard >> to know that you have one in R. One reliable test is to take the >> reciprocal. For example, >> >> > y <- 0 >> > 1/y >> [1] Inf >>

[Rd] R graphics device for flash apps

2007-07-06 Thread Jeffrey Horner
Byron, I just read your blog (statcomp.blogspot.com, linked from your other post) and rand across your idea of an R/Flash graphics device. I've also been giving this some thought because of this amazing interactive flash app: http://tools.google.com/gapminder and others from http://www.gapmind

Re: [Rd] problem with findFun call from embedded R

2007-07-05 Thread Jeffrey Horner
Joe Conway wrote: > I was debugging a problem reported to me regarding PL/R, and found that > I can duplicate it using only R sources. It might be characterized as > possibly a misuse of the findFun() function, but I leave that for the R > devel experts to decide. > > The below results are all

Re: [Rd] readchar() bug or feature? was Re: Clarification for readChar man page

2007-06-15 Thread Jeffrey Horner
Jeffrey Horner wrote: > Jeffrey Horner wrote: >> Duncan Murdoch wrote: >>> On 6/14/2007 10:49 AM, Jeffrey Horner wrote: >>>> Hi, >>>> >>>> Here's a patch to the readChar manual page (R-trunk as of today) >>>> that better

[Rd] readchar() bug or feature? was Re: Clarification for readChar man page

2007-06-14 Thread Jeffrey Horner
Jeffrey Horner wrote: > Duncan Murdoch wrote: >> On 6/14/2007 10:49 AM, Jeffrey Horner wrote: >>> Hi, >>> >>> Here's a patch to the readChar manual page (R-trunk as of today) that >>> better clarifies readChar's return value. >> Yo

Re: [Rd] Clarification for readChar man page

2007-06-14 Thread Jeffrey Horner
Duncan Murdoch wrote: > On 6/14/2007 10:49 AM, Jeffrey Horner wrote: >> Hi, >> >> Here's a patch to the readChar manual page (R-trunk as of today) that >> better clarifies readChar's return value. > > Your update is not right. For example: > >

[Rd] Clarification for readChar man page

2007-06-14 Thread Jeffrey Horner
Hi, Here's a patch to the readChar manual page (R-trunk as of today) that better clarifies readChar's return value. It could use some work as I'd also like to add some text about using nchar() to find the length of the string that readchar() returns, but I'm unsure which of type="bytes" or typ

Re: [Rd] Possible changes to connections

2007-05-30 Thread Jeffrey Horner
Prof Brian Ripley wrote: > When I originally implemented connections in R 1.2.0, I followed the model > in the 'Green Book' closely. There were a number of features that forced > a particular implementation, and one was getConnection() that allows one > to recreate a connection object from a nu

[Rd] Duplicate assignment in function newbzfile on R-trunk

2007-05-09 Thread Jeffrey Horner
There's a duplicated assignment to new->fgetc in function newbzfile: Index: src/main/connections.c === --- src/main/connections.c (revision 41502) +++ src/main/connections.c (working copy) @@ -1311,7 +1311,6 @@ new->vf

Re: [Rd] sending signals to embedded R

2007-05-06 Thread Jeffrey Horner
Luke Tierney wrote: > On Sun, 6 May 2007 [EMAIL PROTECTED] wrote: > >> On 5/5/07, Luke Tierney <[EMAIL PROTECTED]> wrote: >>> On Sat, 5 May 2007, Prof Brian Ripley wrote: >>> On Sat, 5 May 2007, Luke Tierney wrote: > On Sat, 5 May 2007, Prof Brian Ripley wrote: > >> On Fri, 4

[Rd] Embedding R and registering routines

2007-05-01 Thread Jeffrey Horner
Hello, The use of .Call and the like all depend on loading shared libraries and registering routines from it. Also, .Primitive and .Internal depend on routines being registered in the R binary. And applications that embed R can override routines declared in Rinterfac.h, but is there a way for a

[Rd] Nonexistent URL in R_ext/Callbacks.h

2007-05-01 Thread Jeffrey Horner
There's no RObjectTables.pdf at developer.r-project.org. I included the Omegahat URL from the attach help page: nonexistent Index: src/include/R_ext/Callbacks.h === --- src/include/R_ext/Callbacks.h (revision 41399) +++ src/in

[Rd] R-exts.texi typo

2007-04-25 Thread Jeffrey Horner
Index: doc/manual/R-exts.texi === --- doc/manual/R-exts.texi (revision 41314) +++ doc/manual/R-exts.texi (working copy) @@ -8951,7 +8951,7 @@ @deftypefun int R_ReadConsole (char [EMAIL PROTECTED], unsigned char [EMAIL PROT

[Rd] sys.call and friends

2007-04-17 Thread Jeffrey Horner
Hello, I noticed that sys.frame treats which = 0 differently than sys.call and sys.function, and the documentation was unclear about it. > f <- function() sys.call() > f() f() > f <- function() sys.function() > f() function() sys.function() > f <- function() sys.frame() > f() sys.frame(0) a

[Rd] Documentation update to R-lang.texi

2007-04-16 Thread Jeffrey Horner
Section 4.3.4 of R-lang.texi version 41191 in the paragraph that starts "When h(3) is..." explains that x and y are unbound variables in the function body of g in this example: f <- function(x) { y <- 10 g <- function(x) x + y return(g) } h <- f()

[Rd] Documentation bug for sys.parent

2007-04-16 Thread Jeffrey Horner
In R-trunk version 41191, the 'Value' section of sys.parent.Rd explains that sys.parent() returns an environment, which is wrong. The 'Details' sections explains that it returns the number of the parent frame, etc. Here's a fix: Index: src/library/base/man/sys.parent.Rd

[Rd] Subtle bug in do_basename

2007-03-24 Thread Jeffrey Horner
Hello, I've been wondering why my no-optimization R-devel builds have been hanging during "building/updating package indices ...". I tracked it down with gdb to this line from do_basename in utils.c: while ( *(p = buf + strlen(buf) - 1) == fsp ) *p = '\0'; Now, imagine if your compiler places

Re: [Rd] wishlist -- Fix for major format.pval limitation (PR#9574)

2007-03-21 Thread Jeffrey Horner
Duncan Murdoch wrote: > On 3/21/2007 3:39 AM, Martin Maechler wrote: >>> "Gabor" == Gabor Grothendieck <[EMAIL PROTECTED]> >>> on Tue, 20 Mar 2007 22:10:27 -0400 writes: >> Gabor> On 3/20/07, Duncan Murdoch <[EMAIL PROTECTED]> wrote: >> >> On 3/20/2007 1:40 PM, Gabor Grothendiec

[Rd] Formatting difftime objects

2007-02-23 Thread Jeffrey Horner
I like the new difftime functionality. Here's a dataframe of 5k run times: > r5k racedate totaltime pace mile 1 RUDOLPH 2004-12-03 19:00:00 27.76667 mins 8.937224 mins 3.106856 2 RUDOLPH 2005-12-02 18:30:00 25.28333 mins 8.137916 mins 3.106856 3

[Rd] Patch for "units<-" in datetime.R

2007-02-22 Thread Jeffrey Horner
Index: src/library/base/R/datetime.R === --- src/library/base/R/datetime.R (revision 40781) +++ src/library/base/R/datetime.R (working copy) @@ -381,7 +381,7 @@ if (from == value) return(x) if (!(value %in% c(

Re: [Rd] Adding difftime objects to POSIXt objects

2007-02-21 Thread Jeffrey Horner
Jeffrey Horner wrote: > Hello, > > ?DateTimeClasses states that "one can add or subtract a number of > seconds or a 'difftime' object from a date-time object, but not add two > date-time objects." > > So, is the below expected behavior? > > >

[Rd] Adding difftime objects to POSIXt objects

2007-02-21 Thread Jeffrey Horner
Hello, ?DateTimeClasses states that "one can add or subtract a number of seconds or a 'difftime' object from a date-time object, but not add two date-time objects." So, is the below expected behavior? > x <- Sys.time() > x [1] "2007-02-21 16:19:56 CST" > x + as.difftime("1","%H") [1] "2007-

Re: [Rd] SEXP i/o, .Call(), and garbage collection.

2007-02-02 Thread Jeffrey Horner
K. B. Udaya wrote: > Apologies for any obtuseness in the following. We have been working > on Version 2.0 of the randomSurvivalForest CRAN package and we're > encountering a perplexing 'memory not mapped' segfault that we believe > is "influenced" by GC. [...] > We are wondering if there is someth

Re: [Rd] PGF Device

2007-01-31 Thread Jeffrey Horner
Paul Murrell wrote: > Hi > > > Thomas Lumley wrote: >> On Wed, 31 Jan 2007, Prof Brian Ripley wrote: >>> There are several devices in packages, and this has been possible since at >>> least R 1.4.0 (from 2001). There used to be gtkDevice (still on CRAN, but >>> old Gtk), GNOMEdevice (never finis

Re: [Rd] PGF Device

2007-01-31 Thread Jeffrey Horner
Duncan Murdoch wrote: > On 1/31/2007 8:49 AM, Prof Brian Ripley wrote: >> On Wed, 31 Jan 2007, Duncan Murdoch wrote: >> >>> On 1/30/2007 8:50 PM, jtxx000 wrote: Greetings all, PGF is a package for LaTeX which works with both ps and pdf output without any nasty hacks like pictex.

[Rd] Miniscule patch to internet.c

2007-01-11 Thread Jeffrey Horner
Looks like a benign copy-paste issue. This is in R_newurl, and I doubt anyone would miss that one byte, though. Index: src/modules/internet/internet.c === --- src/modules/internet/internet.c (revision 40446) +++ src/modules/inter

Re: [Rd] How to execute R scripts simultaneously from multiple threads

2007-01-04 Thread Jeffrey Horner
Vladimir Dergachev wrote: > On Thursday 04 January 2007 4:54 am, Erik van Zijst wrote: >> Vladimir Dergachev wrote: >>> On Wednesday 03 January 2007 3:47 am, Erik van Zijst wrote: Appearantly the R C-API does not provide a mechanism for parallel execution.. It is preferred that

Re: [Rd] Phonetic symbols (IPA) in R graphics

2006-12-19 Thread Jeffrey Horner
Giampiero Salvi wrote: > Hi Hin-Tak Leung, > thank you for your help. Paul and I had solved the problem off-line. > Here is the solution: the encoding file contained in the tipa package > is not in adobe format and therefore causes the problem. The default > encoding, however, seems to work well. I

Re: [Rd] How can I call a function R from C

2006-11-22 Thread Jeffrey Horner
Ricardo Rios wrote: > Hi wizards, I have a function in R for example: > anyfunction<-function(beta0, popsize, maxgen), > > but I have a function in C for example: > > SEXP otherfunction(SEXP beta0, SEXP popsize, SEXP maxgen) > > I call it function with .Call but I need to call to anyfunction o

[Rd] Connections patch

2006-11-02 Thread Jeffrey Horner
I've implemented an R Connections API for packages writers and those embedding R into other systems. The patch is here: http://biostat.mc.vanderbilt.edu/twiki/pub/Main/RApacheProject/Conn-patch-R-devel-r39773.patch and I've started an R wiki for discussion here: http://wiki.r-project.org/rwiki/

Re: [Rd] Discussion starter for package level Connection API

2006-10-09 Thread Jeffrey Horner
Here's a function to create new connections. It returns and SEXP that can be returned to R code, but before that, the user can set up all the function pointer members via passing in the address of an Rconnection. Here's how you'd call it: SEXP newcon; Rconnection conptr; newcon = R_NewConnecti

[Rd] Discussion starter for package level Connection API

2006-10-09 Thread Jeffrey Horner
Thought I'd try and start a discussion. Feel free to jump in. I guess R needs to strike the right balance between opening up the internals to package writers and not allowing them to do bad things. My first attempt at cracking this nut is to just memcpy() the Rconnection and not allow access to

Re: [Rd] Request to open up getConnection to embedded interface

2006-10-07 Thread Jeffrey Horner
Duncan Temple Lang wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > > Hi Jeff > > Robert Gentleman and I were just conversing about the need to > make connections part of the general API in some way, be it > as they are now or slightly changed. It is not just for > the embedded ca

[Rd] Request to open up getConnection to embedded interface

2006-10-07 Thread Jeffrey Horner
Hello all, I would like to request that getConnection() and the struct Rconn declarations be added to the R embedded interface. Here's why. It's common in CGI scripts for web applications to direct stdin, stdout, and stderr map to reading from the browser, writing to the browser, and writing t

Re: [Rd] Possible bug in Rcons_vprintf

2006-10-03 Thread Jeffrey Horner
strlen(buf)); -- ./src/gnuwin32/system.c-buf[len] = '\0'; ./src/gnuwin32/system.c:R_WriteConsole(buf, strlen(buf)); -- ./src/gnuwin32/system.c-fflush(R_Consolefile); ./src/gnuwin32/system.c:} else R_WriteConsole(s,

[Rd] Possible bug in Rcons_vprintf

2006-09-29 Thread Jeffrey Horner
In R-2-4-branch r39548, Rcons_vprintf is called from stdout_vfprintf when R_Outputfile is NULL. When called and output is greater than R_BUFSIZE, output is truncated to R_BUFSIZE. Here's a one-line fix: Index: src/main/printutils.c ==

[Rd] Ice cream flavor metaphor in statistical computing

2006-09-15 Thread Jeffrey Horner
Forgive me, but since it's Friday and I've been thinking about command line options lately, I thought I'd find out who came up with the name of the --vanilla argument for R. From the svn log: r2509 | maechler | 1998-10-10 1

[Rd] No more autload() calls in .First.sys() ?

2006-09-13 Thread Jeffrey Horner
Jeffrey Horner wrote: [...] > This raises an interesting topic for me: > > In R-2.3.1, .First.sys() autloads() a few functions from the various > default packages (utils, stats, methods, graphics) IF those packages > weren't specified in the default packages option

Re: [Rd] Error: package/namespace load failed for 'fortunes'

2006-09-13 Thread Jeffrey Horner
Gregor Gorjanc wrote: > Hello! > > I have the following R code in my .Rprofile file - just for fun. > > library(fortunes) > fortune() > detach("package:fortunes") > > This works nicely in R 2.3.1, but it throws the following error under > latest R-devel: > > ... > ... > Type 'demo()' for

Re: [Rd] Overriding InitTempDir

2006-09-01 Thread Jeffrey Horner
d time: R-devel is about to start solidifying towards > 2.4.0, and we have quite a few issues to work through (e.g. the internal > changes to S4 methods). Of course, that does seem a bit more important. > > > On Fri, 1 Sep 2006, Jeffrey Horner wrote: > >> Jeffrey Horne

Re: [Rd] Overriding InitTempDir

2006-09-01 Thread Jeffrey Horner
Jeffrey Horner wrote: > For embedded projects, one may want to eliminate the per-session temp > directory created by InitTempDir() and just use a system-specific temp > directory. Here's my solution: > > extern char *R_TempDir; > > void my_InitTempDir() > { &

[Rd] Overriding InitTempDir

2006-08-31 Thread Jeffrey Horner
For embedded projects, one may want to eliminate the per-session temp directory created by InitTempDir() and just use a system-specific temp directory. Here's my solution: extern char *R_TempDir; void my_InitTempDir() { char *tmp; if (R_TempDir){ if (rmdir(R_TempDir) != 0){

Re: [Rd] stop R mainloop without calling exit(1)

2006-08-31 Thread Jeffrey Horner
Thomas Kelder wrote: [...] > By the way, I use R version 2.2.1 in linux, because I got the "Error: > C stack usage is too close to the limit R" error in higher versions (I > saw there was a topic about this already: > https://stat.ethz.ch/pipermail/r-devel/2006-April/037219.html). I > tried to use

Re: [Rd] Command line length limits in R

2006-08-25 Thread Jeffrey Horner
Prof Brian Ripley wrote: > I've been trying to track down some of the issues with command line length > limits, and those writing GUIs/front-ends need to pay some attention to > the issue. > > src/unix/system.txt says > > *int R_ReadConsole(char *prompt, char *buf, int buflen, int hist)

Re: [Rd] Using TCP/IP sockets in R

2006-08-16 Thread Jeffrey Horner
able on windows) which clones the parent process, to handle multiple clients. -- Jeffrey Horner Computer Systems Analyst School of Medicine 615-322-8606 Department of Biostatistics Vanderbilt University __ R-devel@r-project.org

Re: [Rd] R as shell script

2006-07-14 Thread Jeffrey Horner
Initialize R interpreter */ Rf_initEmbeddedR(R_argc, R_argv); /* Now call R function source(filename) */ call_fun1str("source",argv[argc-1]); exit(0); } Feel free to logon to the R wiki and contribute to the page. I think it would be interesting to solve this once and fo

Re: [Rd] Stack checking, core dumps, and embedding R

2006-04-11 Thread Jeffrey Horner
-1. The status quo relies on the > embedding application to set the stack base - I don't know if that's > a good idea. Opinions? > > Cheers, > Simon > > __ > R-devel@r-project.org mailing list > https://stat.e

[Rd] Writing character vectors with embedded nulls to a connection

2006-03-30 Thread Jeffrey Horner
but they do have max column size limits which must be honored. BTW, readchar() can read strings with embedded nulls; I figured writeChar() should be able to write them. -- Jeffrey Horner Computer Systems Analyst School of Medicine 615-322-8606 Department of Bio

Re: [Rd] Wishlist - Give R a name that shows up in search engines ...

2006-03-08 Thread Jeffrey Horner
only 1 points to an R project website. -- Jeffrey Horner Computer Systems Analyst School of Medicine 615-322-8606 Department of Biostatistics Vanderbilt University __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Utilizing the internet module

2006-02-24 Thread Jeffrey Horner
Prof Brian Ripley wrote: > On Thu, 23 Feb 2006, Jeffrey Horner wrote: [...] >> On a related note, how do I serialize() an R object to a database >> table column of type BLOB? I've tried using RODBC but was >> unsuccessfully (see R-sig-DB in Feb archive). I've also

Re: [Rd] Utilizing the internet module

2006-02-23 Thread Jeffrey Horner
Prof Brian Ripley wrote: > On Thu, 23 Feb 2006, Jeffrey Horner wrote: > >> Hello all, >> >> I'd like to utilize the R_Sock* functions from R_ext/R-ftp-http.h in my >> R package. The intent is to use these in conjunction with R_serialize() >> to store R

[Rd] Utilizing the internet module

2006-02-23 Thread Jeffrey Horner
is input for the dynamic link editor, is not relocatable by the static link editor again Thanks in advance, -- Jeffrey Horner Computer Systems Analyst School of Medicine 615-322-8606 Department of Biostatistics Vanderbilt University __

Re: [Rd] call fortran in R

2005-08-04 Thread Jeffrey Horner
rn much, you will, from Master Ripley... -- Jeffrey Horner Computer Systems Analyst School of Medicine 615-322-8606 Department of Biostatistics Vanderbilt University __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] motivation for setRepositories and chooseCRANmirror

2005-06-16 Thread Jeffrey Horner
set options(CRAN = "http://cran.us.r-project.org/";). Will this be changed to calling chooseCRANmirror()? From an administrator's point of view, I would like to have the CRAN option set automatically on R startup for ALL users. That way I don't have to set this opti