Re: [Rd] Interactive Graphics in R [Was: Google Summer of Code 2009]

2009-02-19 Thread Oleg Sklyar
Simon, as promised I attach a simple package that utilises gtkdatabox. It is Linux only, sorry for that: as it was hacked together in the last two hours I did not have time for Windows stuff. Under my Ubuntu I only had to install libgtkdatabox-dev from standard repos (which would pull libgtk2-de

Re: [Rd] particulars of importing/loading libraries

2009-01-13 Thread Oleg Sklyar
tion this is what I probably will have to do, reexport everything. Dr Oleg Sklyar Research Technologist AHL / Man Investments Ltd +44 (0)20 7144 3107 oskl...@maninvestments.com -Original Message- From: Martin Morgan [mailto:mtmor...@fhcrc.org] Sent: 13 January 2009 16:31 To: Sklyar, Oleg (

Re: [Rd] Dates in C api

2008-09-17 Thread Oleg Sklyar
ED] NOTICE: If received in error, please destroy and notify sender. Sender does not intend to waive confidentiality or privilege. Use of this email is prohibited when received in error. ______ R-devel@r-pro

Re: [Rd] Rmpi segfault after install on Ubuntu Hardy Heron

2008-06-12 Thread Oleg Sklyar
ed an R-SIG-HPC list? Anyone besides me interested? I'd join. Dirk -- Three out of two people have difficulties with fractions. __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel -- D

Re: [Rd] S4 generic for lowess

2008-05-27 Thread Oleg Sklyar
ield Rd. Lowestoft NR33 0HT U.K. +44 (0)1502 558003 ______ 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 -- Dr Oleg Sklyar * EBI-EMBL, Cambridge CB10 1SD, UK * +44-1223-494466 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] help with segmentation fault

2008-05-04 Thread Oleg Sklyar
d I did not find any related errors in my codes. How could this happen and how can I fix it? Does this have to do with different systems (linux vs windows) or C/R program? Thank you in advance. -- Dr Oleg Sklyar * EBI-EMBL, Cambridge CB10 1SD, UK * +44-1223-494466

[Rd] texi2dvi instead of pdflatex in R2.7.0? and related bioc 2.2 builds

2008-05-03 Thread Oleg Sklyar
hanges to vignette have not been significant and the compilation goes through fine with 2.6.0. Or I am missing something and doing something wrong? Best, Oleg -- Dr Oleg Sklyar * EBI-EMBL, Cambridge CB10 1SD, UK * +44-1223-494466 __ R-devel

Re: [Rd] S4: what to put in initialize, validity and constructor?

2008-05-03 Thread Oleg Sklyar
validity should return a character in case of errors 2) default initializer usually does the job 3) define constructors as methods to allow different signatures and conversions from other classes 4) If you derive your class from numeric, rather than add slots, the performance will be much better

Re: [Rd] SEXP size management.

2008-03-05 Thread Oleg Sklyar
27;s, like in STL vectors etc and then move it to SEXP at the end. > > Thanks again, > Charles > > On Wed, Mar 5, 2008 at 11:14 AM, Oleg Sklyar <[EMAIL PROTECTED]> wrote: >> Rblah in your example is a SEXP structure. Realloc is an interface to C >> realloc an

Re: [Rd] SEXP size management.

2008-03-05 Thread Oleg Sklyar
; > PROTECT(Rblah = blah); > > UNPROTECT(1); > return(Rblah); > } > > Any suggestions for someone still new to SEXP memory management? > > Thanks, > Charles > > __

Re: [Rd] error loading library

2008-02-26 Thread Oleg Sklyar
would appreciate any help with this matter. > > Regards, > Vadim > > [[alternative HTML version deleted]] > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel -- Dr Oleg Sklyar * EBI-EMBL, Cambridge CB10 1SD, UK * +44-1223-494466 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Standard method for S4 object

