Re: [Rd] reference classes, LAZY_DUPLICATE_OK, and external pointers

2014-03-02 Thread Simon Urbanek
were often masked by R being more conservative such that in some circumstanced there were enough references to function arguments that R would defensively create a new copy. So, the same applies as it did before - if you store something that you want to be mutable in C/C++ you have to check the

Re: [Rd] internal copying in R (soon to be released R-3.1.0

2014-03-03 Thread Simon Urbanek
ve us more control and also > save some unnecessary copying. Again, you're barking up the wrong tree - .Call() doesn't bump NAMED at all - it simply passes the object: #include SEXP nam(SEXP x) { return ScalarInteger(NAMED(x)); } > .Call("nam", 1+1) [1] 0 > x=1+1 &

Re: [Rd] Admin manual bug: packages installed on OS X

2014-03-03 Thread Simon Urbanek
Thanks, fixed, Simon On Mar 3, 2014, at 2:09 PM, Davor Cubranic wrote: > The administration manual for the current release of R says in section 4.2, > Uninstalling under OS X: > > "The installation consisted of three Apple packages: > org.r-project.R.L

Re: [Rd] internal copying in R (soon to be released R-3.1.0

2014-03-03 Thread Simon Urbanek
Jens, On Mar 3, 2014, at 3:35 PM, Jens Oehlschlägel wrote: > Thanks for answering Simon, > > > None, there is no concept of "shared" memory at R level. You seem to be > > mixing C level API specifics and the R language. In the former duplicate() > > creat

Re: [Rd] A question about multiple(?) out of order ReleaseObject

2014-03-06 Thread Simon Urbanek
ess that is the case, you are creating an explicit leak = bad. If you don't have as stack-like design, you can always use explicitly managed object for the lifetime (personally, I prefer that) since all chained objects are protected by design, or use REPROTECT. Cheers, Simon >

Re: [Rd] 2 versions of same library loaded

2014-03-12 Thread Simon Urbanek
hould not be causing any issues, but you may want to check in case Debian scripts add anything else. > How can I stop the madness? Some folks on the openmpi list have > indicated I need to rebuild R, telling it where my MPI is, but that > seems an awfull

Re: [Rd] Detect a terminated pipe

2014-03-14 Thread Simon Urbanek
er): > p=pipe("true","r") > readLines(p) character(0) > close(p) > p=pipe("true","w") > writeLines("", p) > flush(p) Error in flush.connection(p) : ignoring SIGPIPE signal > close(p) Cheers, Simon > Thanks for your input. >

Re: [Rd] Detect a terminated pipe

2014-03-14 Thread Simon Urbanek
On Mar 14, 2014, at 11:03 AM, Kirill Müller wrote: > On 03/14/2014 03:54 PM, Simon Urbanek wrote: >> As far as R is concerned, the connection is open. In addition, pipes exist >> even without the process - you can close one end of a pipe and it will still >> exist (th

Re: [Rd] R-devel 3.2.0 MAC OS

2014-03-17 Thread Simon Urbanek
es are scarce to build the full set. We typically don't provide package binaries for R-devel until later when it starts diverging. Cheers, Simon __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

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

2014-03-29 Thread Simon Urbanek
s to the main thread, unless you are really a guru and know how to avoid such issues across signals and errors. Cheers, Simon > Randy > > On Mar 28, 2014, at 2:55 PM, Florian Burkart > wrote: > >> Hi, >> >> I have been using my own C++ plugin for a while. >&

Re: [Rd] Is it possible to shrink an R object in place?

2014-04-11 Thread Simon Urbanek
he object, it will be copied anyway. As mentioned above, the only case where shrinking may work is if you only need to strip a few elements of a large vector so that keeping the same allocation has no significant effect. Cheers, Simon > I am probably missing something subtle (or obvious) a

Re: [Rd] type.convert and doubles

2014-04-11 Thread Simon Urbanek
fallback where native type doesn't match. It has never issued any warning in that case historically, so IMHO it would be rather surprising if it did now… Cheers, Simon > Would it be possible to issue a warning when this occurs? > > Aside: I’m very happy to see the new ’s’ and ‘f

Re: [Rd] Is it possible to shrink an R object in place?

2014-04-11 Thread Simon Urbanek
ifferent > size. As long as I restore the correct size eventually. > I like the destructor touch of restoring the size :) - that is neat. But as I said, this is only useful in cases where you strip off a few elements, otherwise you're better off creating a copy because of the memory imp

Re: [Rd] R 3.0.3 for OSX

2014-04-16 Thread Simon Urbanek
On Apr 16, 2014, at 1:55 PM, Gábor Csárdi wrote: > The R-3.0.3 pkg is missing from here: > http://cran.r-project.org/bin/macosx/old/ > > Is this intended? No - now fixed. > Anyone knows where to get it? > http://cran.r-project.org/bin/macosx/R-3.0.3.pkg Cheers, Simon

Re: [Rd] R 3.0.3 for OSX

2014-04-16 Thread Simon Urbanek
On Apr 16, 2014, at 3:00 PM, Gábor Csárdi wrote: > On Wed, Apr 16, 2014 at 2:39 PM, Simon Urbanek > wrote: > On Apr 16, 2014, at 1:55 PM, Gábor Csárdi wrote: > > > The R-3.0.3 pkg is missing from here: > > http://cran.r-project.org/bin/macosx/old/ > > >

Re: [Rd] R-3.1.0 OSX Snow Leopard installs old binary

2014-04-17 Thread Simon Urbanek
7 because it fails make check, so I don't see how "Downloading and installing the new binary by hand works fine." can be true. The *source* is available so you can compile it from sources, but that's different that what you asked for which was to install the *binary*. Cheers

Re: [Rd] R-3.1.0 OSX Snow Leopard installs old binary

2014-04-17 Thread Simon Urbanek
On Apr 17, 2014, at 6:31 PM, Gábor Csárdi wrote: > On Thu, Apr 17, 2014 at 5:18 PM, Simon Urbanek > wrote: > > On Apr 17, 2014, at 9:30 AM, Gábor Csárdi wrote: > > > Hi All, I am not sure why this happens, but apparently an old binary is > > installed by default.

Re: [Rd] R-3.1.0 OSX Snow Leopard installs old binary

2014-04-17 Thread Simon Urbanek
On Apr 17, 2014, at 7:42 PM, Gábor Csárdi wrote: > On Thu, Apr 17, 2014 at 5:18 PM, Simon Urbanek > wrote: > > On Apr 17, 2014, at 9:30 AM, Gábor Csárdi wrote: > > > Hi All, I am not sure why this happens, but apparently an old binary is > > installed by default.

Re: [Rd] R-3.1.0 OSX Snow Leopard installs old binary

2014-04-17 Thread Simon Urbanek
On Apr 17, 2014, at 9:24 PM, Gábor Csárdi wrote: > On Thu, Apr 17, 2014 at 9:07 PM, Simon Urbanek > wrote: > [...] > > No, the issue is that igraph suggests graph yet fails when it's not present. > It should guard against failure is case it's not availab

Re: [Rd] R-3.1.0 OSX Snow Leopard installs old binary

2014-04-17 Thread Simon Urbanek
On Apr 17, 2014, at 9:52 PM, Gábor Csárdi wrote: > On Thu, Apr 17, 2014 at 9:43 PM, Simon Urbanek > wrote: > [...] > The Suggests failure has nothing to do with BioC. Only packages listed in > Depends/Imports are required for a package to work so there is no guarantee > f

Re: [Rd] R-3.1.0 OSX Snow Leopard installs old binary

2014-04-17 Thread Simon Urbanek
On Apr 17, 2014, at 10:14 PM, Gábor Csárdi wrote: > On Thu, Apr 17, 2014 at 10:08 PM, Simon Urbanek > wrote: > [...] > > So this effectively means that if I Import/Depend/Suggest etc. a BioC > > package in igraph, then igraph will likely not be available for OS

Re: [Rd] R-3.1.0 OSX Snow Leopard installs old binary

2014-04-17 Thread Simon Urbanek
On Apr 17, 2014, at 10:37 PM, Gábor Csárdi wrote: > On Thu, Apr 17, 2014 at 10:24 PM, Simon Urbanek > wrote: > [...] >> :) Let's try to make this simple. What can I do to make igraph available for >> OSX users? I guess this is clear, I can make all examples that l

