Re: [Rd] How to change name of .so/.dll

2012-06-12 Thread Simon Urbanek
to create a datatable$(SHLIB_EXT) target - it doesn't work due to the makefile loading sequence, unfortunately). AFAIR you don't need to mess with install.libs because the default is to install all shlibs in the directory. Cheers, Simon > Thanks! > Matthew > > _

Re: [Rd] R and C pointers

2012-06-19 Thread Simon Urbanek
*pdimx = INTEGER(dimx); You can use REAL() only on real vectors, not on anything else. > Much in the same line, what would be the procedure to create pointers > to a logical vector y? > I tried: > PROTECT(y = coerceVector(y, LGLSXP)); > py = REAL(y); > > where R throws

Re: [Rd] how to manipulate dput output format

2012-06-20 Thread Simon Urbanek
= structure(list(sharedType = "FileBacked", filename = > "res", totalRows = 1528, >totalCols = 53040, rowOffset = c(0, 1528), colOffset = c(0, >53040), nrow = 1528, ncol = 53040, > rowNames = c(A, AA, RNT.A, ADVA, AAPL, AAS, ABFS, ABM, ABT, ... ) > colNames

Re: [Rd] how to manipulate dput output format

2012-06-25 Thread Simon Urbanek
read > easily - such as JSON? > > Cheers, > Simon > > > > > > Yeap, except i was just working with someone elses choice. Bigmatrix code > uses dput() to dump desc file of filebacked matrices. Ah, ok, that is indeed rather annoying as it's pretty much

Re: [Rd] how to manipulate dput output format

2012-06-25 Thread Simon Urbanek
On Jun 25, 2012, at 11:57 AM, andre zege wrote: > > > On Mon, Jun 25, 2012 at 11:17 AM, Simon Urbanek > wrote: > > On Jun 25, 2012, at 10:20 AM, andre zege wrote: > > > dput() is intended to be parsed by R so the above is not possible without > > massaging

[Rd] Questions about imports to a namespace

2012-07-02 Thread Simon Knapp
, which my package depends on. Should I do it? 6) I am used to writing 'requires(package)' for each package I use within a function. If I have used import or importFrom in my NAMESPACE, should I still do this? Looking forward to your advice, Simon Knapp

Re: [Rd] Questions about imports to a namespace

2012-07-04 Thread Simon Knapp
z[x] }, x, c(NA, x[-length(x)]), MoreArgs = list(z), SIMPLIFY=F) where x is a list (and z a vector). One should really make the test "if(length(y) > 1 && !is.na(y))"... but is there a nicer way? Thanks again, Simion On Tue, Jul 3, 2012 at 8:41 PM, Duncan Murdoch wrote: > On

Re: [Rd] Are R packages supposed to be "relocatable"? (avoiding BioConductor scripts...)

2012-07-19 Thread Simon Urbanek
gt; particular R command (install.packages(), for example). It seems > insane to me that they expect (http://www.bioconductor.org/install) a > root user to run > You can install BioC packages simply with install.packages() - there is no black magic involved, it's a regular repository j

Re: [Rd] Reading many large files causes R to crash - Possible Bug in R 2.15.1 64-bit Ubuntu

2012-07-23 Thread Simon Urbanek
ticore/parallel to at least use all cores of your machine. Cheers, Simon > Perhaps this already exists somewhere > and I am not aware of it. > > -Original Message- > From: Joshua Ulrich [mailto:josh.m.ulr...@gmail.com] > Sent: Monday, July 23, 2012 12:00 PM

Re: [Rd] Rconfig.h & unsupported architectures

2012-07-28 Thread Simon Urbanek
re is not installed/supported. This is rather odd, unless you're trying to use PPC on more recent OS X without Rosetta but even then ... If in doubt, sudo rm -rf /Library/Frameworks/R.framework and re-install R ... Cheers, Simon __ R-devel@r-project.o

Re: [Rd] Interaction between callNextMethod() and selectMethod()

2012-08-04 Thread Simon Urbanek
ease" (I'm not sure he meant it in the way you interpreted it, though) - I think it's slightly annoying that R.version.string in R-devel doesn't contain the version number (because it makes it slightly more complicated to get the version number in scripts), but not having it or showing it for releases would certainly be fatal but I did not see any reason or discussion about such a move. Cheers, Simon __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] [R] debug vs regular mode

2012-08-10 Thread Simon Urbanek
t the code below runs. The problem is that it causes a very deep recursion so depending on the stack it will fail (interestingly, it will segfault in the call to R_CheckStack which is paradoxical :)). I think the proper fix would be to use iteration in StripTerm instead of recursion ... C

