[R] function to filter identical data.fames using less than () and greater than ()

2012-12-06 Thread Karl Brand
statement needed for each column to make filtering on it optional? etc Any one with the patience to show their working version of such a funciton would receive my undying Rdulation. With thanks in advance, Karl -- Karl Brand Dept of Cardiology and Dept of Bioinformatics Erasmus MC Dr

Re: [R] function to filter identical data.fames using less than () and greater than ()

2012-12-06 Thread Karl Brand
, a))) iA - if(is.na(A)) TRUE else f(A)(data$A) iB - if(is.na(B)) TRUE else f(B)(data$B) iC - if(is.na(C)) TRUE else f(C)(data$C) data[iA iB iC, ] } func(eg, 0, NA, NA) func(data=eg, A= 0, B= 1, C= 0) Hope this helps, Rui Barradas Em 06-12-2012 13:49, Karl Brand escreveu

Re: [R] function to filter identical data.fames using less than () and greater than ()

2012-12-06 Thread Karl Brand
#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --- Sent from my phone. Please excuse my brevity. Karl Brand k.br...@erasmusmc.nl wrote: Esteemed UseRs, I've got many biggish data frames

Re: [R] function to filter identical data.fames using less than () and greater than ()

2012-12-06 Thread Karl Brand
O.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --- Sent from my phone. Please excuse my brevity. Karl Brand k.br...@erasmusmc.nl wrote: Hi Jeff, Subset

Re: [R] how to deduplicate records, e.g. using melt() and cast()

2012-05-08 Thread Karl Brand
, fill=NA) Jan On 05/07/2012 12:30 PM, Karl Brand wrote: Dimitris, Petra, Thank you! aggregate() is my lesson for today, not melt() | cast() Really appreciate the super fast help, Karl On 07/05/12 12:09, Dimitris Rizopoulos wrote: you could try aggregate(), e.g., my.df - data.frame(pathway

[R] how to deduplicate records, e.g. using melt() and cast()

2012-05-07 Thread Karl Brand
), cond.one = c(0.5, 0.4, NA), cond.two = c(0.6, 0.9, 0.2), cond.three = c(NA, 0.1, NA)) wanted.df -- Karl Brand Dept of Cardiology and Dept of Bioinformatics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam T +31 (0)10 703 2460 |M +31 (0)642 777 268 |F

Re: [R] how to deduplicate records, e.g. using melt() and cast()

2012-05-07 Thread Karl Brand
it helps. Best, Dimitris On 5/7/2012 11:50 AM, Karl Brand wrote: Esteemed UseRs, This must be embarrassingly trivial to achieve with e.g., melt() and cast(): deduplicating records (pw.X in example) for a given set of responses (cond.Y in example). Hopefully the runnable example shows clearly

Re: [R] help updating package rJava (on ubuntu)

2012-02-20 Thread Karl Brand
simple steps you suggest. Also good to know that Java 1.7 can be used with the latest R (which is all i intend to install). Thanks again for the follow up, Karl On 02/20/2012 03:37 AM, Simon Urbanek wrote: On Feb 19, 2012, at 4:31 PM, Karl Brand wrote: Hi Hasan, Success. For myself and FWIW

Re: [R] help updating package rJava (on ubuntu)

2012-02-19 Thread Karl Brand
. But lacks enough explicit details for myself to be able use. A previous response indicated R javareconf -- this is the only configuration you should need. Let me know if you have further problems. -- Karl Brand Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam T +31 (0)10 704

[R] help updating package rJava (on ubuntu)

2012-02-18 Thread Karl Brand
base packages: [1] stats graphics grDevices utils datasets methods base -- Karl Brand Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam T +31 (0)10 704 3455 |F +31 (0)10 704 4743 |M +31 (0)642 777 268 __ R-help@r

Re: [R] help updating package rJava (on ubuntu)

2012-02-18 Thread Karl Brand
to be able use. Thanks again, also for any further suggestions, Karl On 02/18/2012 07:45 PM, Simon Urbanek wrote: On Feb 18, 2012, at 10:44 AM, Karl Brand wrote: Esteemed useRs and Devs, Attempts to update package:rJava to the latest version have failed. See my code and output below. Notably

Re: [R] How does one start R within Emacs/ESS with root privileges?

2011-09-09 Thread Karl Brand
R and install.packages. Then I quit R and su and continue with what I want. hope this helps. Spencer On 9/7/2011 5:11 AM, Karl Brand wrote: Cheers Paul. Its a very good point. Although i am curious how badly i can damage my R install by running as root. I always ran R in windows with admin