Re: [Rd] Why did R 3.0's resolveNativeRoutine remove full-search ability?

2014-04-18 Thread Simon Urbanek
ed to get, because you could get any random symbol in any shared object that may or may not have anything to do with your code. Note that even you as the author of the code have no control over the namespace so although you intended this to work, loading some oth

Re: [Rd] type.convert and doubles

2014-04-19 Thread Simon Urbanek
e discussions: a) have an option (argument to type.convert and possibly read.table) to enable/disable this behavior. I'm strongly in favor of this. b) decide what the default for a) will be. I have no strong opinion, I can see arguments in both directions But most importantly I think a) is better than the status quo - even if the discussion about b) drags out. Cheers, Simon __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] read.table() code fails outside of the utils package

2014-04-21 Thread Simon Urbanek
's how it should be - there is not reason why any other code should link to it. Why don't you just use .External(utils:::C_readtablehead, ...) if you need to call it? Cheers, Simon > .External(C_readtablehead, file, 1L, comment.char, blank.lines.skip, quote, > sep, skipNul) &g

Re: [Rd] palette() can hang and fail due to X11

2014-04-24 Thread Simon Urbanek
ability of the server you DISPLAY is pointing to. * - this has changed in R 3.0.0, quote: Palette changes get recorded on the display list, so replaying plots (including when resizing screen devices and using dev.copy()) will work better when the palette is changed during a plot. Cheers, Simo

