Re: [Rd] using rasterImage within image

2011-02-08 Thread Simon Urbanek
hope. Unfortunately I'm not aware of an easy fix (that doesn't involve going back to RGB decomposition). In general, I think it's a nice option, but I don't think you'll get away with only a few lines... Cheers, Simon On Feb 8, 2011, at 8:49 PM, Ben Bolker wrot

Re: [Rd] using rasterImage within image

2011-02-09 Thread Simon Urbanek
e in R (it has crept in more recently making it horribly inconsistent) so please feel free to suggest a better name ;). Thanks, Simon On Feb 9, 2011, at 10:06 AM, Ben Bolker wrote: > On 11-02-08 10:03 PM, Simon Urbanek wrote: >> Ben, >> >> did you actually look at t

Re: [Rd] using rasterImage within image

2011-02-09 Thread Simon Urbanek
On Feb 9, 2011, at 2:36 PM, Henrik Bengtsson wrote: > On Wed, Feb 9, 2011 at 11:25 AM, Simon Urbanek > wrote: >> Ben, >> >> I have committed something analogous to R-devel (your rotation code was not >> unlike mine, I replicated the color handling from R int

Re: [Rd] Writting my own package - 64 bit problem with R_GetCCallable

2011-02-11 Thread Simon Urbanek
te that your bug is there even in 32-bit -- you will see " implicit declaration of function" in any case -- it just is not fatal, incidentally. It is a good idea to listen to the compiler ... ;). Cheers, Simon > -- > > The function in question is an identical copy of

Re: [Rd] R limits documented?

2011-02-11 Thread Simon Urbanek
1] NA Warning message: NAs introduced by coercion (ok, for those that this is not obvious: the integer type ("int" in C) is 32-bit wide and it is a signed type so the range is -2^31-1 .. 2^31-1 -- the minus one on each side is the representation of NA and 0 respectively). Cheers, Sim

Re: [Rd] R limits documented?

2011-02-11 Thread Simon Urbanek
On Feb 11, 2011, at 8:45 PM, Simon Urbanek wrote: > > On Feb 11, 2011, at 7:55 PM, David Winsemius wrote: > >> >> On Feb 11, 2011, at 7:09 PM, Dominick Samperi wrote: >> >>> Is there documentation on R limits? >>> That is, max matrix size, etc.?

Re: [Rd] readPNG gives warnings and doesn't execute sample code from help files

2011-02-14 Thread Simon Urbanek
es you are using. If you don't want to (or can't) use a device that supports alpha, you'll have to flatten the alpha, - i.e. plot just img[,,1:3] However, most images don't have color where alpha is zero, so you'll have to replace it with the background color, e.g.: r =

Re: [Rd] using rasterImage within image

2011-02-14 Thread Simon Urbanek
ow repeat the reported workflow and the image appears on the >>> fifth (and subsequent) calls. >> >> Great. Thanks for checking. >> >> Paul >> > > > That's great. > > Just a little bump: I would encourage Simon (in his copious spa

Re: [Rd] using rasterImage within image

2011-02-14 Thread Simon Urbanek
On Feb 14, 2011, at 2:28 PM, Paul Murrell wrote: > Hi > > On 15/02/2011 8:11 a.m., Simon Urbanek wrote: >> >> On Feb 14, 2011, at 12:26 PM, Ben Bolker wrote: >> >>> Paul Murrell auckland.ac.nz> writes: >>> >>>> >>>>

Re: [Rd] Using rasterImage on a CairoWin device prevents adding further elements to device?

2011-02-15 Thread Simon Urbanek
Joris, I have added raster support only recently (last week ;)) and there was a bug causing what you see. I have fixed it now so Cairo 1.4-7 will have the fix. Thanks, Simon On Feb 15, 2011, at 9:48 AM, Joris Meys wrote: > I was pointed to the Cairo package for plotting PNG images o

Re: [Rd] pre-release?

2011-02-19 Thread Simon Urbanek
.2 is not released yet. This is on a Mac, with 2.12.1. > This comes from the fact that the R-2.12-patched branch has moved from 2.12.1 at the time of the beta to 2.12.2 -- (now RC BTW). Cheers, Simon __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Problem using F77_CALL(dgemm) in a package