Re: [Rd] [R] debug vs regular mode

2012-08-10 Thread Simon Urbanek
On Aug 10, 2012, at 7:08 PM, Zhang, Peng wrote: > Hi Simon, > > That could be the explanation. Is it possible to know stack limit for > different scenarios? The limit is the same - what changes is the stack usage (how deep you are at that point). Note, however, that it's irr

Re: [Rd] compile fails with x86_64-alpine-linux-uclibc-gcc

2012-08-13 Thread Simon Urbanek
ar *s, int n, FILE *stream) { return fix_fgets(s, n, stream); } Cheers, Simon > i've *walked* back the versions down to 2.14.1 and i still get exact same > error msg. > there are some patches applied but none of them touches c

Re: [Rd] compile fails with x86_64-alpine-linux-uclibc-gcc

2012-08-13 Thread Simon Urbanek
On Aug 13, 2012, at 2:22 PM, nobody wrote: > On Mon, Aug 13, 2012 at 10:49:26AM -0400, Simon Urbanek wrote: >> I suspect that your runtime/libc is defining fgetc as a macro which breaks >> any code that uses it as an identifier. Ideally, your runtime should be >> fixed to

Re: [Rd] compile fails with x86_64-alpine-linux-uclibc-gcc

2012-08-14 Thread Simon Urbanek
Ouch - typo, misread ... Sent from my iPhone On Aug 14, 2012, at 7:48 AM, peter dalgaard wrote: > > On Aug 13, 2012, at 20:22 , nobody wrote: > >> On Mon, Aug 13, 2012 at 10:49:26AM -0400, Simon Urbanek wrote: >>> I suspect that your runtime/libc is defining fgetc

Re: [Rd] compile fails with x86_64-alpine-linux-uclibc-gcc

2012-08-14 Thread Simon Urbanek
fgetc(FILE *stream) { return fix_fgetc(stream); } It should still be fixed upstream because I don't think POSIX allows fgetc to be a macro. Cheers, Simon __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] chown, chgrp?

2012-08-15 Thread Simon Urbanek
; Barry > > [1] Or at least normal normal users. There might be special normal > users with certain chown permissions... > ... and moreover with the increasing adoption of ACL on unix and non-existence of uid/gid on Windows this is more an archaic curiosity so I don't think i

Re: [Rd] Build from Source fails on Loading required package Matrix

2012-08-15 Thread Simon Urbanek
from https://svn.r-project.org/R/branches/R-2-15-branch/. Did you also rsync the recommended packages? They are not in the SVN. If in doubt, use released source tar balls. Cheers, Simon > This is my first try building R from source. The build seems to go far, > then terminates with "undefin

Re: [Rd] Compressing data for package builds

2012-08-16 Thread Simon Urbanek
can you elaborate on "doesn't do anything I can see"? In what sense? No output? No compression? Cheers, Simon > Is there a piece of the puzzle I am missing or instructions better than > these: I tried LazyDataCompression and my > data.rdb is 90Kb. > > "Package

[Rd] very minor typo in doc for embedFonts

2012-08-27 Thread Simon Jackman
version.string R version 2.15.1 Patched (2012-08-26 r60438) nickname Roasted Marshmallows > — Simon Jackman Simon Jackman, Depts of Political Science & (by courtesy) Statistics, Stanford University, Stanford, CA 94305-6044, USA. http://jackma

Re: [Rd] Don't dput() data frames?

2012-08-28 Thread Simon Urbanek
fficient and most dangerous (as in insecure) way. That's why there is serialization instead ... Cheers, Simon > This seems to work rather robustly: > > data(iris) > source(textConnection(paste0("iris2 <- ", capture.output(dput(iris) > identical(iris, iris

Re: [Rd] Don't dput() data frames?

2012-08-28 Thread Simon Urbanek
On Aug 28, 2012, at 2:14 PM, "R. Michael Weylandt" wrote: > On Tue, Aug 28, 2012 at 1:00 PM, Simon Urbanek > wrote: >> >> On Aug 28, 2012, at 1:51 PM, R. Michael Weylandt wrote: >> >>> /src/main/attrib.c contains this comment in row_names_gets(): &

Re: [Rd] Terminating and restarting an embedded R instance possible?

2012-08-30 Thread Simon Urbanek
same process. There are many global variables that rely on being initialized by the data segment. Supporting re-init of R would be a considerable effort as many of those are static so there is no simple way to re-set them. Cheers, Simon > This error is reproduced by running > >

Re: [Rd] stack overflow? was Re: [R] segfault in gplots::heatmap.2

