Re: [R] developing package: dealing with namespaces

2013-02-06 Thread Vitalie Spinu
>> Duncan Murdoch >> on Mon, 04 Feb 2013 13:23:57 -0500 wrote: DM> On 04/02/2013 12:59 PM, Ross Boylan wrote: >> I am tweaking an R package for which I have the source; the relevant code >> is in R not C. I'm making changes to the package code. >> >> What is the best workflow for

Re: [R] Modern Symbolic debugger for R programmes?

2012-10-09 Thread Vitalie Spinu
>> Worik R >> on Tue, 9 Oct 2012 17:12:51 +1300 wrote: WR> I cannot make setBreakpoint or findLineNum work. I get "No source WR> refs found.". I am starting to loose my mind! Indeed, as Rainer suggested, check out ESS. The ess-tracebug (part of ESS) provides, among other things, sourc

Re: [R] Find all numbers in a certain interval

2008-12-17 Thread Vitalie Spinu
Hi, If you can formulate your question it in terms of actual problem you have with data.frame it would be easier to answer. for the time being check subset() if it is what you want. SV. On Tue, 16 Dec 2008 11:09:19 +0100, Antje wrote: Hi all, I'd like to know, if I can solve this with a sho

Re: [R] Check if data frame column is numeric

2008-12-17 Thread Vitalie Spinu
On Tue, 16 Dec 2008 16:25:07 +0100, Mark Heckmann wrote: Hi R-users, I want to apply a function to each column of a data frame that is numeric. colwise(), numcolwise() and catcolwise() in plyr package turn a function that operates on vectors into one that operates on columns of data fra

Re: [R] R2winbugs : vectorization

2008-12-16 Thread Vitalie Spinu
I remember having similar problem with inprod function. As far as I could remember a sole deference in my models was that I used inprod instead of explicit sum (exactly as you did). In my case the inprod version was faster but result were completely aberrant. So I abandoned the inprod as unreli

Re: [R] The end of Matlab

2008-12-12 Thread Vitalie Spinu
On Fri, 12 Dec 2008 18:27:02 +0100, hadley wickham wrote: or may be just mtcars[cyl>3&last(20)] or this is already too far? This would be a considerable extension because then the selector would need to know about all other variables in the dataset, and you'd need someway of combining selec

Re: [R] Make installed packages available to new R version

2008-12-12 Thread Vitalie Spinu
Have a look at this http://thread.gmane.org/gmane.comp.lang.r.general/87014/focus=133050 it is safer to have all you packages reinstalled once you have updated R. HTH. On Fri, 12 Dec 2008 18:47:33 +0100, Roy Robertson wrote: After installing a new version of R, how do I make the packages th

Re: [R] The end of Matlab

2008-12-12 Thread Vitalie Spinu
On Fri, 12 Dec 2008 17:38:13 +0100, hadley wickham wrote: You could also imagine similar iterators for random sampling, like samp(0.2) to choose 20% of the indices, or boot(0.8) to choose 80% with replacement. first(n) could also be useful, selecting the first min(n, length(vector)) observatio

Re: [R] ref card for data manipulation?

2008-12-12 Thread Vitalie Spinu
On Fri, 12 Dec 2008 12:43:17 +0100, Liviu Andronic wrote: I'm not sure whether this can (partially) fill the gap, but Quick-R [1] has a decent overview of data manipulation, and is essentially a reference card. The maintainer of the Web site is open to improvements, so it might make sense to

Re: [R] ref card for data manipulation?

2008-12-11 Thread Vitalie Spinu
On Thu, 11 Dec 2008 15:19:03 +0100, hadley wickham <[EMAIL PROTECTED]> wrote: You (as many before you) have overlooked the ave() function, which can replace the ordering as well the do.call(c,tapply()) Majority of questions on this list concern data manipulation. Many are repetitive. "Ove

Re: [R] ref card for data manipulation?

2008-12-11 Thread Vitalie Spinu
__ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] ref card for data manipulation?

2008-12-11 Thread Vitalie Spinu
On Wed, 10 Dec 2008 18:29:43 +0100, Peter Dalgaard <[EMAIL PROTECTED]> wrote: You (as many before you) have overlooked the ave() function, which can replace the ordering as well the do.call(c,tapply()) Majority of questions on this list concern data manipulation. Many are repetitive. "O

Re: [R] Bug in "transform"?

2008-12-03 Thread Vitalie Spinu
Many thanks for your kind responses. That's a simple change and will make transform.data.frame behave more consistently with cbind.data.frame and data.frame. Related to above, I find rather inconsistent following behavior: aq <- airquality[sample(1:153,6),] data.frame(aq, list(a=1,b=

Re: [R] Bug in "transform"?

2008-12-02 Thread Vitalie Spinu
On Tue, 02 Dec 2008 17:37:44 +0100, Prof Brian Ripley <[EMAIL PROTECTED]> wrote: As the help page says If some of the values are not vectors of the appropriate length, you deserve whatever you get! So you can use mtcars1 <- mtcars mtcars1[c("t1", "t2")] <- cbind(rep(3,32), rep(4

[R] Bug in "transform"?

2008-12-02 Thread Vitalie Spinu
Dear useRs, Here is a weird behavior of transform function: mtcars1<-matcars transform(mtcars1,t1=3,t2=4) Error in data.frame(`_data`, e[!matched]) : arguments imply differing number of rows: 32, 1 instead, this works: mtcars1$t1<-0 transform(mtcars1,t1=3,t2=4) also works if applied

[R] Non-interactive passing of quoted variables (ggplot, plyr, subset, transform, etc)

2008-12-01 Thread Vitalie Spinu
Hello Everyone, May be a silly question. How to pass programmatically variables which are not known in advance and are quoted? Variables are quoted implicitly in functions like "subset" and "transform" and explicitly in ggplot and plyr. For instance I would like to have something like this

Re: [R] Examples of advanced data visualization

2008-12-01 Thread Vitalie Spinu
Hi, I find this interesting: http://blog.thejit.org/javascript-information-visualization-toolkit-jit/ It would be nice to have R exporting graphs into these kind of things. Vitalie. On Fri, 28 Nov 2008 16:55:12 +0100, Hans W. Borchers <[EMAIL PROTECTED]> wrote: Dear R-help, I am looking f

Re: [R] Splitting device for ggplots?

2008-11-03 Thread Vitalie Spinu
Thanks Baptiste and Hadley, That viewports mechanism is indeed extremely versatile when it comes to publication or designing new plot functions. But for interactive analysis all these "pushing" and "popping" is just a way too much code - for each plot at least two additional grid functions,

[R] Splitting device for ggplots?

2008-11-01 Thread Vitalie Spinu
Dear UseRs, For various reasons I need to plot multiple ggplots on one device (preferably pdf). Is there a way to achieve that? par(mfrow), split.screen() and layout() seem not to do the job. Thanks, Vitalie. __ R-help@r-project.org mailing list ht

[R] Lattice: reasons for not passing subscripted "col", "pch", "lty", "fill" to panel functions

2008-07-03 Thread Vitalie Spinu
Dear UseRs! I am really amazed by lattice capabilities but one thing is really beyond my understanding. I would like to have conditional plots with points inside each panel colored by groups "gr1" and "pched" by "gr2": xyplot(A~B|C,myD,col=gr1,pch=gr2) #this makes sense for me But this doe