Re: [Rd] The regular expressions in compareVersion()

2014-04-24 Thread Simon Urbanek
FWIW the link has a long thread that is 90% irrelevant - AFAICS the relevant part is From: Yihui Xie-2 Sep 02, 2013; 4:11pm Re: Sweave: printing an underscore in the output from an R command [...] Now you are good at the regular expression level, but Sweave comes and bites you, and that is due t

Re: [Rd] C API for parse error

2014-04-29 Thread Simon Urbanek
y know if this is now stable enough. Cheers, Simon > > -- > View this message in context: > http://r.789695.n4.nabble.com/C-API-for-parse-error-tp4689662.html > Sent from the R devel mailing list archive at Nabble.com. > > _

Re: [Rd] precedence (was 'historical NA question')

2014-05-07 Thread Simon Urbanek
On May 7, 2014, at 3:37 PM, Hervé Pagès wrote: > No big deal. These things can be tricky: > > https://stat.ethz.ch/pipermail/r-devel/2006-January/036022.html > > Sorry I couldn't resist ;-) > Yeah, but that's just yet another trip down the rabbit hole - why is -2 parsed as `-`(2) and not a s

Re: [Rd] precedence (was 'historical NA question')

2014-05-07 Thread Simon Urbanek
On May 7, 2014, at 5:17 PM, Hervé Pagès wrote: > On 05/07/2014 12:52 PM, Simon Urbanek wrote: >> On May 7, 2014, at 3:37 PM, Hervé Pagès wrote: >> >>> No big deal. These things can be tricky: >>> >>> https://stat.ethz.ch/pipermail/r-devel/2006-Jan

Re: [Rd] precedence (was 'historical NA question')

2014-05-07 Thread Simon Urbanek
On May 7, 2014, at 5:41 PM, Hervé Pagès wrote: > On 05/07/2014 02:01 PM, peter dalgaard wrote: >> >> On 07 May 2014, at 21:52 , Simon Urbanek wrote: >> >>> On May 7, 2014, at 3:37 PM, Hervé Pagès wrote: >>> >>>> No big deal. These th

Re: [Rd] large integer values

2014-05-14 Thread Simon Urbanek
On May 14, 2014, at 8:41 AM, Adrian Dușa wrote: > Dear Prof. Ripley, > > Once again, thank you for your replies. > I must confess not being a genuine C programmer, having learned how to use > C only in connection to R (and the macros provided are almost a separate > language to learn). > > I'll

Re: [Rd] environment question

2014-05-17 Thread Simon Urbanek
way", and the > environment() call in eval.R returns globalenv(), then they would, in fact, > be defined there and not in baseenv. Now, I realise that this is startup > code, so perhaps the implementation does something special and these files > really aren't evaluated in the "usual" way. > More importantly that's not the value forever - note that later there is .GlobalEnv <- globalenv() in base/R/Rprofile which is loaded *after* base/R/*.R which is the value you see when you check after base is locked. Cheers, Simon __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] issue with parallel package

2014-05-21 Thread Simon Urbanek
be available at that point. If you add the delay, then it's more likely that the result will be available by then. Cheers, Simon __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] issue with parallel package

2014-05-21 Thread Simon Urbanek
to your attempted collect so the result was more likely to be already available. Because 3.1.0 is more efficient (it no longer manages children manually but rather uses signal-based cleanup), it comes faster to the collect point and the results may not be available yet. Cheers, Simon > &

Re: [Rd] Excluding objects from save.image

2014-05-22 Thread Simon Urbanek
t? It exists, so saving it makes it possible to decide on the behavior as needed - as opposed to not saving it and thus losing the information. Cheers, Simon > I've hacked a quick implementation below. > I did not issue a warning, but it would be a simple fix. > &g

Re: [Rd] Excluding objects from save.image

2014-05-22 Thread Simon Urbanek
On May 22, 2014, at 11:33 AM, Tim Keitt wrote: > On Thu, May 22, 2014 at 9:19 AM, Simon Urbanek > wrote: > Tim, > > On May 21, 2014, at 9:54 PM, Tim Keitt wrote: > > > When dealing with object holding pointers that are only valid during a > > single sess