2012-08-30 Thread Simon Urbanek
`--Error: C stack usage is too close to th

Re: [Rd] Possible page inefficiency in do_matrix in array.c

2012-09-02 Thread Simon Urbanek
min lq median uq max 1 matrix(nrow = 1, ncol = ) 949.9638 950.6642 952.7497 961.001 1246.573 Cheers, Simon > Matthew > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > > __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Possible page inefficiency in do_matrix in array.c

2012-09-02 Thread Simon Urbanek
rsion now (which now also works with large vectors). Cheers, Simon On Sep 2, 2012, at 10:32 PM, Simon Urbanek wrote: > On Sep 2, 2012, at 10:04 PM, Matthew Dowle wrote: > >> >> In do_matrix in src/array.c there is a type switch containing : >> >> case LGLSXP : >

Re: [Rd] Possible page inefficiency in do_matrix in array.c

2012-09-04 Thread Simon Urbanek
Switching to a >> single index doesn't seem to have any impact. R-devel has the faster >> version now (which now also works with large vectors). >> >> Cheers, >> Simon > > I was intrigued why the compiler doesn't swap the loops when you thought >

Re: [Rd] Need to tell R CMD check that a function qr.R is not a method

2012-09-07 Thread Simon Urbanek
On Sep 7, 2012, at 12:59 PM, "Warnes, Gregory" wrote: > > On 9/7/12 12:55 PM, "Uwe Ligges" wrote: > >> On 07.09.2012 17:05, Tim Hesterberg wrote: >>> When creating a package, I would like a way to tell R that >>> a function with a period in its name is not a method. >> >> You can't. There ar

Re: [Rd] Need to tell R CMD check that a function qr.R is not a method

2012-09-07 Thread Simon Urbanek
On Sep 7, 2012, at 2:14 PM, Duncan Murdoch wrote: > On 07/09/2012 2:00 PM, Simon Urbanek wrote: >> On Sep 7, 2012, at 12:59 PM, "Warnes, Gregory" >> wrote: >> >> > >> > On 9/7/12 12:55 PM, "Uwe Ligges" wrote: >> > >

[Rd] Question about copying arguments in C.

2012-09-14 Thread Simon Knapp
/ *END OF QUESTION* UNPROTECT(1); // or UNPROTECT(2) in latter case. return ans; } I think this is the same as asking whether the following is OK: SEXP func(SEXP arg) { return arg; } Thanks in advance, Simon __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Question about copying arguments in C.

2012-09-15 Thread Simon Urbanek
On Sep 14, 2012, at 11:10 PM, Simon Knapp wrote: > Hi List, > > I'd imagine this is a question that has been answered before, but I > can't seem to track it down, sorry for the duplication if it has. > > I am writing an interface for a C library and want to r

Re: [Rd] Question about copying arguments in C.

2012-09-15 Thread Simon Knapp
Hi Simon, Thanks for your advice, but I'm still not clear. In my case I don't want to modify the result - the integer acts as a handle for indexing an array in later calls back into my library. As I understand it, returning result like SEXP func(SEXP arg) {return arg;} would not co

Re: [Rd] Question about copying arguments in C.

2012-09-15 Thread Simon Urbanek
On Sep 15, 2012, at 11:28 AM, Simon Knapp wrote: > Hi Simon, > > Thanks for your advice, but I'm still not clear. In my case I don't > want to modify the result - the integer acts as a handle for indexing > an array in later calls back into my library. > > As I

Re: [Rd] Question about copying arguments in C.

2012-09-15 Thread Simon Urbanek
On Sep 15, 2012, at 2:57 PM, Simon Urbanek wrote: > > On Sep 15, 2012, at 11:28 AM, Simon Knapp wrote: > >> Hi Simon, >> >> Thanks for your advice, but I'm still not clear. In my case I don't >> want to modify the result - the integer acts as a han

Re: [Rd] Risk of readRDS() not detecting race conditions with parallel saveRDS()?

2012-09-15 Thread Simon Urbanek
On Sep 15, 2012, at 1:21 PM, Henrik Bengtsson wrote: > I hardly know anything about the format used in (non-compressed) > serialization/RDS, but hoping someone with more knowledge could give > me some feedback; > > Consider two R processes running in parallel on the same unknown file > system.

Re: [Rd] Question about copying arguments in C.

2012-09-15 Thread Simon Knapp
king at the code for setAttrib, which does explicitly protect its first two arguments (why not the third???), I'd presume the answer is no and hence that I should protect new SEXPs before passing them to such functions. Yet more thanks :-) Simon On Sun, Sep 16, 2012 at 5:08 AM, Simon Urba

Re: [Rd] Question about copying arguments in C.

2012-09-16 Thread Simon Urbanek
On Sep 15, 2012, at 10:50 PM, Simon Knapp wrote: > OK I think I'm getting it, but one more question if I may... > > When I write a function, I don't protect the arguments explicitly (I > understand that they should be protected within the calling function) - are >

Re: [Rd] Effect of the R framework on ctype.c

2012-10-08 Thread Simon Urbanek
's hard to tell without a way to reproduce it. Cheers, Simon On Oct 8, 2012, at 10:11 AM, Sylvain Loiseau wrote: > Dear all, > > I'm facing a strange behavior in the the C code of a R package. This package, > "rcqp", is a wrapper on an existing program that I

Re: [Rd] problem with OSX binary package build?

2012-10-15 Thread Simon Urbanek
age? CRAN says Downloads: Package source: BayesFactor_0.8.3.tar.gz MacOS X binary: BayesFactor_0.8.3.tgz Windows binary: BayesFactor_0.8.3.zip Cheers, Simon > The only issue in the check log is a note: > > checking R code for possible problems ... NOTE > all.Nways.env.mc : : no visible b

Re: [Rd] Do *not* pass '...' to NextMethod() - it'll do it for you; missing documentation, a bug or just me?

2012-10-16 Thread Simon Urbanek
hod’ is used with only one argument, ‘generic’, but if further arguments are supplied these modify the call to the next method." The whole point of NextMethod is that it starts off with the full call *including* ... from the function - by calling NextMethod you are modifying that call, so by add

Re: [Rd] R CMD check --force-biarch

2012-10-19 Thread Simon Urbanek
D check RNetica --no-multiarch, this test runs correctly. > If I run R CMD check RNetica --extra-arch, this fails at the same point. > You probably mean to use R --arch i386 to check your 32-bit version - architectures are normally tested separately. Cheers, Simon > Thanks in advan

Re: [Rd] concurrent requests (Rook, but I think the question is more general)

2012-10-24 Thread Simon Urbanek
allowed to run during interrupt check on all platforms - you may want to check that first. Cheers, Simon > The problem is that once the analysis starts, Rook does not respond to > requests. All of the status requests to Rook pile up, and then are answered > when t

Re: [Rd] concurrent requests (Rook, but I think the question is more general)

2012-10-24 Thread Simon Urbanek
On Oct 24, 2012, at 3:09 PM, Richard D. Morey wrote: > On 24/10/12 8:53 PM, Simon Urbanek wrote: >> On Oct 24, 2012, at 2:13 PM, Richard D. Morey wrote: >> >>> This question involves Rook, but I think the answer will be general enough >>> that it pays to pos

Re: [Rd] concurrent requests (Rook, but I think the question is more general)

2012-10-24 Thread Simon Urbanek
On Oct 24, 2012, at 3:47 PM, Richard D. Morey wrote: > > Richard D. Morey > Assistant Professor > Psychometrics and Statistics > Rijksuniversiteit Groningen / University of Groningen > http://drsmorey.org/research/rdmorey > > On 24/10/12 9:23 PM, Simon Urbanek wrote:

Re: [Rd] Getting ordered factor levels from C

2012-10-24 Thread Simon Urbanek
','blue','green','red'), c('blue','green','red'), > ordered=TRUE) > > When I get the "levels" attribute in C, I get back the the first vector, not > the second. What are you using in C? AFAICS it works just fine: &g

Re: [Rd] concurrent requests (Rook, but I think the question is more general)

2012-10-24 Thread Simon Urbanek
On Oct 24, 2012, at 4:35 PM, Richard D. Morey wrote: > On 24/10/12 10:07 PM, Simon Urbanek wrote: >> On Oct 24, 2012, at 3:47 PM, Richard D. Morey wrote: >> >>> I'd be fine with the poor man's solution (maybe with tempfile()?) if I can >>> get acc

Re: [Rd] concurrent requests (Rook, but I think the question is more general)

2012-10-25 Thread Simon Urbanek
status as a serialized R object. Cheers, Simon On Oct 25, 2012, at 11:45 AM, Richard D. Morey wrote: > On 24/10/12 10:55 PM, Simon Urbanek wrote: >> >> The point is that you need a separate monitoring process or threads. That >> process can be R, Rserve or any thing el

Re: [Rd] Depends/Imports/Suggest/Enhence

2012-11-06 Thread Simon Urbanek
for the package to operate. "Suggests" means that symbols from the package are not required, but they are used in examples or vignettes, so the listed package(s) will be needed for a full check. They are not needed for the operation of the package, though. Cheers, Simon > Christophe

Re: [Rd] LazyData: no / yes

2012-11-06 Thread Simon Urbanek
In this second example, after 'library(foo0)', I was expecting the memory to > rize up to 39 668, not to 52 760... Where does the difference come from? > What do you mean by "memory used" - i.e. where do you get that from? After GC? This certainly doesn't look like a

Re: [Rd] Depends/Imports/Suggest/Enhence

2012-11-06 Thread Simon Urbanek
gh namespaces (this is also related to not exporting methods). There is a difference in treating R as ! a scripting language versus an interactive analytics system and I find that recently focus has been shifting to the former aspect, while, personally, I think it's actually more useful as the

Re: [Rd] Depends/Imports/Suggest/Enhence

2012-11-06 Thread Simon Urbanek
On Nov 6, 2012, at 3:43 PM, Uwe Ligges wrote: > > > On 06.11.2012 21:17, Simon Urbanek wrote: >> >> On Nov 6, 2012, at 2:44 PM, Davor Cubranic wrote: >> >>> On 2012-11-06, at 9:49 AM, Uwe Ligges wrote: >>> >>>> On 06.11.2012 17:55,

Re: [Rd] LazyData: no / yes

2012-11-06 Thread Simon Urbanek
quot;where on hell are lost the 52 > 760 - 39 668 K ?" > :-) Ask your system ;) - you're comparing wrong things: a) you didn't run garbage collection so there will be temporary objects around and b) see FAQ 7.42 why what you're looking at has no real meaning. Cheers, Si

[Rd] Strange behaviour in as.Date

2012-11-06 Thread Simon Knapp
Defining the wrapper: as.Date.character <- function(x, format='', ...) { if(format=='') base::as.Date.character(x, ...) else base::as.Date.character(x, format=format, ...) } provides (what I think is) the expected behaviour. ... is this the righ

Re: [Rd] Correct use of Depends, Imports and ::

2012-11-07 Thread Simon Urbanek
y of doing it in R) ? > > > > Finally, can I use the following call in the body of a function of my package > foo0: > > foo3::f3(x) > > without declaring the package 'foo3' in the Imports section of my DESCRIPTION > file ? > No, it has to be at leas

Re: [Rd] Correct use of Depends, Imports and ::

2012-11-07 Thread Simon Urbanek
On Nov 7, 2012, at 9:25 AM, Simon Urbanek wrote: > On Nov 7, 2012, at 4:04 AM, Mauricio Zambrano-Bigiarini wrote: > >> Dear R developers, >> >> Taking advantage of the yesterday discussion about the use of >> Depends/Import/Suggests/Enhances, I would

Re: [Rd] unable to load shared object - opencv

2012-11-08 Thread Simon Urbanek
On Nov 8, 2012, at 3:19 PM, niandra wrote: > Hi all > > i'm trying to use the opencv's function into R. > > i wrote a simple script, just for try to understand how use c++ in R, it > loads an image and write it with a different name (i know it ), and then > write "Hello, World". The file is nam

Re: [Rd] unable to load shared object - opencv

2012-11-08 Thread Simon Urbanek
On Nov 8, 2012, at 3:34 PM, niandra wrote: > Sorry but i'm really a beginner. > > If when i use opencv with Xcode i need to set the following path > /System/Library/Frameworks > /usr/local/include > /usr/local/lib > > how can i specify this in R CMD SHLIB? > Those are essentially default s

Re: [Rd] built-in NAMED(obj) from within R

2012-11-09 Thread Simon Urbanek
and it is done in place hence there is neither duplication nor copying - simply the value of the 11th element is changed. > the vector is not duplicated. This confused me at first, so I thought I'd > point it out. > I'm not quite sure what is your distinction you

Re: [Rd] built-in NAMED(obj) from within R

2012-11-09 Thread Simon Urbanek
On Nov 9, 2012, at 9:46 PM, Hadley Wickham wrote: > On Friday, November 9, 2012, Simon Urbanek wrote: > > On Nov 9, 2012, at 8:00 AM, Hadley Wickham wrote: > > >>> The goal is to ascertain whether a copy of an object has been made. > >> > >> T

Re: [Rd] paths and Rook problems only in OSX CRAN binary package?

2012-11-26 Thread Simon Urbanek
) } rookEnv$aov$s$browse("aov") } @@ -262,7 +262,7 @@ } } -aovApp <- Builder$new( +aovApp <- function() Builder$new( Static$new( urls = '/www', root = system.file('.', package='BayesFactor') Cheers, Simon On Nov 21, 2012, a

Re: [Rd] [R] choose folder interactively

2012-11-28 Thread Simon Urbanek
ave cross-platform implementation for file.choose(). While at it, we may also consider adding a flag for allowing multiple items selection... Cheers, Simon >> Is this the sort of thing for which a patch to the Mac-specific code >> would be welcomed/of some interest by R-Cor

Re: [Rd] No R 2.15.2 or R 2.15.2 patched version option in bug tracker

2012-11-28 Thread Simon Urbanek
Thanks, added. Simon On Nov 28, 2012, at 4:39 PM, Brian Diggs wrote: > When I went to report a (very minor) bug today, I noticed that under the > choices for Version, there was no entry for "R 2.15.2" nor "R 2.15.2 > patched". I could not find a contact email for

Re: [Rd] SUGGESTION: Add get/setCores() to 'parallel' (and command line option --max-cores)

2012-12-04 Thread Simon Urbanek
ot as the state is global for the entire R. The (vague) plan is to generalize this for all platforms - if not binding to a particular core then at least to monitor the assigned number of cores. Cheers, Simon On Dec 4, 2012, at 3:24 PM, Henrik Bengtsson wrote: > In the 'parallel'

Re: [Rd] RInside, rcpp compilation problem

2012-12-04 Thread Simon Urbanek
r problem > .. Where is the rcpp.h header file?? In the Rcpp package which RInside links to. Please use rcpp-devel mailing list for such questions (as per request of the authors). Cheers, Simon > The below code fails to compile as the RInside.h header file references the > rcpp.h header

Re: [Rd] Stand alone application using R

2012-12-05 Thread Simon Urbanek
On Dec 5, 2012, at 1:33 AM, Manoj G wrote: > Hello everyone... > > I am curious to develop a stand-alone application using R and I am exploring > how to do it. There are many examples - the GUIs bundled with R (R.app for Mac, Rgui, rterm for Windows) or packages like Rserve (C), RInside (

Re: [Rd] Stand alone application using R

2012-12-05 Thread Simon Urbanek
On Dec 5, 2012, at 11:09 AM, Manoj G wrote: > Thanks Simon, > > I will go ahead with JGR now. > > There are java packages like rJava and RCaller. And i found they are not > useful after a certain extent. How different is JGR from these two? > JGR is using JRI from

Re: [Rd] Comments in the DESCRIPTION file

2012-12-06 Thread Simon Urbanek
the DCF definition. As both Brian and Bill pointed out, the proper way to do that is to define a data field with data/value as the comment. Cheers, Simon > Cheers, > H. > >> >> (It may also mess up some dcf parsing code that I've written - it checks >> t

Re: [Rd] Changing arguments inside .Call. Wise to encourage "const" on all arguments?

2012-12-10 Thread Simon Urbanek
;return by reference damage". The only problem is if you modify input arguments while someone else holds a reference, but there is no way in C to prevent that while still allowing them to be useful. Note that it is legal to modify input arguments if there are no references to it. Cheers,

Re: [Rd] Changing arguments inside .Call. Wise to encourage "const" on all arguments?

2012-12-10 Thread Simon Urbanek
On Dec 10, 2012, at 2:05 PM, Simon Urbanek wrote: > > On Dec 10, 2012, at 1:51 AM, Paul Johnson wrote: > >> I'm continuing my work on finding speedups in generalized inverse >> calculations in some simulations. It leads me back to .C and .Call, >> and some q

Re: [Rd] Could Rstd_Busy do something (src/unix/sys-std.c)?

2012-12-15 Thread Simon Urbanek
s that your handler will be called as soon as possible after the signal has arrived - that is probably what you want (see CarbonEL for a simple example how this is used). Cheers, Simon > Thanks! > > -- > Jakson Alves de Aquino > Federal University of Ceará > Social Scienc

Re: [Rd] Could Rstd_Busy do something (src/unix/sys-std.c)?

2012-12-15 Thread Simon Urbanek
On Dec 15, 2012, at 2:20 PM, Jakson Alves de Aquino wrote: > On Sat, Dec 15, 2012 at 1:09 PM, Simon Urbanek > wrote: >> On Dec 15, 2012, at 6:36 AM, Jakson Alves de Aquino wrote: >>> I could avoid the crash if I knew that R is busy at the moment that >>> it

Re: [Rd] Could Rstd_Busy do something (src/unix/sys-std.c)?

2012-12-15 Thread Simon Urbanek
On Dec 15, 2012, at 5:32 PM, Jakson Alves de Aquino wrote: > On Sat, Dec 15, 2012 at 5:41 PM, Simon Urbanek > wrote: >> >> On Dec 15, 2012, at 2:20 PM, Jakson Alves de Aquino wrote: >> >>> On Sat, Dec 15, 2012 at 1:09 PM, Simon Urbanek >>> wrote

Re: [Rd] SUGGESTION: Add get/setCores() to 'parallel' (and command line option --max-cores)

2012-12-15 Thread Simon Urbanek
- typically the real problem is memory, though. That said, the balance is heavily machine and task dependent so any default will be bad for some cases. Typically, for commodity machines with couple dozen cores it's good to overload, for bigger machines it's bad. Cheers, Simon ___

Re: [Rd] Scanning a R script for potentially insidious commands

2012-12-19 Thread Simon Urbanek
one with access to R has the capability to run arbitrary native code with .C/.Call and you can't disable that without making R unusable. Cheers, Simon > -- > Joris Meys > Statistical consultant > > Ghent University > Faculty of Bioscience Engineering > Departmen

Re: [Rd] Scanning a R script for potentially insidious commands

2012-12-19 Thread Simon Urbanek
re will always be new ones. It's simply the wrong approach IMHO. Cheers, Simon > HTH, > ~G > > > > On Wed, Dec 19, 2012 at 5:33 AM, Dirk Eddelbuettel wrote: > >> >> Jeroen has a package devoted to the sandboxing approach in conjunction with >> the sy

Re: [Rd] Scanning a R script for potentially insidious commands

2012-12-19 Thread Simon Urbanek
On Dec 19, 2012, at 1:09 PM, Gabriel Becker wrote: > Simon, > > I don't really have a horse in this race (as I said I didn't write sandboxR), > but it seems like if you control library (to prevent "untrusted" packages, > specifically including things li

Re: [Rd] Scanning a R script for potentially insidious commands

2012-12-19 Thread Simon Urbanek
On Dec 19, 2012, at 1:10 PM, Simon Urbanek wrote: > On Dec 19, 2012, at 1:09 PM, Gabriel Becker wrote: > >> Simon, >> >> I don't really have a horse in this race (as I said I didn't write >> sandboxR), but it seems like if you control library (to preven

Re: [Rd] reinterpreting externalptr in R

2012-12-25 Thread Simon Urbanek
to R, so *you* have to write that code that interprets them. Obviously it's then up to you to create the corresponding R object from the external pointer. You may want to have a look at interface packages like Rcpp, rJava, Rserve, ... to understand how objects are converted to/from other langua

Re: [Rd] Creating a Factor Object in C code?

2012-12-27 Thread Simon Urbanek
er, so an automatic > conversion to factors would be preferable.. > It would not for reasons above which is why it's typically done at R level as an optional post-processing step. That doesn't mean you can't do it in C, but it i

Re: [Rd] How to ensure -O3 on Win64

2012-12-27 Thread Simon Urbanek
o dogroups.o > > How can I ensure that data.table is compiled with -O3 on Win64? > You can't - at least not in a way that doesn't circumvent the R build system. Also it's not portable so you don't want to mess with optimization flags and hard-code it in y

Re: [Rd] How to ensure -O3 on Win64

2012-12-27 Thread Simon Urbanek
On Dec 27, 2012, at 6:08 PM, Matthew Dowle wrote: > On 27.12.2012 17:53, Simon Urbanek wrote: >> On Dec 23, 2012, at 9:22 PM, Matthew Dowle wrote: >> >>> >>> Hi, >>> >>> Similar questions have come up before on the list an

Re: [Rd] Creating a Factor Object in C code?

2012-12-27 Thread Simon Urbanek
On Dec 27, 2012, at 5:43 PM, Rory Winston wrote: > Hi Simon > > Thanks for the clarification - makes sense and I now think youre right - > probably better to avoid an automatic factor conversion and let the user > explicitly convert if necessary. And you are right, I did

Re: [Rd] linux multi-threaded compilation is running only on one processor

2012-12-28 Thread Simon Urbanek
uke Tierney has done some of that work -- did you try pnmath? Cheers, Simon > > = > > CMP_LIB_PATH=/opt/intel/lib/intel64 > MKL_LIB_PATH=/opt/intel/composerxe/mkl/lib/intel

Re: [Rd] weird bug with parallel, RSQlite and tcltk

2012-12-31 Thread Simon Urbanek
workers. The latter is ok in your code so you're probably bitten by the former. Cheers, Simon > In parallel code (here with parallel::mclappy, but I got it > doMC/multicore too), if the library(tcltk) is loaded, R hangs when > trying to open a DB connection. > I got the same be

Re: [Rd] weird bug with parallel, RSQlite and tcltk

2012-12-31 Thread Simon Urbanek
aven't received an answer yet. > AFAIR MPI doesn't support forking. Cheers, Simon > Cheers, > > Marius > > PS: https://stat.ethz.ch/pipermail/r-sig-hpc/2012-December/001572.html > > __ > R-devel@r-project.org

Re: [Rd] weird bug with parallel, RSQlite and tcltk

2013-01-03 Thread Simon Urbanek
e it for Cocoa .. the question it whether we should also remove all input handlers (they are likely to break as the FDs will be shared by the parent *and* children) or avoid only R_PolledEvents() ... Cheers, Simon >> >> As you can see in my example code, the in-memory database

Re: [Rd] "Default" accessor in S4 classes

2013-01-07 Thread Simon Urbanek
that's not what you had in mind. For generics you can simply implement a method for your class (that does the coercion, for example, or uses a more efficient way). If you cannot define a generic or don't want to write your own methods then it's a probl

Re: [Rd] Date time conversion bug (as.POSIXct)?

2013-01-11 Thread Simon Urbanek
puts the name of the time zone behind the > time calculated in GMT, and does not calculate the time in the asked time > zone. It works perfectly fine the way it's supposed to - you just give it wrong input. What you get from as.numeric(...) is the offset from the epoch (

Re: [Rd] Who does develop the R core and libs, and how / where is it hosted?

2013-01-14 Thread Simon Urbanek
, check out the wish list. > And in which way could support be done? > Write good packages, provide patches to R, donate to R foundation? Cheers, Simon __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Who does develop the R core and libs, and how / where is it hosted?

2013-01-14 Thread Simon Urbanek
27;s a sign of a relative maturity of R that we don't have a particular "milestone"-like agenda. Typically, most things can be supplied as packages - the only reason to touch the core of R itself is if it is something that cannot be done as a package, and given R's modularity that is fortunately not very often the case. Cheers, Simon __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Mac libgfortran.2.dylib

2013-01-14 Thread Simon Urbanek
your case although it's a bit unusual... Cheers, Simon On Jan 14, 2013, at 9:50 PM, Daniel Fuka wrote: > Howdy, > > I was under the impression that CRAN took care of automagically making > sure the CRAN compiled fortran was linked to the fortran libs > distributed in R bin

Re: [Rd] rpvm arch check

2013-01-15 Thread Simon Urbanek
res (so users don't need to install them and can use any architecture). Cheers, Simon __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] How to call Java main method using rJava package?

2013-01-16 Thread Simon Urbanek
program to > print *The sum is 6* from R? OR how can I call the main method? .jcall("A","V","main",.jarray(list(), "java/lang/String") But note that System.out is sent to stdout by Java so it won't output in the R console as R output so y

Re: [Rd] rpvm arch check

2013-01-17 Thread Simon Urbanek
nnot comment on the rpvm package in particular. Cheers, Simon > Thanks, > > Michael > > > On Tue, Jan 15, 2013 at 8:53 PM, Simon Urbanek > wrote: > On Jan 15, 2013, at 2:24 PM, Michael Li wrote: > > > I've trying to fix the check error in rpvm package. Right

Re: [Rd] Implications of a Dependency on a GPLed Package

2013-01-25 Thread Simon Urbanek
>>> >>> You should be. If you really want to know whether they are using your code >>> illegally, or about whether your proposed use of other peoples code is >>> legal, you really should get legal advice. >> >> This issue has been brought up sev

Re: [Rd] best practice for packages using mclapply to avoid tcltk

2013-02-03 Thread Simon Urbanek
As Peter pointed out earlier, this is better addressed by disabling the Tcl/Tk event loop in forked processes. Cheers, Simon On Feb 2, 2013, at 5:02 PM, Paul Johnson wrote: > Dear R-devel friends: > > I'm back to bother you again about the conflict between mclapply and >

Re: [Rd] Regression stars

2013-02-12 Thread Simon Urbanek
o through the integer indirection). On 32-bit strings are in theory always faster than factors, on 64-bit they use double the size so they may or may not be faster depending on how you hit the cache etc. Anyway, in modern R versions you're much better off using character vectors than facto

Re: [Rd] stopping finalizers

2013-02-14 Thread Simon Urbanek
ally, the simple solution would be to simply preserve the bag in the critical region. However, this would not guarantee that the finalizers get fired at the end of the section even if gc occurred. I suspect it would be harder to guarantee that (other than running gc explicitly or performing explicit de

Re: [Rd] Building R from source under Mac OS X 10.8.2?

2013-02-15 Thread Simon Urbanek
tecture you want to compile you'll have to use either -arch x86_64 or -arch i386 (see the FAQ for a quickstart guide to compiling R). Cheers, Simon > Thanks, > Dominick > > __ > R-devel@r-project.org mailing list > https://

<    4   5   6   7   8   9   10   11   12   13   >