[R] How does one start R within Emacs/ESS with root privileges?

2011-09-07 Thread Karl Brand
on efficient package installation/maintenance using Emacs/ESS. TIA, karl -- Karl Brand k.br...@erasmusmc.nl Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam P +31 (0)10 704 3455 | F +31 (0)10 704 4743 | M +31 (0)642 777 268

Re: [R] How does one start R within Emacs/ESS with root privileges?

2011-09-07 Thread Karl Brand
On 2011-09-07 11:02, Paul Hiemstra wrote: On 09/07/2011 08:54 AM, Karl Brand wrote: Esteemed UseRs and DevelopeRs, Apologies if this question belongs else where, but it does concern R's package installation/maintenance. How does one start R within Emacs/ESS with root privileges? I tried without

Re: [R] X11 problem

2011-08-25 Thread Karl Brand
-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Karl Brand k.br...@erasmusmc.nl Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam P +31 (0)10 704 3455 | F +31 (0)10 704 4743 | M +31 (0)642 777 268

Re: [R] heatmap.2 - change column row locations; angle / rotate

2011-04-18 Thread Karl Brand
times the best way to get it just right is using more basic functions, which for heatmaps would be image(). See: https://www.stat.math.ethz.ch/pipermail/bioconductor/2010-August/034995.html hth, karl On 04/18/2011 10:38 AM, chakri2...@yahoo.co.in wrote: Dear Karl Brand, I am facing same

Re: [R] Venn Diagram corresponding to size in R

2011-03-09 Thread Karl Brand
://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. -- Karl Brand k.br...@erasmusmc.nl Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam P +31 (0

Re: [R] attempted merge() returns: cannot coerce type 'closure' to vector of type 'any'

2010-12-02 Thread Karl Brand
6:08 PM, William Dunlap wrote: Try by=rownames instead of by=rownames Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Karl Brand Sent: Wednesday, December 01, 2010 6

Re: [R] attempted merge() returns: cannot coerce type 'closure' to vector of type 'any'

2010-12-02 Thread Karl Brand
On 12/2/2010 11:36 AM, David Winsemius wrote: On Dec 2, 2010, at 5:22 AM, Karl Brand wrote: Cheers Bill. You got me halfway, since: temp - merge(x=x, y=y[,17, drop=FALSE], by=rownames, sort=FALSE) Error in fix.by(by.x, x) : 'by' must specify valid column(s) but, using row.names instead

Re: [R] attempted merge() returns: cannot coerce type 'closure' to vector of type 'any'

2010-12-02 Thread Karl Brand
On 12/2/2010 3:52 PM, David Winsemius wrote: On Dec 2, 2010, at 5:58 AM, Karl Brand wrote: On 12/2/2010 11:36 AM, David Winsemius wrote: On Dec 2, 2010, at 5:22 AM, Karl Brand wrote: Cheers Bill. Inserting earlier debris: I don't understand why i get this error message when

Re: [R] attempted merge() returns: cannot coerce type 'closure' to vector of type 'any'

2010-12-02 Thread Karl Brand
wdunlap tibco.com -Original Message- From: Karl Brand [mailto:k.br...@erasmusmc.nl] Sent: Thursday, December 02, 2010 2:22 AM To: William Dunlap Cc: r-help@r-project.org; Dimitris Rizopoulos Subject: Re: [R] attempted merge() returns: cannot coerce type 'closure' to vector of type 'any

[R] attempted merge() returns: cannot coerce type 'closure' to vector of type 'any'

2010-12-01 Thread Karl Brand
- cbind(x, y[match(rownames(x), rownames(y)),17]) All insights appreciated for this leaRner, cheers, Karl -- Karl Brand k.br...@erasmusmc.nl Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam P +31 (0)10 704 3211 | F +31 (0)10 704 4743 | M +31 (0)642 777 268

Re: [R] venneuler (java?) color palette 0 - 1

2010-10-11 Thread Karl Brand
., the 'h', 'c' and 'l' (and 'alpha' if appropriate) values for a given color/shade?? Thanks again and in advance for any further pointers, Karl On 10/10/2010 10:41 PM, Paul Murrell wrote: Hi On 11/10/2010 9:01 a.m., Karl Brand wrote: Dear UseRs and DevelopeRs It would be helpful to see

[R] venneuler (java?) color palette 0 - 1