Re: [Rd] mcmapply Core Usage

2014-05-29 Thread Simon Urbanek
Dario, yes, that is a bug, now fixed. Cheers, Simon On May 29, 2014, at 2:00 AM, Dario Strbenac wrote: > Hello, > > I have a minimal example that shows a problem I'm having with parallel > processing. > > library(parallel) > mcmapply(function(x, y) > { >

Re: [Rd] mcmapply Core Usage

2014-05-29 Thread Simon Urbanek
On May 29, 2014, at 8:04 PM, Henric Winell wrote: > Simon Urbanek skrev 2014-05-29 15:06: >> Dario, >> >> yes, that is a bug, now fixed. > > Thanks for fixing it. > > This problem was independently reported some time ago > (https://bugs.r-project.org/b

Re: [Rd] Package impute on CRAN OSX Mavericks check machine

2014-06-10 Thread Simon Urbanek
On Jun 10, 2014, at 3:30 PM, Peter Langfelder wrote: > Hello, > > would it be possible to install the Bioconductor package impute on the > machine that checks and builds binary packages for OSX 10.9 Mavericks? > Sure, done. Cheers, Simon _

Re: [Rd] what is the current correct repos structure for mac osx binaries?

2014-06-13 Thread Simon Urbanek
u also get > contrib.url('foo',type='mac.binary.mavericks') [1] "foo/bin/macosx/mavericks/contrib/3.1" The only difference are the defaults for pkgType - they differ by the build, but the repo structure is fixed and consistent across all platforms. Cheers, Simon

Re: [Rd] what is the current correct repos structure for mac osx binaries?

2014-06-16 Thread Simon Urbanek
On Jun 16, 2014, at 1:18 PM, Skye Bender-deMoll wrote: > Dear R-devel, > > Apologies for the confusing typo in the reported paths my previous question, > thanks to Simon for providing the answer that the default repository type on > the mac is now "mac.binary.mavericks&

Re: [Rd] using C code to create data frame but always return as list

2014-06-24 Thread Simon Urbanek
On Jun 24, 2014, at 9:21 AM, Romain Francois wrote: > Hi, > > Can you give us what str on the returned object gives you? > > I think you need : > > SET_OBJECT(and, 1) ; > > at the end. > SET_OBJECT should not be used by user code in normal circumstances, it is set by R automatically a

Re: [Rd] Need help on calling Head from C

2014-06-26 Thread Simon Urbanek
On Jun 25, 2014, at 11:31 PM, Sandip Nandi wrote: > Hi , > > I am trying to call head function from C . My doubt is with the parameter > n,how to pass it . > > PROTECT(dfm=lang3(install("data.frame"),df,ScalarLogical(FALSE))); > SET_TAG(CDDR(dfm), install("stringsAsFactors")) ; > SEXP res = PRO

Re: [Rd] R-3.1.1 - R CMD INSTALL problem

2014-07-25 Thread Simon Urbanek
ould refer to their support. Our builds do not require brew (or any other 3rd party build system). Cheers, Simon PS: Please note that R-SIG-Mac is the proper mailing list for Mac-specific questions. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] [R-SIG-Mac] R-3.1.1 - R CMD INSTALL problem

2014-07-25 Thread Simon Urbanek
tran-4.8 name with version, so apart from symlinking the versions the easiest way is to install the binary above. Thanks, Simon > Roger > > url:www.econ.uiuc.edu/~rogerRoger Koenker > emailrkoen...@uiuc.eduDepartment of Economics > vox: 217-333-4558

Re: [Rd] Error when assigning value in environment which is a locked binding

2014-08-11 Thread Simon Urbanek
x$y <- y. So the first one always succeeds since there is no reason for it not to, but the second one doesn't because the binding is locked. I presume the confusion comes from the fact that environments are mutable, so x$y changes even if it was not assigned so it's irrelevant if th

[Rd] Define 'in' for new class

2014-08-11 Thread Simon Knapp
Hi List, Is it possible to define how 'in' works for an object of a specific class (to achieve a similar result to implementing the iterator protocol in a class Python)? Cheers, Simon Knapp [[alternative HTML version deleted]] __

Re: [Rd] Why R-project source code is not on Github

2014-08-21 Thread Simon Urbanek
ly much less fragile than e-mails and patches are based on forked branches, so you can directly build the patched version if you want without manually applying the patch - and you see the whole history so you can pick out things logically. You can comment on individual patches to discuss them