2011-02-20 Thread Simon Urbanek
elapsed 0.658 0.004 0.665 (it's not just a measurement error - it's consistent for more replications etc. - but it's really negligible - possibly just due to dispatch of %*%) Cheers, Simon On Feb 20, 2011, at 5:23 PM, Jason Rudy wrote: > It was indeed a simple proble

Re: [Rd] Using src/ to create executable - how to not build shared objects?

2011-02-21 Thread Simon Urbanek
the only way you can install it in multi-arch build (since you can't use inst in that case). That said, you can simply build your "executable" in a subdirectory which is I'd recommend for anything other than contents that you want

Re: [Rd] Problem using F77_CALL(dgemm) in a package

2011-02-22 Thread Simon Urbanek
's why you still find a lot of .C code. Personally I don't use .C at all because compared to .Call it is so cumbersome and error-prone (you can't even tell the length of the passed vectors in C!), but others have different preferences. Cheers, Simon > On Sun, Feb 20

Re: [Rd] factor() on a double vector

2011-02-23 Thread Simon Urbanek
Herve, the answer is simple - it's as.character() - it has nothing to do with factor or table. > as.character(x) [1] "3.67" "3.67" "3.66" "3.67" That's what you are passing to factor, so you ge

Re: [Rd] broken link on CRAN

2011-02-28 Thread Simon Urbanek
spect you have a cached page in your browser - try reloading it. Cheers, Simon > Also, the email address for the webmaster is null (which is > why I'm emailing here). > > Thanks, > > Max > > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] How to disable R's crash prompt

2011-03-08 Thread Simon Urbanek
On Mar 8, 2011, at 10:01 AM, wrote: > Thanks for your quick comment Mr. Ripley. I'm a newbie in R so excuse me for > not knowing the obvious. Could you elaborate on what code I should look at, > and what documentation I should go to? > > This is my C++ code on calling embedded R (on redha

[Rd] unique.matrix issue [Was: Anomaly with unique and match]

2011-03-09 Thread Simon Urbanek
to take into account all values of a row/column so it pastes all values into one string, but for the two numbers that is the same: > as.character(x) [1] "1" "1" Cheers, Simon On Mar 9, 2011, at 9:48 AM, Terry Therneau wrote: > I stumbled onto this working on an update

Re: [Rd] about textConnection

2011-03-14 Thread Simon Urbanek
uld be the name of a character vector: however, short expressions will be accepted provided they deparse to less than 60 bytes. Cheers, Simon On Mar 14, 2011, at 7:32 AM, Kenn Konstabel wrote: > Hello, > > `textConnection` prepares arguments for an internal function, and one of

Re: [Rd] New feature for download.packages(): optional resolution of package dependencies

2011-03-17 Thread Simon Urbanek
g something along the lines of if (!missing(dependencies)) pkg <- getDependencies(pkg, dependencies, available) might be simple enough and do the trick ... Cheers, Simon > AFAICS in the svn, as of rev54842, he has not found the time > for looking deeper into this so far. Surely, like most of >

Re: [Rd] passing a 2D array from Java to R

2011-03-18 Thread Simon Urbanek
run something like sapply(a,.jevalArray). Cheers, Simon __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] R_HOME path getting munged in inst/doc/Makefile on Windows

2011-03-21 Thread Simon Urbanek
echo R_HOME: $(R_HOME) [...] echo R_HOME: c:/PROGRA~1/R/R-212~1.2 R_HOME: c:/PROGRA~1/R/R-212~1.2 But I see that you have custom rhome setting (BBS...) so changes are that is the culprit - the rhome for that R build is set incorrectly to contain backslashes. Cheers, Simon > and ge

Re: [Rd] use scan("http://www.example.com/file.htm") with an hidden-fake IP adress

2011-03-28 Thread Simon Urbanek
fferent IP is to use another machine that has a different IP (e.g., a proxy server). Cheers, Simon __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Reading 64-bit integers

2011-03-29 Thread Simon Urbanek
[1] 4294967296 > > I wouldn't expect readBin() to return a double if an integer was > requested, but is there any way to get the correct value out of it? Trivially (for your unsigned big-endian case): y <- readBin(x, "integer", n=length(x)/4L, endian="big") y

Re: [Rd] Reading 64-bit integers

2011-03-29 Thread Simon Urbanek
Jon, On Mar 29, 2011, at 1:33 PM, Jon Clayden wrote: > Dear Simon, > > Thank you for the response. > > On 29 March 2011 15:06, Simon Urbanek wrote: >> >> On Mar 29, 2011, at 8:46 AM, Jon Clayden wrote: >> >>> Dear all, >>> >>&

Re: [Rd] Reading 64-bit integers

2011-03-29 Thread Simon Urbanek
On Mar 29, 2011, at 8:47 PM, Duncan Murdoch wrote: > On 29/03/2011 7:01 PM, Jon Clayden wrote: >> Dear Simon, >> >> On 29 March 2011 22:40, Simon Urbanek wrote: >>> Jon, >>> >>> On Mar 29, 2011, at 1:33 PM, Jon Clayden wrote: >>>

Re: [Rd] problem with png() and large dimensions on some 32-bit Windows machines

2011-03-29 Thread Simon Urbanek
quot;Cairo",,"http://rforge.net";) ] That doesn't depend on the OS resources, only on RAM so it may be in theory more scalable. Cheers, Simon On Mar 29, 2011, at 9:10 PM, Dan Tenenbaum wrote: > Hello, > > I encountered this: > >> png(file=tempfile(), width=11

Re: [Rd] Reading 64-bit integers

2011-03-30 Thread Simon Urbanek
dealt with via as.integer(readBin()) instead. I won't have more time today, but I'll have a look tomorrow. Thanks, Simon On Mar 30, 2011, at 1:38 PM, William Dunlap wrote: > >> -Original Message- >> From: r-devel-boun...@r-project.org >> [mailto:r-devel-b

Re: [Rd] "R CMD check" accepts but "R CMD INSTALL" rejects a tar ball.

2011-04-01 Thread Simon Urbanek
s really pax and not tar (pax defines two new types 'x' and 'g'). Cheers, Simon On Apr 1, 2011, at 10:19 AM, Hin-Tak Leung wrote: > I have somehow managed to made a source tar ball which "R CMD check" accepts > but "R CMD INSTALL" rejects w

Re: [Rd] "R CMD check" accepts but "R CMD INSTALL" rejects a tar ball.

2011-04-01 Thread Simon Urbanek
On Apr 1, 2011, at 12:16 PM, Hin-Tak Leung wrote: > --- On Fri, 1/4/11, Simon Urbanek wrote: > >> ?untar: >> >> You may see warnings from the >> internal implementation such as >> >> unsupported entry type 'x' >> >&

Re: [Rd] logos

2011-04-01 Thread Simon Urbanek
d by the public. > Thanks, yes, the developer pages had indexes disabled by default, I have enabled them now (which was the case way back before we switched servers if I remember correctly). Thanks, Simon __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Rtools questions

2011-04-05 Thread Simon Urbanek
Rtools don't provide TeX - that's entirely up to you - so I suspect it may not have anything to do with the Rtools version but rather your TeX installation... Cheers, Simon On Apr 5, 2011, at 6:22 PM, Spencer Graves wrote: > Hello: > > > 1. How can I tell when the

Re: [Rd] anyway to get R unevaluated expr independent on arguments

2011-04-07 Thread Simon Urbanek
dummy*" symbol with any value you want. That said, we are in a functional language, so you can actually do it more natively by using a closure like "function(.var1){ a <- .var1 }" - that saves you the substitution part and is more clean. Cheers, Simon

Re: [Rd] question about assignment warnings for replacement methods

2011-04-08 Thread Simon Urbanek
ethod}{signature_list}(object)<- newValue > > and that solved the problem. But replacing '=' with '<-' solves it too. > > Shouldn't 'R CMD check' treat the 2 assignment operators the same way > since they are equivalent? > They are not equ

Re: [Rd] Wish there were a "strict mode" for R interpreter. What

2011-04-11 Thread Simon Urbanek
t can make assumptions but they may as wrong as the spurious warnings discussed so people will complain either way ;) Cheers, Simon __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] R CMD build --resave-data

2011-04-12 Thread Simon Urbanek
se to have different defaults in build as >> opposed to INSTALL from my point of view (although I could live with >> different, tough). > > If you deliberately ignore the fact that 'R CMD INSTALL' is also used > by developers to install from the *package source tree* (

Re: [Rd] R CMD build --resave-data

2011-04-12 Thread Simon Urbanek
ong story...). > to > > R CMD build-and-install plyr ? > R CMD build plyr && R CMD INSTALL plyr_* ... if you don't keep too many version in the same directory ;) - but it's not something I would use. For the paranoid R CMD build

Re: [Rd] Problem with dyn.load in R 2.13.0

2011-04-13 Thread Simon Urbanek
We have no details, but my wild guess would be that you did not re-build the package for 2.13.0 and you have static libR in 2.13.0 yet dynamic in 2.12.2. Cheers, Simon On Apr 13, 2011, at 2:00 PM, Terry Therneau wrote: > I have a test directory for the survival suite, and dyn.load has cea

Re: [Rd] Problem with dyn.load in R 2.13.0 -- the real problem

2011-04-13 Thread Simon Urbanek
es are not guaranteed to be binary compatible and often they are not. Depending on the subset of the features a package may use it may or may not work, but it is never guaranteed. The first thing any user should do after R upgrade is to run update.packages. But, again, this is not really rela

Re: [Rd] Possible bug in 'relist()' and/or 'as.relistable()'

2011-04-14 Thread Simon Urbanek
Dotted pair list of 3 $ a: num 1 $ b: num 2 $ c:Dotted pair list of 2 ..$ c.1: num 1 ..$ c.2: num 2 - attr(*, "class")= chr [1:2] "relistable" "pairlist" so I guess it should be easy to add relist.pairlist to utils ... I'm not sure about the implic

Re: [Rd] DESCRIPTION file and Rd examples

2011-04-15 Thread Simon Urbanek
On Apr 14, 2011, at 11:00 PM, Dario Strbenac wrote: > I have a confusing error from R CMD check that I don't get when running the > example manually by hand. > > In the \examples section of an Rd file, I create a GRanges object, then I > call a function with the GRanges object, whose first 2 l

Re: [Rd] How to get R to compile with PNG support

2011-04-21 Thread Simon Urbanek
> > But in a larger sense, because of Sage's "batteries included" > philosophy (which we know not everyone agrees with!), we would like to > have a one-shot way so that *everyone* will see R graphics, not just > people whose binary happens to have been compiled on a machin

Re: [Rd] FW: [Rcpp-devel] Question on 5.6 Interfacing C++ code

2011-04-21 Thread Simon Urbanek
our package has to have the same name - please do read http://r.research.att.com/man/R-exts.html#Creating-R-packages Cheers, Simon > > On 4/21/11 7:16 AM, "Duncan Murdoch" wrote: > >> On 11-04-20 11:33 AM, Sean Robert McGuffee wrote: >>> Hi, apparent

Re: [Rd] How to get R to compile with PNG support

2011-04-21 Thread Simon Urbanek
te but not > display a graphic if it has (for instance) png support, like the one > on the Trac ticket did? We can always just search for the png file > and serve it up in our own viewers. > > Note that we already search for /usr/include/X11/Xwindows.h, and > adding xorg-de

[Rd] using autoconf in packages [Was: Question on 5.6 Interfacing C++ code]

2011-04-22 Thread Simon Urbanek
eferably in a standard way 3) make sure the flags you check with (CPPFLAGS, CFLAGS, LDFLAGS, LIBS, ..) reflect what will be used by R from Makevars 4) make sure you test dependencies - if you don't, static libraries will fail so it's a good habit to test with static libraries People very ofte