2010-10-10 Thread Karl Brand
- venneuler(c(A=1, B=2, C=3, AC=0.5, ABC=0.1)) class(ve) [1] VennDiagram ve$colors - c(red, green, blue) plot(ve) Error in col * 360 : non-numeric argument to binary operator -- Karl Brand Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam T +31 (0)10 704 3457 |F +31 (0

Re: [R] venneuler() - customize a few things.

2010-10-08 Thread Karl Brand
/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. -- Karl Brand k.br...@erasmusmc.nl Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam P +31 (0)10 704 3409

[R] venneuler() - customize a few things.

2010-10-07 Thread Karl Brand
locations within the circles? and unions? -specify circle colors? -specify label font, size color? All thoughts and response's greatly appreciated, cheers, Karl -- Karl Brand k.br...@erasmusmc.nl Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam P +31 (0)10 704 3409 | F +31

[R] create a '3D line plot'

2010-09-12 Thread Karl Brand
to start for an image like this. I'd really appreciate suggestions help on how might achieve this using R, Karl -- Karl Brand Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam T +31 (0)10 704 3457 |F +31 (0)10 704 4743 |M +31 (0)642 777 268

Re: [R] create a '3D line plot'

2010-09-12 Thread Karl Brand
anything obvious for me...yet). Sincere thanks for help thus far, and welcome any further pointers, Karl On 9/12/2010 4:50 PM, Duncan Murdoch wrote: On 12/09/2010 10:12 AM, Karl Brand wrote: Esteemed useRs and developeRs, I need to create a '3D line plot' (proper name?) of which an excellent

[R] 'programatically' list or call objects for use in a function?

2010-09-11 Thread Karl Brand
and suggestions sincerely appreciated, Karl -- Karl Brand Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam T +31 (0)10 704 3457 |F +31 (0)10 704 4743 |M +31 (0)642 777 268 __ R-help@r-project.org mailing list https://stat.ethz.ch

Re: [R] 'programatically' list or call objects for use in a function?

2010-09-11 Thread Karl Brand
Cheers Duncan, for your FAST answers and patience. (fast patience?!) I was close. But closer reading of ?save would also have worked i see now :$. LETTERS[] = :) thanks again, Karl On 9/11/2010 2:10 PM, Duncan Murdoch wrote: On 11/09/2010 8:00 AM, Karl Brand wrote: Esteemed R users

Re: [R] how do I transform this to a for loop

2010-09-07 Thread Karl Brand
. -Original Message- From: Karl Brand [mailto:k.br...@erasmusmc.nl] Sent: Monday, 6 September 2010 6:46 PM To: Venables, Bill (CMIS, Cleveland) Cc: gaut...@yahoo.com; r-help@r-project.org Subject: Re: [R] how do I transform this to a for loop Hi Bill, I didn't make the original post, but its pretty

Re: [R] how do I transform this to a for loop

2010-09-06 Thread Karl Brand
(1,1,1)) arima9- arima(data.ts[40:240], order = c(1,1,1)) -- Karl Brand k.br...@erasmusmc.nl Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam P +31 (0)10 704 3409 | F +31 (0)10 704 4743 | M +31 (0)642 777 268 __ R-help@r-project.org

Re: [R] how do I transform this to a for loop

2010-09-06 Thread Karl Brand
)) result_list = lapply(sseq, function(num) { arima(data.ts[num:(num+200)], order=c(1,1,1)) }) cheers, Paul On 09/06/2010 10:46 AM, Karl Brand wrote: Hi Bill, I didn't make the original post, but its pretty similar to some thing i would have queried the list about. But, as an R dilatante i find

Re: [R] How to remove all objects except a few specified objects?

2010-08-24 Thread Karl Brand
(list=ls()) removes all R objects in the R work space. Another question is that whether removing all R objects actually releases the RAM? Thanks. -- Karl Brand k.br...@erasmusmc.nl Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam P +31 (0)10 704 3409 | F +31 (0)10 704 4743

Re: [R] how to set chart output size in rgl (surface3d)?

2010-08-20 Thread Karl Brand
functions? I think my PCA would certainly appear a lot more '3d' with such a shaded box axis. tia, Karl * http://tolstoy.newcastle.edu.au/R/e10/help/att-3419/vol_surface.png -- Karl Brand k.br...@erasmusmc.nl Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam P +31 (0)10 704

[R] heatmap.2() yielding an inappropriate key?

2010-07-19 Thread Karl Brand
, density.info = none, margins=c(12, 8)) -- Karl Brand k.br...@erasmusmc.nl Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam P +31 (0)10 704 3409 | F +31 (0)10 704 4743 | M +31 (0)642 777 268 __ R-help@r-project.org

Re: [R] heatmap.2() yielding an inappropriate key?