Re: [Rd] Why R-project source code is not on Github

2014-08-24 Thread Simon Urbanek
supports direct SVN access as well) - but there is no point in using git alone. I hate git*, but I love Github (despite being very cynical about it before I tried pushing some of my packages there - and seeing the actual impact). The whole point are the collaborative features - and it's ha

Re: [Rd] working with huge memory: single precision?

2014-08-27 Thread Simon Urbanek
kages (bigMemory, ff, ..) may also support single-precision storage. Cheers, Simon > Any help is greatly appreciated! All the best, > >Mario > > > > -- > Mario Emmenlauer BioDataAnalysis Mobil: +49-(0)151-68108489 > Balanstrasse 43

Re: [Rd] R, OSX, should creating SVGs request XQuartz

2014-08-27 Thread Simon Urbanek
y out would be to compile your own cairographics library and R with disabled X11 support. Cheers, Simon > obviously, if i can avoid making my users install XQuartz if it isn't > necessary (not to mention avoiding the abrupt euthanizing of my > program), that would be ideal from my per

Re: [Rd] Re R CMD check checking in development version of R

2014-08-28 Thread Simon Urbanek
you will also want to use those other packages interactively". You still need to use import() to define what exactly is used by your package - as opposed to what you want to be available to the user in case it is attached. Cheers, Simon > This check (whilst having found some things I sh

Re: [Rd] Can't Find Function After requireNamespace

2014-09-17 Thread Simon Urbanek
On Sep 17, 2014, at 10:00 PM, Dario Strbenac wrote: > I have a simple function : > > f <- function() > { > if(requireNamespace("ggplot2")) >qplot(Sepal.Length, Petal.Length, data = iris, color = Species) > else >message("No graphics, just text.") > } > > ggplot2 is in the Suggests fi

Re: [Rd] Can't Find Function After requireNamespace

2014-09-17 Thread Simon Urbanek
BTW: you probably also want to use requireNamespace(..., quietly=TRUE) otherwise if sort of defeats the purpose ... On Sep 17, 2014, at 10:46 PM, Simon Urbanek wrote: > > On Sep 17, 2014, at 10:00 PM, Dario Strbenac > wrote: > >> I have a simple function : >> >&

Re: [Rd] Shallow copies

2014-10-01 Thread Simon Urbanek
lumn in a dataframe and each matrix is a vector, so any subset thereof always requires a copy no matter what you do. Subsetting columns of a dataframe only requires a copy of the dataframe vector itself which is small by comparison (at least for datasets that use data frames). Cheers, Simon *

Re: [Rd] mpi.h errors on Mavericks packages

2014-10-03 Thread Simon Urbanek
n the lists since the > inception of mavericks.. and possibly this question should go to > Simon.. but in case I missed a discussion, or if anyone has any > suggestions on how to proceed, or what might be missing from the Rmpi, > npRmpi, etc. packages for compilation on Mavericks, it wou

Re: [Rd] [R logs] Help in develop a simply logs package