Re: [Rd] Interrupting C++ code execution

2011-04-25 Thread Simon Urbanek
the UserBreak flag which can be set by a separate thread and thus you may check on it. That said, all this is very much platform-specific. Cheers, Simon __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Interrupting C++ code execution

2011-04-25 Thread Simon Urbanek
On Apr 25, 2011, at 11:09 AM, schattenpfla...@arcor.de wrote: > Thank you for your response, Simon. > >>> 1. Calling R_CheckUserInterrupt() interrupts immediately, so I have >>> no possibility to exit my code gracefully. In particular, I suppose >>> that objec

Re: [Rd] Interrupting C++ code execution

2011-04-25 Thread Simon Urbanek
call it on the main thread and you should be prepared that it may take some time and may interact with the OS... Cheers, Simon On Apr 25, 2011, at 12:23 PM, Simon Urbanek wrote: > > On Apr 25, 2011, at 11:09 AM, schattenpfla...@arcor.de wrote: > >> Thank you for your respons

Re: [Rd] Interrupting C++ code execution

2011-04-26 Thread Simon Urbanek
On Apr 26, 2011, at 7:30 AM, schattenpfla...@arcor.de wrote: > I have tested the solutions suggested by Simon and Thomas on a Linux machine. > These are my findings: > >> On Windows you can look at the variable "UserBreak", available from >> Rembedded.h. Outs