2010-07-19 Thread Karl Brand
:42 PM, Karl Brand wrote: Esteemed R-users, heatmap.2() is yielding an inappropriate key based on my colors and break-points. In the reproducible example below, the key is inappropriate (to me) because- 1. 'Orange' is simply not represented in the key, despite its prescence in the heatmap. 2

[R] heatmap.2 - change column row locations; angle / rotate

2010-07-18 Thread Karl Brand
suggestions or pointers to helpful resources greatly appreciated, Karl -- Karl Brand Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam T +31 (0)10 704 3457 |F +31 (0)10 704 4743 |M +31 (0)642 777 268 __ R-help@r-project.org

[R] Why the variation when creating .pdf file output for my plots?

2010-06-30 Thread Karl Brand
tools_2.10.1 -- Karl Brand k.br...@erasmusmc.nl Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam P +31 (0)10 704 3409 | F +31 (0)10 704 4743 | M +31 (0)642 777 268 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

Re: [R] Why the variation when creating .pdf file output for my plots?

2010-06-30 Thread Karl Brand
: There was an error opening this document. This file cannot be opened because it has no pages. -- Karl Brand k.br...@erasmusmc.nl Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam P +31 (0)10 704 3409 | F +31 (0)10 704 4743 | M +31 (0)642 777 268

Re: [R] several common sub-axes within multiple plot area

2010-06-28 Thread Karl Brand
), rnorm(20), xlab = Results 3 (Int), ylab = Variable C) par(mar=rep(0,4)) plot.new() text( .5, .5, Results 1 (Int), font=2, cex=1.5 ) plot.new() text( .5, .5, Results 2 (Int), font=2, cex=1.5 ) plot.new() text( .5, .5, Results 3 (Int), font=2, cex=1.5 ) -- Karl Brand

Re: [R] several common sub-axes within multiple plot area

2010-06-27 Thread Karl Brand
Jim, What a great function: exactly as i needed. I'm sure i'll be finding alot of use for the plotrix package. Sincere thanks for your fast help, cheers, Karl On 6/27/2010 8:52 AM, Jim Lemon wrote: On 06/26/2010 11:20 PM, Karl Brand wrote: Dear List, I'd really appreciate tip's or code

[R] several common sub-axes within multiple plot area

2010-06-26 Thread Karl Brand
), ylab = Variable B) #Graph 5: plot(rnorm(20), rnorm(20), xlab = Results 3 (Int), ylab = Variable C) #Graph 6: plot(rnorm(20), rnorm(20), xlab = Results 3 (Int), ylab = Variable C) -- Karl Brand Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam T +31 (0)10

Re: [R] using the design matrix to correctly configure contrasts

2010-06-04 Thread Karl Brand
something about the structure of the design, for example whether the effects (A and B, here) are treatments, blocks, nested effects, or repeated measures. Simple effects are usually interpretable. Interactions are tougher. Rich https://mail.google.com/a/temple.edu/?AuthEventSource=SSO#inbox -- Karl

Re: [R] using the design matrix to correctly configure contrasts

2010-06-02 Thread Karl Brand
a problem and then the resolution of the problem. install.packages(HH) ## if you don't have it yet. library(HH) ?MMC Rich -- Karl Brand k.br...@erasmusmc.nl Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam P +31 (0)10 704 3409 | F +31 (0)10 704 4743 | M +31 (0)642 777 268

[R] using the design matrix to correctly configure contrasts

2010-06-01 Thread Karl Brand
on the right track BUT! Most basically, the contrasts i can NOT work out are: t1.S.CvsAll.Times t1.L.CvsAll.Times ie., similar to t1.S.RvsAll.Times t1.S.RvsAll.Times above but for the C tissue, not the S. -- Karl Brand k.br...@erasmusmc.nl Department of Genetics Erasmus MC Dr Molewaterplein 50

[R] Multivariate hypergeometric distribution version of phyper()

2010-03-30 Thread Karl Brand
#'the answer' print(prK) [1] NaN a [1] 7.985852e+65 b [1] Inf z [1] Inf -- Karl Brand Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam T +31 (0)10 704 3457 | F +31 (0)10 704 4743 | M +31 (0)642 777 268 __ R-help@r-project.org

Re: [R] Multivariate hypergeometric distribution version of phyper()

2010-03-30 Thread Karl Brand
example. -Peter Ehlers On 2010-03-30 9:55, Charles C. Berry wrote: On Tue, 30 Mar 2010, Karl Brand wrote: Dear R Users, I employed the phyper() function to estimate the likelihood that the number of genes overlapping between 2 different lists of genes is due to chance. This appears to work