2014-10-13 Thread Simon Urbanek
log as in recording errors/message that go to the console the you can use the console interface API to override WriteConsole and ShowMessage to tie the messages to another place in addition to printing it out. But what is feasible really depends on how you run R in the first place (and on whic

[Rd] Holding a large number of SEXPs in C++

2014-10-17 Thread Simon Knapp
ointers in the vectors, but omitted that for the sake of clarity. Is there some other R type that would be suited to this, or a general approach? Cheers and thanks in advance, Simon Knapp [[alternative HTML version deleted]] __ R-devel@r-proje

Re: [Rd] Holding a large number of SEXPs in C++

2014-10-17 Thread Simon Urbanek
On Oct 17, 2014, at 7:31 AM, Simon Knapp wrote: > Background: > I have an algorithm which produces a large number of small polygons (of the > spatial kind) which I would like to use within R using objects from sp. I > can't predict the exact number of polygons a-priori, the

Re: [Rd] Using a custom memory allocation function in R

2014-10-23 Thread Simon Urbanek
seems a > bit odd to have to allocate a small vector in R and the change its > location in memory in C just to be able to both control the memory > allocation and have the vector available in R... > > I'm trying to avoid using Rcpp, as I'm modifying a fairly large > pac

Re: [Rd] 'library' or 'require' call not declared from: 'rgl'

2014-10-30 Thread Simon Urbanek
olve this? > Did you intend rgl to be optional? If so, then you should use Suggests: instead. When you use Imports: it will load rgl automatically so require() does't make sense (since it will be always TRUE). Cheers, Simon > -- > Michael Friendly Email: friendly AT yorku D

Re: [Rd] Holding a large number of SEXPs in C++

2014-11-02 Thread Simon Knapp
Thanks Simon and sorry for taking so long to give this a go. I had thought of pair lists but got confused about how to protect the top level object only, as it seems that appending requires creating a new "top-level object". The following example seems to work (full exampl

Re: [Rd] Holding a large number of SEXPs in C++

2014-11-03 Thread Simon Urbanek
On Nov 2, 2014, at 10:55 PM, Simon Knapp wrote: > Thanks Simon and sorry for taking so long to give this a go. I had thought of > pair lists but got confused about how to protect the top level object only, > as it seems that appending requires creating a new "top-leve

Re: [Rd] Unexplicable difference between 2 R installations regarding reading numbers

2014-11-03 Thread Simon Urbanek
R version. NEWS for 3.1.0: type.convert() (and hence by default read.table() returns a character vector or factor when representing a numeric input as a double would lose accuracy. Similarly for complex inputs. NEWS for 3.1.1: type.convert(), read.table() and simil

Re: [Rd] Holding a large number of SEXPs in C++

2014-11-03 Thread Simon Knapp
Thanks again Simon. I had realised that R_NilValue didn't need protection... I just thought it a clean way to make my initial call to PROTECT_WITH_INDEX (which I can see now was not required since I didn't need the calls to REPROTECT)... and I had not thought of appending to the tail.

Re: [Rd] Holding a large number of SEXPs in C++

2014-11-03 Thread Simon Urbanek
On Nov 3, 2014, at 5:34 PM, Simon Knapp wrote: > Thanks again Simon. I had realised that R_NilValue didn't need protection... > I just thought it a clean way to make my initial call to PROTECT_WITH_INDEX > (which I can see now was not required since I didn't need the ca

Re: [Rd] Making iconv portable?

2014-12-15 Thread Simon Urbanek
> On Dec 15, 2014, at 12:21 PM, Kurt Hornik wrote: > >> Spencer Graves writes: > >> Hello, All: >>What would it take to make “iconv” portable? > > >>I ask, because I want to convert accented characters to >>vanilla ASCII, thereby converting, e.g., ‘Raúl’ to “Ra

Re: [Rd] Making iconv portable?

2014-12-15 Thread Simon Urbanek
On Dec 15, 2014, at 1:37 PM, Spencer Graves wrote: > > >> On Dec 15, 2014, at 10:13 AM, Simon Urbanek >> wrote: >> >>> >>> On Dec 15, 2014, at 12:21 PM, Kurt Hornik wrote: >>> >>>>>>>> Spencer Graves writes: &g

Re: [Rd] Benchmark code, but avoid printing

2015-01-02 Thread Simon Urbanek
On Jan 2, 2015, at 12:02 PM, Gábor Csárdi wrote: > Dear all, > > I am trying to benchmark code that occasionally prints on the screen > and I want to > suppress the printing. Is there an idiom for this? > > If I do > > sink(tempfile) > microbenchmark(...) > sink() > > then I'll be also measur

Re: [Rd] Help in building R with minGW

2015-01-02 Thread Simon Urbanek
Please read R-admin section 3.1 - as you'll notice it doesn't say anything about running ./configure since that's only for unix. http://r.research.att.com/man/R-admin.html#Building-from-source Cheers, Simon On Jan 2, 2015, at 12:33 PM, Edoardo Baldoni wrote: > Dear R use

Re: [Rd] R CMD build looking for texi2dvi in the wrong place (R-devel)

2015-01-12 Thread Simon Urbanek
xinfo which is now mandatory in version 5.2+ located in /usr/local since OS X comes with an old version. You should install it from http://r.research.att.com/libs/texinfo-5.2-darwin10.tar.gz Cheers, Simon > $ R CMD build IRanges > * checking for file 'IRanges/DESCRIPTION'

Re: [Rd] Request to speed up save()

2015-01-15 Thread Simon Urbanek
le that deal with big data know well, disks are no longer the bottleneck - it's the CPU now. Cheers, Simon BTW: why in the world would you use ascii=TRUE? It's pretty much the slowest possible serialization you can use - it will even overshadow compression: > system.time(saveRDS

Re: [Rd] Invalid read of size 8

2015-02-05 Thread Simon Urbanek
cMatrix(REALSXP, pownLC, nT+1))); instead the double-pointers? Cheers, Simon > On Feb 5, 2015, at 7:41 AM, niandra wrote: > > Hi, > > I have a R program that call a C function. I define a vector of pointer as > > > int nLC=3; > int pownLC = nLC*nL

Re: [Rd] Color Coding in R-devel/NEWS

2015-02-18 Thread Simon Urbanek
On Feb 18, 2015, at 2:44 PM, Bryan Hanson wrote: > > On this feed, which I think is the place we should monitor upcoming changes: > > http://developer.r-project.org/blosxom.cgi/R-devel/NEWS > > What is the significance of the green and pink highlighting? > It highlights the changes since last

Re: [Rd] Reduce memory peak when serializing to raw vectors

2015-03-17 Thread Simon Urbanek
Jorge, what you propose is not possible because the size of the output is unknown, that's why a dynamically growing PStream buffer is used - it cannot be pre-allocated. Cheers, Simon > On Mar 17, 2015, at 1:37 PM, Martinez de Salinas, Jorge > wrote: > > Hi, > > I&#

Re: [Rd] Reduce memory peak when serializing to raw vectors

2015-03-17 Thread Simon Urbanek
but more memory efficient, unless I'm > missing something. > > Michael > >> On Tue, Mar 17, 2015 at 2:03 PM, Simon Urbanek >> wrote: >> Jorge, >> >> what you propose is not possible because the size of the output is unknown, >> that's w

Re: [Rd] nested parallel workers

2015-03-25 Thread Simon Urbanek
On Mar 25, 2015, at 3:46 PM, Valerie Obenchain wrote: > Hi Simon, > > I'm having trouble with nested parallel workers, specifically, forking inside > socket connections. > You simply can't by definition - when you fork *all* the workers share the same connection

Re: [Rd] About removing zlib from R-devel

2015-03-26 Thread Simon Urbanek
recent that R 2.14.1 on 12.04 then you have to supply your own binaries either way so this is a non-issue. Cheers, Simon > Thanks, > Gabor > > [[alternative HTML version deleted]] > > __ > R-devel@r-project.org mailing l

Re: [Rd] nested parallel workers

2015-03-30 Thread Simon Urbanek
On Mar 30, 2015, at 4:40 PM, Valerie Obenchain wrote: > On 03/25/2015 07:48 PM, Simon Urbanek wrote: >> On Mar 25, 2015, at 3:46 PM, Valerie Obenchain >> wrote: >> >>> Hi Simon, >>> >>> I'm having trouble with nested parallel workers,

Re: [Rd] C-API: check whether R has been initialized ?

2015-05-03 Thread Simon Urbanek
t a case where you want to detect that something else already started R so you can't embed it yourself anymore and thus have to abort -- one side-effect check is to see if R_NilValue is NULL since that would only be the case if R was not started yet. Note, however, that if you didn't ini

[Rd] Windows environmental variables

2015-05-11 Thread Simon Byrne
the current POSIX-style interface on Windows. Best, Simon __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Alternative for wildcard gnu extension in Makevars

2015-05-15 Thread Simon Urbanek
he Makefiles, so for all practical purposes it's just a Makefile which implicitly includes R's makefile on top so you don't have to do that by hand. Cheers, Simon > On Wed, May 13, 2015 at 10:10 AM, Kevin Ushey wrote: >> One other solution that's only a little crazy: yo

Re: [Rd] Question about Rweb

2011-10-05 Thread Simon Urbanek
ell). In case you get convinced that this is a good option, please feel free to contact me if you have any questions and need any help. Cheers, Simon __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Question about Rweb