[Rd] Thread synchronization [Was: Interrupting C++ code execution]

2011-04-26 Thread Simon Urbanek
th R [so if the result is all you want it's there], but semaphores are not implemented yet --- your inquiry should shift it further up on my todo stack ;)). Cheers, Simon > > On 4/26/11 9:21 AM, "Simon Urbanek" wrote: > >> >> On Apr 26, 2011, at 7:30 AM

Re: [Rd] Thread synchronization [Was: Interrupting C++ code execution]

2011-04-27 Thread Simon Urbanek
Sean, On Apr 27, 2011, at 3:21 PM, Sean Robert McGuffee wrote: > Hi Simon, > That makes a lot of sense to me. I'll start reading about R's event loop > signaling. I'm not sure what the best method will be for me to flag the > completeness of a threaded process in my

Re: [Rd] R CMD check and Suggests Packages

2011-04-29 Thread Simon Urbanek
n the dark: > > Perhaps the OP has code in some \examples{} section for some help > (*.Rd) file that then tries to load data from the "suggested" package? > But that is a valid use of Suggests: as long as it is guarded against that package not being present. The point her

Re: [Rd] How to create vignette.pdf for R-2.13.0?

2011-05-03 Thread Simon Urbanek
On May 3, 2011, at 4:48 PM, cstrato wrote: > Dear Uwe, > > Thank you, however since I use "R CMD INSTALL xps.tar.gz" my source code is > not polluted. > But then you already used build to create the tar ball so the vignette has been built. So what is your point? Cheers, S > Furthermore, I

Re: [Rd] How to create vignette.pdf for R-2.13.0?

2011-05-03 Thread Simon Urbanek
t then you can't complain about the R doing something wrong). Cheers, S > > On 5/3/11 11:11 PM, Simon Urbanek wrote: >> On May 3, 2011, at 4:48 PM, cstrato wrote: >> >>> Dear Uwe, >>> >>> Thank you, however since I use "R CMD INSTALL

Re: [Rd] Wishlist: write R's bin path to the PATH variable and remove the version string in the installation dir under Windows

2011-05-03 Thread Simon Urbanek
> wishing that the version string could be removed by default. > It can be already now, so I really have no idea what you're complaining about. If that's what you want, drop the the version and keep the one unversioned directory in your PATH and Bob's your uncle. Cheers, S

Re: [Rd] R CMD check and Suggests Packages

2011-05-04 Thread Simon Urbanek
In current R it is described in R-ints instead: http://r.research.att.com/man/R-ints.html#Tools But don't ask me about the rationale. That said, you can search all manuals in Google by simply using foo site:http://r.research.att.com/man/ where "foo" is your query Cheers, S On May 4, 2011,

Re: [Rd] Wishlist: write R's bin path to the PATH variable and remove the version string in the installation dir under Windows

2011-05-04 Thread Simon Urbanek
University > 2215 Snedecor Hall, Ames, IA > > > > On Wed, May 4, 2011 at 2:02 AM, Martin Maechler > wrote: >> Note to Yihui Xie: I agree 100% with the other R core members >> (Duncan, Simon, Thomas) who already explained why it is *GOOD* >> to install R in

Re: [Rd] problem with location of libraries 64-bit (opensuse)

2011-05-05 Thread Simon Urbanek
/ld-linux-x86-64.so.2 (0x7f9662eb1000) so as you see, lapack links to blas which in turn links to gfortran. So if you load lapack you'll get gfortran vis blas. In your setup you are missing the link to gfortran for one reason or another. So check your setup with ldd to see why. I thin

Re: [Rd] cerr and cout not working calling c++ from R

2011-05-06 Thread Simon Urbanek
al to request in a C++ interface ... (but I don't use Rcpp so I don't know). Cheers, Simon On May 6, 2011, at 3:19 PM, Sean Robert McGuffee wrote: > Hi, > > Thanks for the comments so far. > > I've been going through the code extensively and seem to be having trouble

Re: [Rd] cerr and cout not working calling c++ from R

2011-05-07 Thread Simon Urbanek
ponse suggests that it is not as common. If you choose to do it, you may find this link helpful: http://groups.google.com/group/comp.lang.c++/msg/1d941c0f26ea0d81 Cheers, Simon On May 7, 2011, at 12:42 AM, Sean Robert McGuffee wrote: > This is a good idea as to converting to stringstream's

Re: [Rd] fortan common block

2011-05-09 Thread Simon Urbanek
cess) than in IPC (shared across processes). Cheers, Simon On May 9, 2011, at 10:26 AM, Paul Gilbert wrote: > Thanks to everyone that replied to this (some offline). I should have been a > bit clearer about my question. I did realize that it does work sometimes. My > worry is whether i

