Re: [Rd] how to manipulate dput output format

2012-06-25 Thread andre zege
dput() is intended to be parsed by R so the above is not possible without massaging the output. But why in the would would you use dput() for something that you want to read in Java? Why don't you use a format that Java can read easily - such as JSON? Cheers, Simon Yeap, except i was

Re: [Rd] how to manipulate dput output format

2012-06-25 Thread andre zege
On Mon, Jun 25, 2012 at 11:17 AM, Simon Urbanek simon.urba...@r-project.org 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 the output. But why in the would would you use dput() for something

Re: [Rd] how to manipulate dput output format

2012-06-25 Thread andre zege
On Mon, Jun 25, 2012 at 1:08 PM, Simon Urbanek simon.urba...@r-project.orgwrote: On Jun 25, 2012, at 11:57 AM, andre zege wrote: On Mon, Jun 25, 2012 at 11:17 AM, Simon Urbanek simon.urba...@r-project.org wrote: On Jun 25, 2012, at 10:20 AM, andre zege wrote: dput

[Rd] how to manipulate dput output format

2012-06-19 Thread andre zege
I am reading into Java dput output for a matrix, more specifically for a file backed big-matrix. I basically need to lift dimnames for a matrix from dput output. It's no big deal, but the code is very 'hackish' due to the need to get rid of quotes, endlines, parenthesis, etc. I was wondering if i

[Rd] looking for adice on bigmemory framework with C++ and java interoperability

2012-05-04 Thread andre zege
I work with problems that have rather large data requirements -- typically a bunch of multigig arrays. Given how generous R is with using memory, the only way for me to work with R has been to use bigmatrices from bigmemory package. One thing that is missing a bit is interoperability of

Re: [Rd] looking for adice on bigmemory framework with C++ and java interoperability

2012-05-04 Thread andre zege
bigmemory matrices are simply arrays of native types (typically doubles, but bm supports other types, too) so they are trivially readable/writable from both C++ (just read into memory and cast to the array type) and Java (e.g, DoubleBuffer view on a ByteBuffer). So the question is what

Re: [Rd] unexpectedly high memory use in R 2.14.0

2012-04-12 Thread andre zege
anymore/remove everything loaded rm(list=vars); } data - abind(mat.data, along=2); # Not needed anymore rm(mat.data); save(data, file.path(dump.dir, filename)) My $.02 /Henrik On Wed, Apr 11, 2012 at 3:53 PM, andre zege andre.z...@gmail.com wrote: I recently started using R 2.14.0

[Rd] unexpectedly high memory use in R 2.14.0

2012-04-11 Thread andre zege
I recently started using R 2.14.0 on a new machine and i am experiencing what seems like unusually greedy memory use. It happens all the time, but to give a specific example, let's say i run the following code for(j in 1:length(files)){ load(file.path(dump.dir, files[j]))

Re: [Rd] unexpectedly high memory use in R 2.14.0

2012-04-11 Thread andre zege
, at 00:53 , andre zege wrote: I recently started using R 2.14.0 on a new machine and i am experiencing what seems like unusually greedy memory use. It happens all the time, but to give a specific example, let's say i run the following code for(j in 1:length(files

[Rd] how to make a true binary package?

2011-10-11 Thread A Zege
I'd like to have a version of a package that doesn't include sources. I thought that this could be achieved by using binary option in R CMD build, but in fact it packages source code that could be easily printed once the library is loaded. Is there an option to avoid visibility of the source?

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

2011-10-11 Thread A Zege
OK, gentlemen, i agree with you in general. I was not talking about a general purpose, general use package that one prepares for CRAN. I am sure you are familiar professionally or can imagine situations where you need to demonstrate a solution to a specific task without fully disclosing the

[Rd] problem subsetting of a reference class

2011-04-21 Thread A Zege
I am trying to define subset operator for a reference class and hitting some problem i am unable to diagnose.To give an example, here is a toy class generator that is a wrapper around a list tmpGEN-setRefClass(TMP, fields=list( namelist=list ))

Re: [Rd] How to debug reference classes?

2011-04-08 Thread A Zege
Thank you very much, gentlemen. It seems reference classes will make my life much easier. I won't pretend that i fully understand the wizardry with environments that you do, but it works :). Namely the steps to mtrace a class method by doing what John and Mark outlined xx$edit-xx$edit

[Rd] How to debug reference classes?

2011-04-07 Thread A Zege
How do you debug methods of a reference class? I've been using mtrace, which is excellent, but i cannot figure out how to mtrace a reference class method. Maybe there is some other way to debug these, for example with ordinary trace? for now i am only able to use options(error=recover), which is

[Rd] S4 generic functions/methods vs enclosures

2011-04-06 Thread A Zege
Apologies for asking something that is probably very obvious, i just started with S4 classes and i guess i am not finding documentation that lays out the grammar rules and gives enough examples. I understand that main method of writing a member function is to write a generic function and

Re: [Rd] S4 generic functions/methods vs enclosures

2011-04-06 Thread A Zege
This looks awesome -- it is precisely what i wanted. I have started hacking with passing around environments to simulate behavior of classes i was after, but this is so much neater. Reference classes seem to do precisely what i wanted. Thank you very much. -- View this message in context:

[Rd] super basic questions about S4 classes

2011-04-05 Thread A Zege
Apologies for asking something that is probably super obvious, i just started with S4 classes and i guess i am not finding documentation that layout the grammar rules and give enough examples. Some questions i am having are these 1. I understand that main method of writing a member function is to

Re: [Rd] Newbie Rccp module question. Failed to initialize module pointer???

2011-03-03 Thread A Zege
Dirk, thanks for your reply. I posted my answer right away and went on vacation. My post was pending since then. Still cannot post, so I opened another profile -- maybe this time it gets through. To answer your questions, I run R-2.12.1 on 64 bit RedHat Linux on Xeon machine. What seems odd that

[Rd] Newbie Rccp module question. Failed to initialize module pointer???

2011-02-17 Thread Andre Zege
Hi all. I started looking at Rcpp, which looks pretty great, actually. At the moment just trying to compile a module to get a feel how it all works without fully understanding how all the pieces fit together. Basically, i took the first example from Rcpp modules vignette: fun.cpp

[Rd] libRblas.so: undefined reference to `xerbla_' ?

2011-01-22 Thread Andre Zege
Hi all, i am trying to compile a test, calling from C code R Lapack shared libraries. In particular, i am calling simple LAPACK driver dposv for solving linear equation system A*x=B with positive definite A. My code looks like the following in solve.c ==