2011-10-05 Thread Simon Urbanek
Ted, On Oct 5, 2011, at 4:00 PM, Ted Byers wrote: > Hi Simon, > > Any chance of getting step by instructions on setting it up to work with a > web server like Apache's httpd server (I have Apache's web server running, > actually a couple instances on different p

Re: [Rd] Question about Rweb

2011-10-05 Thread Simon Urbanek
Ted, On Oct 5, 2011, at 6:06 PM, Ted Byers wrote: > Hi Simon, > >> -Original Message----- >> From: Simon Urbanek [mailto:simon.urba...@r-project.org] >> Sent: October-05-11 5:07 PM >> To: Ted Byers >> Cc: 'Tonidandel, Scott'; r-devel@r-projec

Re: [Rd] Question about Rweb

2011-10-06 Thread Simon Urbanek
On Oct 6, 2011, at 12:20 PM, Dirk Eddelbuettel wrote: > > On 6 October 2011 at 09:37, Jay Emerson wrote: > | Ted, > | > | Simon may be biased, but I am not. I'm barely a few days into > | Rserve/FastRWeb and am blown away (and frustrated that I didn't have a >

Re: [Rd] R CMD INSTALL writes to stderr

2011-10-10 Thread Simon Urbanek
a variation of system("R -e 'install.packages(...)'", ...) where you have full control over the routing and yet sill use install.packages? That is generally how custom installers do this ... It sort of seems what yo