Re: [Rd] How to document man/*.Rd pages with images?

2011-05-11 Thread Simon Urbanek
On May 11, 2011, at 4:00 PM, Thomas Roth wrote: > Hi, > > There's a possibility to put images into documentation files. Have a look at > the package visualizationTools to see how it works. The original idea is/was > by Romain Francois as far as i remember. > > For instance have a look at the do

Re: [Rd] How to document man/*.Rd pages with images?

2011-05-11 Thread Simon Urbanek
the code gets executed even if html is not the back-end (e.g., in terminal) .. is this a bug? Cheers, S > it only takes long because there's a simulation going on in the background... > > 2011/5/11 Simon Urbanek > > On May 11, 2011, at 4:00 PM, Thomas Roth wrote:

Re: [Rd] How to document man/*.Rd pages with images?

2011-05-11 Thread Simon Urbanek
- it's the plotting and since you fixed the seed there is really no point to re-render it -- you can as well do as Paul suggested, just ship the rendered image with the package..) Cheers, Simon > > 2011/5/11 Simon Urbanek > > On May 11, 2011, at 4:16 PM, Thomas Roth wrote: >

[Rd] R html help system [Was: How to document man/*.Rd pages with images?]

2011-05-12 Thread Simon Urbanek
dynamic ones. I'm curious about "If it’s a large picture this process nearly crashes my machine when trying to access the file via help" - do you have an example package that would illustrate the problem? Thanks, Simon On May 11, 2011, at 7:14 PM, Sean Robert McGuffee wrote: >

Re: [Rd] R html help system [Was: How to document man/*.Rd pages with images?]

2011-05-13 Thread Simon Urbanek
On May 13, 2011, at 7:08 PM, Sean Robert McGuffee wrote: > > On 5/12/11 9:13 AM, "Simon Urbanek" wrote: > >> I just want to clarify the mechanics of the help system when using html. >> >> R has a built-in HTTP server (aka Rhttpd) which transforms HTTP req

Re: [Rd] R crashes if "toFile" given "~/" in Linux envirnonment

2011-05-16 Thread Simon Urbanek
ng R_error() instead of quitting -- but both issues should be best addressed to the Rgraphviz maintainers. Cheers, Simon On May 16, 2011, at 10:50 PM, Mark Kimpel wrote: > I was running some sample code from a help page tonight and wished to > redirect the sample output to my Desktop under Linux

Re: [Rd] S3 method dispatch - can methods come from the enclosing environment?

2011-05-17 Thread Simon Urbanek
e mat." > class(z) <- "tst" > > tstFn(z) found it! Cheers, Simon On May 17, 2011, at 7:32 PM, wrote: > I was surprised to see that S3 methods are not found if they only reside in > the enclosing environment. E.g.: > >> tstFn <- local({

Re: [Rd] Error in svg() : cairo-based devices are not supported on this build

2011-05-19 Thread Simon Urbanek
But if you have working Cairo package can simply use CairoSVG() instead of svg(). Cheers, Simon >> Cairo.capabilities() > png jpeg tiff pdf svgps x11 win > TRUE TRUE TRUE TRUE TRUE TRUE TRUE FALSE > > I tried to google around unsuccessfully.

Re: [Rd] r-2.13 fails make check

2011-05-19 Thread Simon Urbanek
Yes, this must be from some commit yesterday, because the build from previous night worked. I see the same error in the nightly builds: http://r.research.att.com/log-R-2.13-branch.leopard.i386.html On May 19, 2011, at 8:47 AM, Kasper Daniel Hansen wrote: > I am only reporting this because it i

Re: [Rd] r-2.13 fails make check

2011-05-19 Thread Simon Urbanek
Note to myself: read R-core before R-devel ;). It's apparently fixed by now. I have restarted the nightly build so the binaries should be up again soon. Cheers, Simon On May 19, 2011, at 10:03 AM, Simon Urbanek wrote: > Yes, this must be from some commit yesterday, because the bu

Re: [Rd] Calling Rscript from Makevars

2011-05-20 Thread Simon Urbanek
'` and on Windows it's PKG_LIBS=`${R_HOME}/bin${R_ARCH_BIN}/Rscript.exe -e 'whatever.you.meant.to.run()'` Note that you should NOT mess with the environment variables that R uses as you're likely to set them incorrectly. Cheers, Simon > PKG_LIBS= -lna

Re: [Rd] Calling Rscript from Makevars

2011-05-20 Thread Simon Urbanek
imple - just remove all targets from your Makefile and you have Makevars since R will do the compilation and linking for you and correctly. If you feel like it, you can override its behavior by adding one rule (e.g., all:) that lists your desired dependency and you can pass on to the R defa

Re: [Rd] Calling Rscript from Makevars

2011-05-20 Thread Simon Urbanek
tension package (including variable > substitution, searching for libraries, etc.). " > > It might be worth someone revizing this to take out the Autoconf term if it > really isn't even being used. > It simply says that the configure can be created by autoconf or manuall

Re: [Rd] Calling Rscript from Makevars

2011-05-23 Thread Simon Urbanek
attempts to build the .so/.dll So, as you can see you Makevars gives you the flexibility of Makefile but without the hassle. Cheers, Simon __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Calling Rscript from Makevars

2011-05-23 Thread Simon Urbanek
Sean, On May 23, 2011, at 2:03 PM, Sean Robert McGuffee wrote: > > On 5/23/11 1:30 PM, "Simon Urbanek" wrote: > >> >> On May 23, 2011, at 12:56 PM, Sean Robert McGuffee wrote: >> >>> I'm not sure what you mean by, "any tests you run

Re: [Rd] serialization of external pointers

2011-05-26 Thread Simon Urbanek
object so that you can restore the pointers on load when you see a NULL pointer with a serialized cache - less ideal solution, but doable). Cheers, Simon __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] assignInNamespace and new bindings

2011-05-31 Thread Simon Urbanek
njustified assumptions. As a user, I'm really worried about packages modifying other packages behind my back (but I may be more paranoid than others). Cheers, Simon __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] GUI hooks in R [Was: assignInNamespace and new bindings]

2011-05-31 Thread Simon Urbanek
On May 31, 2011, at 4:11 PM, Thomas Friedrichsmeier wrote: > On Tuesday 31 May 2011, Simon Urbanek wrote: >> I would expect so, but I'll let Luke comment on it. It is definitely a very >> bad idea. >> >> R provides facilities for customization and other GUIs ar

Re: [Rd] GUI hooks in R [Was: assignInNamespace and new bindings]

2011-06-01 Thread Simon Urbanek
On May 31, 2011, at 5:23 PM, Thomas Friedrichsmeier wrote: > On Tuesday 31 May 2011, Simon Urbanek wrote: >> The history entries are somewhat in a grey area, because most GUIs use >> their own implementation of history (and thus they are irrelevant) and the >> *history() co

Re: [Rd] GUI hooks in R [Was: assignInNamespace and new bindings]

2011-06-01 Thread Simon Urbanek
On Jun 1, 2011, at 1:50 PM, Thomas Friedrichsmeier wrote: > On Wednesday 01 June 2011, Simon Urbanek wrote: >> I suppose, yes, it's possible, but I see somewhat of an asymmetry if done >> that way : GUIs are like plug-ins in that there is a set of functions they >>

Re: [Rd] Problem to execute a function loading by my package that I created

2011-06-03 Thread Simon Urbanek
w how I can gather the files Makefile > and Makevars together. > Makevars is simply a makefile without compilation and linking rules as those are provided by R automatically. See recent posts about it on this list. Cheers, Simon > Thank you in advance, > > Pauline > > -- &g

Re: [Rd] Interfacing a C++ class

2011-06-04 Thread Simon Urbanek
- it uses Java object serialization to cache serialized versions of objects (as raw vectors) in the protection part of the pointer which gets serialized by R on save(). Then restoration is automatic: when rJava sees a NULL pointer (that's what the are deserialized too) in the S4 object, it checks w

Re: [Rd] C-Side: Applying a function (given as param) to data (given as param)

2011-06-06 Thread Simon Urbanek
ence would be something like SEXP lapply10(SEXP myFun) { SEXP sIndex = PROTECT(allocVector(INTSXP, 1)); SEXP result = PROTECT(allocVector(VECSXP, 10)); int *index = INTEGER(sIndex); for (int i = 0; i < 10; i++) { index[0] = i + 1;

Re: [Rd] "warning: assignment discards qualifiers from pointer target type"

2011-06-08 Thread Simon Urbanek
ref/Pervasives.html > > > That's very brief. > > Chapter 6 of the "Writing R Extensions" is rather in this style > and gives a good overview. > Something like that for the macros would be helpful. > > >> >> for you cannot (in general)

Re: [Rd] "warning: assignment discards qualifiers from pointer target type"

2011-06-08 Thread Simon Urbanek
On Jun 8, 2011, at 8:32 PM, oliver wrote: > On Thu, Jun 09, 2011 at 02:17:31AM +0200, oliver wrote: > [...] >> OK, I looked at this now. >> >> LENGTH() checks the length of the vector. >> >> Good to know this. >> >> So the problem of a vector of length 0 can be with any arguments of type >> S

Re: [Rd] Ctrl-C of functions that allocated mem

2011-06-08 Thread Simon Urbanek
on you would know that you're not supposed to use malloc/calloc at all and if you allow interruption ("regular" C code does not) R_alloc does what you asked about. Cheers, Simon > Normally in an interactive session "some memory" might not be a problem, > because it

Re: [Rd] Install R 2.14 From Source : lattice Error

2011-06-09 Thread Simon Urbanek
es from different R installations around. The lattice you see is from another R that was compiled with --enable-R-shlib while you configured R without it so they are incompatible. Make sure you installed your compiled R properly and don't mix packages between the R installations (

Re: [Rd] "warning: assignment discards qualifiers from pointer target type"

2011-06-09 Thread Simon Urbanek
gt;>>> On Wed, Jun 08, 2011 at 08:35:34PM -0400, Simon Urbanek wrote: >>>>>> >>>>>> On Jun 8, 2011, at 8:32 PM, oliver wrote: >>>>>> >>>>>>> On Thu, Jun 09, 2011 at 02:17:31AM +0200, oliver wrote: >>>>>&

Re: [Rd] How to add a welcome message in Package development?

2011-06-10 Thread Simon Urbanek
ages has no namespace) or .onAttach or .onLoad (if your packages has a namespace). Cheers, Simon > Can somebody help me how to add this functionality in the development > route of package. I believe this is possible as in many existing > packages that functionality is present. &g

Re: [Rd] How to add a welcome message in Package development?

2011-06-10 Thread Simon Urbanek
On Jun 10, 2011, at 3:36 PM, Dirk Eddelbuettel wrote: > > On 10 June 2011 at 15:10, Simon Urbanek wrote: > | > | On Jun 10, 2011, at 2:54 PM, Nipesh Bajaj wrote: > | > | > Dear all, it is my first post in R-devel list, and hope that this is > | > the right place

Re: [Rd] Detecting development environment

2011-06-13 Thread Simon Urbanek
On Jun 13, 2011, at 10:21 AM, Hadley Wickham wrote: > Hi all, > > Is there a straight-forward, cross-platform way of determining if a > user has all the tools needed to develop R packages (i.e. gcc etc)? > It doesn't need to be 100%, but should give a rough idea. One idea I > had was simply to

Re: [Rd] Controlling stdin and stdout in an embedded R instance

2011-06-17 Thread Simon Urbanek
Mike, there are many examples of embedding R, one of them is rJava/JRI and you can see how to initialize R with custom callbacks at http://svn.rforge.net/org/trunk/rosuda/JRI/src/Rinit.c Cheers, Simon On Jun 16, 2011, at 6:47 PM, Mike Sonsini wrote: > Hello, > > I am very new to

Re: [Rd] arbitrary size data frame or other stcucts, curious about issues invovled.

2011-06-21 Thread Simon Urbanek
nd is noble, but AFAIK no one so far was able to draft any good proposal as of what the API would look like. It would be very desirable if someone did, though. (BTW your link is useless - linking google searches is pointless as the results vary by request location, user setting etc.). Cheers,

Re: [Rd] Class not found when search in .onLoad

2011-06-27 Thread Simon Urbanek
On Jun 27, 2011, at 3:17 AM, Renaud Gaujoux wrote: > > On 24/06/2011 22:04, John Chambers wrote: >> >> Strictly speaking, that is not meaningful. A class (like any R object) is >> uniquely referenced by a name *and an environment*. The name of a package >> can be used to construct the enviro

Re: [Rd] Class not found when search in .onLoad

2011-06-27 Thread Simon Urbanek
On Jun 27, 2011, at 8:43 AM, Renaud Gaujoux wrote: > > On 27/06/2011 14:27, Simon Urbanek wrote: >> On Jun 27, 2011, at 3:17 AM, Renaud Gaujoux wrote: >> >>> On 24/06/2011 22:04, John Chambers wrote: >>>> Strictly speaking, that is not meaningful. A clas

Re: [Rd] (no subject)

2011-06-28 Thread Simon Urbanek
d you have to make sure you link the libraries installed above. > even though the source code is in the same directory as my c > code that I am trying to compile. That bears no meaning - as you said you installed the libraries, so you have to use those. Source code of gmp/mpfr has no ef

Re: [Rd] R CMD check --force-multiarch does not install all the archs for testing

2011-06-28 Thread Simon Urbanek
s. The cross-platform way is to not use --merge-multiarch but use --libs-only instead as needed (easy to check after the first arch run which will tell you whether it's needed or not). I suspect that --merge-multiarch is just a convenience shortcut (and it's unclear to me why it'

Re: [Rd] Small bug in install.packages?

2011-06-28 Thread Simon Urbanek
On Jun 28, 2011, at 3:03 PM, Hadley Wickham wrote: > When capturing the path to the current R binary, install.packages does: > > cmd0 <- paste(file.path(R.home("bin"), "R"), "CMD INSTALL") > > shouldn't that be > > cmd0 <- shQuote(paste(file.path(R.home("bin"), "R"), "CMD INSTALL")) > > to

Re: [Rd] R CMD check --force-multiarch does not install all the archs for testing

2011-06-28 Thread Simon Urbanek
On Jun 28, 2011, at 3:45 PM, Hervé Pagès wrote: > Hi Simon, > > On 11-06-28 12:19 PM, Simon Urbanek wrote: >> >> On Jun 28, 2011, at 3:01 PM, Hervé Pagès wrote: >> >>> Hi Uwe, >>> >>> On 11-06-28 01:44 AM, Uwe Ligges wrote: >>>

<    1   2   3   4   5   6   7   8   9   10   >