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

2012-12-06 Thread Karl Brand
asics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/BatteriesO.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --

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 wrote: Esteemed UseRs, I've got many biggish data frames which need a lot subs

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

2012-12-06 Thread Karl Brand
; 1", C="> 0") Hope this helps, Rui Barradas Em 06-12-2012 13:49, Karl Brand escreveu: Esteemed UseRs, I've got many biggish data frames which need a lot subsetting, like in this example: # example eg <- data.frame(A = rnorm(10), B = rnorm(10), C = rnorm(10), D = rn

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

2012-12-06 Thread Karl Brand
quot; and "greater than" so google picks up this thread Once again i find just how limited my grasp of R is...Is do.call() the best way to call binary operators like < & > in a function? Is an ifelse statement needed for each column to make filtering on it optional? etc A

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

2012-05-08 Thread Karl Brand
hway~variable, sum, 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

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

2012-05-07 Thread Karl Brand
gregate(my.df[-1], my.df['pathway'], sum.) I hope 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 resp

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

2012-05-07 Thread Karl Brand
df ## The data fram i want: wanted.df <- data.frame(pathway = c("pw.A", "pw.B", "pw.C"), 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

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

2012-02-20 Thread Karl Brand
he couple 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 a

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

2012-02-19 Thread Karl Brand
l r-cran-rjava did NOT enable me to update my rJava. Unless i buggered up something else along the way :/ On 02/18/2012 10:20 PM, Hasan Diwan wrote: On 18 February 2012 13:13, Karl Brand wrote: Thanks for yout fast response. Thing is - i managed to get Version 0.9-1 installed and fully

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

2012-02-18 Thread Karl Brand
licit details for myself 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 co

[R] help updating package rJava (on ubuntu)

2012-02-18 Thread Karl Brand
LC_TELEPHONE=C [11] LC_MEASUREMENT=en_US.UTF-8 LC_IDENTIFICATION=C attached 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

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

2011-09-09 Thread Karl Brand
x, I use "su" not "sudo". Then I call 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

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

2011-09-07 Thread Karl Brand
.ch Karl 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 privileg

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

2011-09-07 Thread Karl Brand
ers. If so i'd really appreciate tips on efficient package installation/maintenance using Emacs/ESS. TIA, karl -- Karl Brand 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] X11 problem

2011-08-25 Thread Karl Brand
ead the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Karl Brand 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
nted out to me that some 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

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

2011-03-09 Thread Karl Brand
-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. -- Karl Brand Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam

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

2010-12-02 Thread Karl Brand
ficulties using them. Bill Dunlap Spotfire, TIBCO Software 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() retur

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

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

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

2010-12-02 Thread Karl Brand
frames have, right? Although the output of merge() is a data frame... thanks again, Karl On 12/1/2010 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-he

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

2010-12-01 Thread Karl Brand
the normal way here? I'm forced to add the column using: temp.b <- cbind(x, y[match(rownames(x), rownames(y)),17]) All insights appreciated for this leaRner, cheers, Karl -- Karl Brand Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam P

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

2010-10-11 Thread Karl Brand
in the hcl() call needed to produce a given palette? ie., 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

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

2010-10-10 Thread Karl Brand
Karl library(venneuler) ve <- venneuler(c("A"=1, "B"=2, "C"=3, "A&C"=0.5, "A&B&C"=0.1)) class(ve) [1] "VennDiagram" ve$colors <- c("red", "green", "blue") plot(ve) Error in col * 360 :

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

2010-10-08 Thread Karl Brand
Cheers Ista, I thought 'labels' and 'colors' must have been accessible some how. Thank you very much for showing how to access them, Karl On 10/7/2010 7:26 PM, Ista Zahn wrote: Hi Kari, On Thu, Oct 7, 2010 at 12:05 PM, Karl Brand wrote: Esteemed UseRs and DevelopeRs,

[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 Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam P +31 (0)10 704 3409 | F +31 (0)10 704

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

2010-09-12 Thread Karl Brand
dnt return 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?) o

[R] create a '3D line plot'

2010-09-12 Thread Karl Brand
a where 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

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 and

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

2010-09-11 Thread Karl Brand
t;) Both failed. #** And while i've got your attention- is there a 'letter equivalent' to seq() which would have worked nicely for prfxs? ie., letter.seq(A:F) Thoughts and suggestions sincerely appreciated, Karl -- Karl Brand Department of Genetics Erasmus MC Dr Molewaterpl

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

2010-09-07 Thread Karl Brand
a for() loop the way I suggested. Just a comment, of course. Bill Venables. -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

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

2010-09-06 Thread Karl Brand
c(1, seq(5, 40, by = 5)) 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. B

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

2010-09-06 Thread Karl Brand
rima(data.ts[30:230], order = c(1,1,1)) arima8<- arima(data.ts[35:235], order = c(1,1,1)) arima9<- arima(data.ts[40:240], order = c(1,1,1)) -- Karl Brand 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 7

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

2010-08-24 Thread Karl Brand
d ones? rm(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 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

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

2010-08-20 Thread Karl Brand
evant 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 Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam P +31 (0)10 704

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

2010-07-19 Thread Karl Brand
am = "none", density.info = "none", margins=c(12, 8)) On 7/19/2010 12: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 inappr

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

2010-07-19 Thread Karl Brand
race = "none", dendrogram = "none", density.info = "none", margins=c(12, 8)) -- Karl Brand 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] heatmap.2 - change column & row locations; angle / rotate

2010-07-18 Thread Karl Brand
.wise from default)? Any 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-

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

2010-06-30 Thread Karl Brand
the following error when attempting to open with Adobe acrobat: "There was an error opening this document. This file cannot be opened because it has no pages." -- Karl Brand Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rott

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

2010-06-30 Thread Karl Brand
2.1 grid_2.10.1 [4] gtools_2.6.1 lattice_0.17-26 preprocessCore_1.8.0 [7] svMisc_0.9-56tools_2.10.1 -- Karl Brand 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
sults 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 Department of Genetics Erasmus MC Dr Molewaterplein 50 3015 GE Rotterdam T +31 (0)10 704 3457

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 appreciat

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

2010-06-26 Thread Karl Brand
orm(20), rnorm(20), xlab = "Results 2 (Int)", ylab = "Variable B") #Graph 4: plot(rnorm(20), rnorm(20), xlab = "Results 2 (Int)", ylab = "Variable B") #Graph 5: plot(rnorm(20), rnorm(20), xlab = "Results 3 (Int)",

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

2010-06-04 Thread Karl Brand
ot; [59] "Time11:PperiodS" "Time12:PperiodS" [61] "Time13:PperiodS" "Time14:PperiodS" [63] "Time15:PperiodS" "Time16:PperiodS" [65] "TissueC:PperiodL" "TissueC:PperiodS" On 6/2/2010 8:26 PM, RICHARD M. HEIBERGER wr

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

2010-06-02 Thread Karl Brand
he HH package. > Follow the example all the way to the end. It illustrates 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 Department of Genetics Erasmus MC Dr Molewa

[R] using the design matrix to correctly configure contrasts

2010-06-01 Thread Karl Brand
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0), t1.E.RvsAll.E.R.Times = c( 0, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 0, 0, 0, 0, 0, 0, 0, 0,

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

2010-03-30 Thread Karl Brand
oose() function which does work for your 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 gene

[R] Multivariate hypergeometric distribution version of phyper()

2010-03-30 Thread Karl Brand
ial' balls DRAWN a <- choose(m,k) b <- choose((N-m),(n-k)) z <- choose(N,n) prK <- (a*b)/z #'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