Re: [Rd] how to make a true binary package?

2011-10-11 Thread Simon Urbanek
jects will continue to work, so your mileage will vary and you may want to check if it's what you want. There are obvious other ways you could use that are much simpler - such as encrypt your sources. Nothing is completely bullet-proof, it's just a matter of how much w

Re: [Rd] how to return a matrix of strings from c to R ?

2011-10-14 Thread Simon Urbanek
ase and how to resolve it? > It's more simple than that: int rows = s->n_rics, cols = s->n_fields; SEXP result = PROTECT(Rf_allocMatrix(STRSXP, rows, cols)); for (int i = 0; i < rows; i++) for (int j = 0; j < cols; j++) SET_STRING_ELT(result, i + j * rows, Rf_mkChar(s-&g

Re: [Rd] gctorture() and gzfile() doesn't get along.

2011-10-15 Thread Simon Urbanek
Thanks, now fixed. It affected almost all connections. Simon On Oct 15, 2011, at 2:32 PM, Hin-Tak Leung wrote: > Found the simpliest way of seeing I bug I encountered doing "R CMD check > --use-gct": Just launch R (with --vanilla), and do this: > >> ?gctorture &

Re: [Rd] readRDS and saveRDS

2011-10-19 Thread Simon Urbanek
tantiate their claims. http://lists.rforge.net/cgi-bin/mailman/listinfo/aleph-devel (If you have a better idea where to collect it in a single place, I'm all ear). I'd like to collect as many such ideas as possible so we don't forget something in unlikely case Aleph gets off the groun

Re: [Rd] R fails when converting units using Hershey-Fonts

2011-10-25 Thread Simon Urbanek
Thanks, now fixed. Simon On Oct 25, 2011, at 5:21 AM, Mark Heckmann wrote: > I run into some problems when trying to convert units using Hershey-Fonts: R > chrashes. > >> library(grid) >> label <- "some text" >> pushViewport(viewport(gp=gpar(fontf

Re: [Rd] Error message library()

2011-10-26 Thread Simon Urbanek
fetching CRAN repos on that behalf ranges somewhere between overkill and stupidity. If the user can't type install.packages() then I am certainly not confident that the user can use R for any reasonable data analysis. Cheers, Simon __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Error message library()

2011-10-26 Thread Simon Urbanek
On Oct 26, 2011, at 1:05 PM, Milan Bouchet-Valat wrote: > Le mercredi 26 octobre 2011 à 12:34 -0400, Simon Urbanek a écrit : >> Please, no! We don't want to enter the realm of the computer assuming >> it knows what you want to do (which is becoming too common nowadays, >

Re: [Rd] Error message library()

2011-10-26 Thread Simon Urbanek
for any reasonable data analysis. > > In that case, maybe a better message should be: > >> library(xyz) > Error in library(xyz) : there is no package called 'xyz'. > Are you sure you are smart enough to use R? > > ;) > Unfortunate

Re: [Rd] Error message library()

2011-10-28 Thread Simon Urbanek
On Oct 28, 2011, at 6:49 AM, Renaud Gaujoux wrote: > "BTW: an ever more intuitive solution (IMHO) would be to auto-complete > package names in library( ... Deepayan?;) That is non-intrusive and in line > with the general use of R." (Simon) > > This is indeed a long

Re: [Rd] Sweave, cairo_pdf, xetex, CJK (Re: Sweave, cairo_pdf, CJK, ghostscript)

2011-10-31 Thread Simon Urbanek
are using, not on R. Only most recent versions of Cairo (1.10.x) switched the format to PDF-1.5 and added format restriction functions, they are not available in general. In addition, PDF-1.5 is 8 years old, so whatever tools can't deal with it are seriously out of date. Cheers, Simon >

Re: [Rd] Sweave, cairo_pdf, xetex, CJK (Re: Sweave, cairo_pdf, CJK, ghostscript)

2011-10-31 Thread Simon Urbanek
On Oct 31, 2011, at 7:52 PM, Hin-Tak Leung wrote: > --- On Mon, 31/10/11, Simon Urbanek wrote: > >> On Oct 31, 2011, at 5:56 PM, Hin-Tak Leung wrote: >> >>> I am still doing some cosmetic things (adding >> annotations with some of the really minority languag

Re: [Rd] reducing a too-large matrix obtained with allocMatrix()

2011-11-01 Thread Simon Urbanek
nge the whole matrix anyway so you would a) waste memory in the result and b) still need to essentially copy in place in an additional pass. Cheers, Simon __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

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