2008-02-25 Thread Oleg Sklyar
s > [1] -0.5477293 -0.5624539 0.5551133 > > Another S3 class, basically any object plus a label attribute. > There are a few methods for this class, otherwise it works > out of the box. > > The third is "lm" - a list with an S3 class. Functions that > operate on lists work fine without extra methods. And you can > add extra components without needing to define a new class > (I've done this in library(resample)). -- Dr Oleg Sklyar * EBI-EMBL, Cambridge CB10 1SD, UK * +44-1223-494466 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Standard method for S4 object

2008-02-25 Thread Oleg Sklyar
More precisely, personally, I use 'print', 'summary' and 'plot' a lot. >> So for my new class, I define these 3 methods and of course, a get and a >> set for each slot. What else? Is there some other methods that a R user >> can reasonably expect?

Re: [Rd] S4 : declaration of inheritance

2008-02-25 Thread Oleg Sklyar
tion(x="numeric"), > containt="fatherClass" > > > Is there any difference ? What is the usal way ? > > Christophe > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/lis

Re: [Rd] assigning NULLs to elements of a list

2008-02-13 Thread Oleg Sklyar
<- list(a = 1, b = 2, c = 3) > > a$b <- NULL > > > On Feb 13, 2008 9:39 AM, Oleg Sklyar <[EMAIL PROTECTED]> wrote: >> Hmm, I think the pretty traditional R style does the job... >> >> a = list(1,2,3) >> a[-2] >> >> So I real

Re: [Rd] assigning NULLs to elements of a list

2008-02-13 Thread Oleg Sklyar
;> x <- list(a=c(1L,2L), b=matrix(runif(4),2,2), c=LETTERS[1:3]) >> x[2] <- list(NULL) >> >> is what I think you are intending. >> >> See e.g. the comment in subassign.c >> >> /* If "val" is NULL, this is an element deletion */ >

[Rd] assigning NULLs to elements of a list

2008-02-12 Thread Oleg Sklyar
when assigning a NULL in fact removed the element from the list. Is this an intended behaviour? If so, does anybody know where is it documented and what is a good way around? Thanks for help, Oleg Sklyar Here goes an example, the inline C-code does exactly what I would prefer R were doing, but

Re: [Rd] %s in filename when opening device causes crash (PR#10571)

2008-01-14 Thread Oleg Sklyar
a device causes R to crash, e.g., > > pdf("foo%s.pdf") > win.metafile("foo%s.wmf") > postscript("foo%s.ps") > > ______ > R-devel@r-project.org mailing list > https://st

Re: [Rd] S3 vs S4 for a simple package

2008-01-08 Thread Oleg Sklyar
> Would you like existing functions such as mean, range, sum, > colSums, dim, apply, length, and many more to operate on the array of > numbers? If so use an S3 class. The above is misleading as 'setClass("NewArray", [additional structures go in here], contains="array")' will give the NewArray a

Re: [Rd] S3 vs S4 for a simple package

2008-01-07 Thread Oleg Sklyar
t would be connected with the speed of method dispatch (although I would not argue that there are none). Regards, Oleg Dr Oleg Sklyar | EBI-EMBL, Cambridge CB10 1SD, UK | +44-1223-494466 John Chambers wrote: > Prof Brian Ripley wrote: >> On Mon, 7 Jan 2008, Robin Hankin wrote: >>

Re: [Rd] Finding windows DLLs

2008-01-07 Thread Oleg Sklyar
Should adding PREFIX/library/XML/libs to PATH before system32 solve the issue as Windows relies on PATH when searching for libs as well? Dr Oleg Sklyar | EBI-EMBL, Cambridge CB10 1SD, UK | +44-1223-494466 Martin Morgan wrote: > The XML package relies on libxml2.dll (e.g., bundled with the C

Re: [Rd] Installation of RGtk2 (PR#10519)

2007-12-17 Thread Oleg Sklyar
RGtk2' > > I've re-started R again and the same happened. I've also tried downloading > the > RGtk2 zip files from the CRAN website and installing from a local zip file > option which gave the same results. I haven't

Re: [Rd] help files for load and related functions

2007-12-17 Thread Oleg Sklyar
> definitely think that there should be a Side Effects section > in the help files of functions whose whole point is a side > effect. > > Patrick Burns > [EMAIL PROTECTED] > +44 (0)20 8525 0696 > http://www.burns-stat.com > (home of S Poetry and "A Guide for the U

Re: [Rd] S4 class extending data.frame?

2007-12-13 Thread Oleg Sklyar
ake sure > 'names' were removed from lists used to construct objects. As a > consequence I lose a nice little bit of sapply magic. > > > setClass('A', 'list') > [1] "A" > > setMethod('[', 'A', function(x, i, j, ...

Re: [Rd] S4 class extending data.frame?

2007-12-13 Thread Oleg Sklyar
too). > > cheers > Ben Bolker > > -----BEGIN PGP SIGNATURE- > Version: GnuPG v1.4.6 (GNU/Linux) > Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org > > iD8DBQFHYL1pc5UpGjwzenMRAqErAJ9jj1KgVVSGIf+DtK7Km/+JBaDu2QCaAkl/ > eMi+WCEWK6FPpVMpUbo+RBQ= > =huvz > -END PGP SIGNATURE- > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel -- Dr Oleg Sklyar * EBI-EMBL, Cambridge CB10 1SD, UK * +44-1223-494466 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] Building packages

2007-12-07 Thread Oleg Sklyar
package development and SVN I might > write it up for R-newsletter - there's a couple of other tricks I've had > to employ... What exactly? > > Barry > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/list

Re: [Rd] Returning vectors of two different data types back to R environment (from C).

2007-11-16 Thread Oleg Sklyar
SEXP x,y,res; PROTECT(res = allocVector(VECSXP, 2)); SET_VECTOR_ELT(res, 0, x = allocVector(REALSXP, 20)); SET_VECTOR_ELT(res, 1, y = allocVector(INTSXP, 10)); // code with x,y goes here UNPROTECT(1); return res; On Fri, 2007-11-16 at 15:49 -0500, Charles Danko wrote: > Hello, > > Quick questi

Re: [Rd] Nested SEXP functions

2007-11-15 Thread Oleg Sklyar
You assume that when you call any of those functions its arguments are protected (as it is the case when the function is called from within R). However, I do not see why they would be if you do not do it explicitly. Therefore, it is very likely that a result of one function, used in turn in a call

Re: [Rd] How to overload the assignment operator?

2007-11-13 Thread Oleg Sklyar
nth 10 > > day03 > > svn rev43063 > > language R > > version.string R version 2.6.0 (2007-10-03) > > > > -- > > > > __ > > 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 -- Dr Oleg Sklyar * EBI-EMBL, Cambridge CB10 1SD, UK * +44-1223-494466 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] append/concatenate an element to a list in C-language

2007-10-18 Thread Oleg Sklyar
Hi. I believe it is virtually impossible, maybe even not virtually: if you manage to do so somehow, please report it as a bug because such things must be impossible as they break the integrity of R and data. Forget about changing size in place: it is C and 'realloc' would be about the only way to

Re: [Rd] How to test if R is running on a Mac

2007-09-19 Thread Oleg Sklyar
; Hi! > > Is there any way to test if R is running on a Mac? I usually use > value of .Platform$OS.type for windows or unix, but Mac falls in the > latter group. > > Thanks, Gregor > > __ > R-devel@r-project.org mailing list &g

Re: [Rd] Call C code from R

2007-09-17 Thread Oleg Sklyar
in C++ from R. > My questions are: > 1. How should I include libraries (for example, iomanip, > sstream, iostream)? > 2. Can I use namespace? > > Thanks All :) > Olga > > __ > R-devel@r-project.org mailing list > http

Re: [Rd] Font problem (PR#9906)

2007-09-12 Thread Oleg Sklyar
S=C;LC_TELEPHONE=C;LC_MEASUREMENT=C;LC_IDENTIFICATION=C" > > Under kde it works fine. > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel -- Dr Oleg Sklyar * EBI-EMBL, Cambridge CB10 1SD, UK * +44-1223-494466 __

Re: [Rd] suggesting \alias* for Rd files (in particular for S4 method documentation)

2007-08-30 Thread Oleg Sklyar
as*, since no one is forced to use it. > > > > It also suggests that your documentation is organized by generic, > > which might also be a bit unusual -- I typically have an object (e.g., > > an Image) and wonder what can be done to it (e.g., write it to > >

[Rd] suggesting \alias* for Rd files (in particular for S4 method documentation)

2007-08-30 Thread Oleg Sklyar
cumentation and code/documentation mismatches. Best regards, Oleg -- Dr. Oleg Sklyar * EBI-EMBL, Cambridge CB10 1SD, UK * +44-1223-464466 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] R2.6 bug in arithmetics of S4 classes inherited from 'array', or intended behavior?

2007-07-28 Thread Oleg Sklyar
a1 = new("A1", array(1:8, rep(2,3)), flag = "test") > > a2 = new("A2", array(8:1, rep(2,3)), positive = rep(TRUE,8)) > > a1+a2 > , , 1 > > [,1] [,2] > [1,]99 > [2,]99 > > , , 2 > > [,1] [,2] > [1

Re: [Rd] CHAR(STRING_ELT( - OK but CHAR(asChar(STRING_ELT( - not, why?

2007-07-23 Thread Oleg Sklyar
efore using them. > > On Mon, 23 Jul 2007, Oleg Sklyar wrote: > > > Any idea why CHAR(asChar(STRING_ELT( produces NA whereas > > CHAR(STRING_ELT( gets a pointer to a string? It's generally expected > > that STRING_ELT should already be a character, > > I

[Rd] CHAR(STRING_ELT( - OK but CHAR(asChar(STRING_ELT( - not, why?

2007-07-23 Thread Oleg Sklyar
alue; " code2 <- " for (int i = 0; i < LENGTH(x); i++ ) Rprintf(\"%s\\n\", CHAR(asChar(STRING_ELT(x, i; return R_NilValue; " setCMethod(c("p1","p2"), list(sig,sig), list(code1,code2)) #---

Re: [Rd] R2.6 bug in arithmetics of S4 classes inherited from 'array', or intended behavior?

2007-07-23 Thread Oleg Sklyar
07-07-16 14:32:16 +0100 (Mon, 16 Jul 2007) | 1 line implicitGeneric() and structure class ---- -- Dr. Oleg Sklyar * EBI-EMBL, Cambridge CB10 1SD, UK * +441223494466 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] R2.6 bug in arithmetics of S4 classes inherited from 'array', or intended behavior?

2007-07-23 Thread Oleg Sklyar
*,/,-)? If yes, could someone point me to the following two things: what are the reasons behind and WHAT operators and functions have been affected -- I will need to redefine all those then. Moreover, it is not consistent: > class(a*2) [1] "Image" attr(,"package") [1] "EBIm

Re: [Rd] In creating a Windows binary package (zip), how do I make the installation configurable

2007-07-12 Thread Oleg Sklyar
uld I do it? > > If not, then are there an recommendations for a solution? > An alternative I can try is to have 2 separate packages, > 'fame' and 'fame-remote'. > > Thanks, > Rick Jones > > __ >

[Rd] 'inline' package supports Fortran, .C calls etc

2007-07-09 Thread Oleg Sklyar
e code in setCMethod on load, different calling conventions (.C, .Call, .Fortan) and allows to inline not only C, but also Fortran and ObjectiveC (needs testing) code, it performs clean up of all temp files created during compilation etc. Best, Oleg -- Dr Oleg Sklyar * EBI/EMBL, Cambridge CB10 1S

[Rd] 'inline' package update

2007-07-03 Thread Oleg Sklyar
used for compilation allowing for the use of the correct R version when several are installed The update has been submitted to CRAN and should appear shortly. Meanwhile, the package is available from http://www.ebi.ac.uk/~osklyar/inline Best, Oleg -- Dr Oleg Sklyar * EBI/EMBL, Cambridge CB1

[Rd] bug in R environments? Was: [BioC] 'recursive default argument' error...

2007-06-12 Thread Oleg Sklyar
kages: [1] "stats" "graphics" "grDevices" "utils" "datasets" "methods" [7] "base" other attached packages: rae230a "1.16.0" > On Jun 11, 2007, at 11:27 PM, Seth Falcon wrote: > "James

Re: [Rd] Use of Rf_duplicate

2007-05-29 Thread Oleg Sklyar
ion, rather than rely on on the R garbage > collector? Not that I know about. Best, Oleg -- Dr Oleg Sklyar | EBI-EMBL, Cambridge CB10 1SD, UK | +44-1223-494466 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] R scripts slowing down after repeated called to compiled code

2007-05-26 Thread Oleg Sklyar
nd to script this, dump the processed chunks as > Rdata files and later re-read the pieces. That works reliably. > > So one think you could try is to dump your data in 'gsl ready' format from R, > quit R, leave it out of the equation and then see if what happens if you do > th

[Rd] package: 'inline' to inline C or C++ code in R functions

2007-05-23 Thread Oleg Sklyar
cing a list of functions to evaluate them, > all compiled into one DLL. Simon Urbanek wrote: > I really like the idea! Except for the fact that it's forcing the use > of C++ which adds unnecessary overhead :P I'd like a configurable > extension [including .m] and the ability

Re: [Rd] inline C/C++ in R: question and suggestion

2007-05-23 Thread Oleg Sklyar
uot; implementation. Thanks, Oleg -- Dr Oleg Sklyar * EBI/EMBL, Cambridge CB10 1SD, England * +44-1223-494466 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] inline C/C++ in R: question and suggestion

2007-05-23 Thread Oleg Sklyar
> That is actually a (rare) case that can be completely vectorized: Thanks for the vectorization solution. > I really like the idea! Except for the fact that it's forcing the use of > C++ which adds unnecessary overhead :P I can make it optional. I was just thinking that C++ would be more general

[Rd] inline C/C++ in R: question and suggestion

2007-05-22 Thread Oleg Sklyar
t;- " rdata[x + y*nx] = data[x + y*nx] * exp(-d2/sigma2);" code[15] <- " }}" code[16] <- " UNPROTECT(nprotect);" code[17] <- " return res;" library(inline) funx <- cfunction(signature(a="array", s="numeric", centre=&q

Re: [Rd] Inherited S4 .Data prototype not assigned

2007-05-03 Thread Oleg Sklyar
} else > +prototype <- > +setDataPart(prototype, getDataPart(pri)) > dataPartDone <- TRUE > } > } &g

Re: [Rd] Writing a package in which files must be sourced in a specific order

2007-02-22 Thread Oleg Sklyar
: unable to load R code in package 'ggplot' > Error: package/namespace load failed for 'ggplot' > > Can anyone suggest how I could get around this? > > Regards, > > Hadley > > ______ > R-devel@r-projec

Re: [Rd] Problem with types on 64-bit

2007-02-22 Thread Oleg Sklyar
> TLB size : 1024 4K pages > clflush size : 64 > cache_alignment : 64 > address sizes : 40 bits physical, 48 bits virtual > power management: ts fid vid ttp > > __ > R-devel@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel -- Dr Oleg Sklyar | EBI-EMBL, Cambridge CB10 1SD, UK | +44-1223-494466 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] R unstable and crashes after executing .C

2007-02-21 Thread Oleg Sklyar
l if anyone could tell me what could be the problem with my > C function that makes R behave this way? > > > > Thank you very much in advance, and apologies for this long email. > > > > Xavier Solé. > > > > > > > [[alternative HTML version deleted]] > > > > ---

Re: [Rd] Wrong vector size reported by error message

2007-02-05 Thread Oleg Sklyar
1] "stats" "graphics" "grDevices" "utils" "datasets" "methods" [7] "base" -- Dr Oleg Sklyar | EBI-EMBL, Cambridge CB10 1SD, UK | +44-1223-494466 Herve Pages wrote: > Hi Oleg, > > Oleg Sklyar wrote: >> m

Re: [Rd] Wrong vector size reported by error message

2007-02-05 Thread Oleg Sklyar
"graphics" "grDevices" "utils" "datasets" "methods" [7] "base" > -- Dr Oleg Sklyar | EBI-EMBL, Cambridge CB10 1SD, UK | +44-1223-494466 [EMAIL PROTECTED] wrote: > Hi, > > On my system, I get the following error message

Re: [Rd] Speed of for loops

2007-01-30 Thread Oleg Sklyar
ronment on every single step. Where is the gain? Oleg -- Dr Oleg Sklyar | EBI-EMBL, Cambridge CB10 1SD, UK | +44-1223-494466 Byron Ellis wrote: > Actually, why not use a closure to store previous value(s)? > > In the simple case, which depends on x_i and y_{i-1} > > gen.it

[Rd] Step-by-step guide for using C/C++ in R; WAS: Speed of for loops

2007-01-30 Thread Oleg Sklyar
g Tamas K Papp wrote: > On Tue, Jan 30, 2007 at 12:15:29PM +, Oleg Sklyar wrote: > >> magnitude using c-functions for "complex" vector indexing operations. If >> you need instructions, I can send you a very nice "Step-by-step guide >> for using C/C++ in R&q

Re: [Rd] Speed of for loops

2007-01-30 Thread Oleg Sklyar
on it is easier to use a for loop. > Also I have seen 'rle' which I think may help me but am not sure as I have > only just come across it, any ideas? > > Many thanks > > Tom > > > -- Dr Oleg Sklyar * EBI/EMBL, Cambridge CB10 1SD, England * +44-1223-494466 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Re: [Rd] "[" operator and indexing ambiguity

2007-01-27 Thread Oleg Sklyar
short etc etc. Here the power of R in freestyle indexing of arrays becomes a pain. -- Dr Oleg Sklyar | EBI-EMBL, Cambridge CB10 1SD, UK | +44-1223-494466 __ R-devel@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

[Rd] C/C++ namespaces

2005-07-01 Thread Oleg Sklyar
ole R includes into a unique namespace? It wouldn't require any modifications in the existing libraries because if the code is not conflicting, namespace can be omitted. Does it have sense? Regards Oleg Sklyar -- Dr Oleg Sklyar European Bioinformatics Institute Wellcome Trust Genome Camp