[R] Calculating Minimum Absolute Difference of Two Numeric Vectors

2020-08-18 Thread Dario Strbenac
example: x <- rpois(500, 100) y <- rpois(300, 30) Is there a much faster way than a nested for loop without resorting to Rcpp? -- Dario Strbenac University of Sydney Camperdown NSW 2050 Australia __ R-help@r-proje

[R] Stats reshape non-Longitudinal Example Correctness

2018-01-24 Thread Dario Strbenac
be appropriate. > sessionInfo() R Under development (unstable) (2018-01-07 r74096) Platform: x86_64-pc-linux-gnu (64-bit) Running under: Ubuntu 16.04.3 LTS ------ Dario Strbenac University of Sydney Camperdown NSW 2050 Australia _

[R] Find Crossover Points of Two Spline Functions

2015-09-28 Thread Dario Strbenac
s at which the densities cross ? ------ Dario Strbenac PhD Student University of Sydney Camperdown NSW 2050 Australia __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PL

Re: [R] by Function Result Factor Levels

2015-09-16 Thread Dario Strbenac
, Max = max(breaks))) wool tension x.Min x.Med x.Max 1A L255170 2B L142944 3A M122136 4B M162842 5A H102443 6B H131728 --

[R] by Function Result Factor Levels

2015-09-15 Thread Dario Strbenac
25.00 26.00 51.00 44.56 54.00 70.00 ... I'd like to obtain a data.frame of the two columns, wool and tension, specifying the level of each factor that corresponds to each element of result. -- Dario Strbenac PhD Student University of Sydney Camperdo

Re: [R] Vennerable Plots for Publications

2015-03-29 Thread Dario Strbenac
That is an adequate solution. It's always better if R package authors don't hard-code graphics parameters, though. __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the postin

[R] Vennerable Plots for Publications

2015-03-26 Thread Dario Strbenac
:6)) png("forPublication.png", units = "in", h = 2.55, w = 2.4, res = 300) # Changing pointsize to a smaller number has no effect on size of the text. plot(aVenn) dev.off() ------ Dario Strbenac PhD Student University of Sydney C

Re: [R] yaxs Causes Boundary Line Colour to Change

2014-08-25 Thread Dario Strbenac
Thanks for drawing my attention to the zero.line argument. I had only checked the help page for par. -- Dario Strbenac PhD Student University of Sydney Camperdown NSW 2050 Australia __ R-help@r-project.org mailing

[R] yaxs Causes Boundary Line Colour to Change

2014-08-25 Thread Dario Strbenac
lines on all four sides. The documentation doesn't say the colour will change. > sessionInfo() R version 3.1.1 (2014-07-10) Platform: x86_64-unknown-linux-gnu (64-bit) ------ Dario Strbenac PhD Student University of Sydney Camperdo

[R] Rmixmod Memory Leak

2014-07-31 Thread Dario Strbenac
Even though no data was assigned to any variables, even if I do gc() after the loop, 5 GB of RAM is used. This makes the software unusable in a loop, because the server freezes when it runs out of RAM. May someone who is an expert help me ? ------ Dario Strben

Re: [R] Vector of Numbers Not Output to Screen

2014-07-20 Thread Dario Strbenac
It's a plausible use-case. For example, in the example section of a help file. if(require(aPackage)) { # Do computations. # Show beginning of first result vector. # Show beginning of second result vector. } __ R-help@r-project.org mailing list http

Re: [R] Vector of Numbers Not Output to Screen

2014-07-17 Thread Dario Strbenac
The example in the question was not inside a user function. __ 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

[R] Vector of Numbers Not Output to Screen

2014-07-17 Thread Dario Strbenac
States.1252 LC_CTYPE=English_United States.1252 [3] LC_MONETARY=English_United States.1252 LC_NUMERIC=C [5] LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base ----

[R] Grouping on a Distance Matrix

2014-02-13 Thread Dario Strbenac
ecursively, but am hoping it's already been considered. -- Dario Strbenac PhD Student University of Sydney Camperdown NSW 2050 Australia __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

[R] Setting hetmap.2 Color Key Range Outside of Data Limits

2014-01-16 Thread Dario Strbenac
using R 3.02. -- Dario Strbenac PhD Student University of Sydney Camperdown NSW 2050 Australia __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://

[R] Tab Separated File Reading Error

2013-10-04 Thread Dario Strbenac
NTIFICATION=C attached base packages: [1] stats graphics grDevices utils datasets methods [7] base loaded via a namespace (and not attached): [1] tools_3.0.1 -- Dario Strbenac PhD Student University of Sydney Camperdown NSW 2050 Australia _

Re: [R] Declare BASH Array Using R System Function

2013-07-29 Thread Dario Strbenac
Thank you. This answers my question. I am using Linux, too. From: arun [smartpink...@yahoo.com] Sent: Monday, 29 July 2013 11:11 PM To: Dario Strbenac Cc: R help Subject: Re: [R] Declare BASH Array Using R System Function Hi, system("names=(X Y);

[R] Declare BASH Array Using R System Function

2013-07-28 Thread Dario Strbenac
tem("names=(X Y)") sh: Syntax error: "(" unexpected Reading the documentation for the system function, it appears to only be relevant for executing commands. What can I do instead to declare a BASH array ? Thanks. -- Dario Strbenac PhD Stude

[R] Assignment Operator in mclapply

2013-02-25 Thread Dario Strbenac
, function(x){extra[[x]] <<- x; x^2;}) > extra [[1]] [1] 1 [[2]] [1] 2 [[3]] [1] 3 [[4]] [1] 4 [[5]] [1] 5 [[6]] [1] 6 [[7]] [1] 7 [[8]] [1] 8 [[9]] [1] 9 [[10]] [1] 10 My question is like that of http://tolstoy.newcastle.edu.au/R/e6/help/09/03/8329.html which is not answered. --

[R] PAM Clustering Ignores Cluster Number Parameter

2011-05-17 Thread Dario Strbenac
table(cIDs) cIDs 0 16671 The matrix of observations can be found at : http://129.94.136.7/file_dump/dario/all.obj I'm using R version 2.13.0 (2011-04-13) on Platform: x86_64-unknown-linux-gnu (64-bit) and have cluster_1.13.3. ------ Dario Strbenac Re

Re: [R] gridBase Base Plot Positioning

2011-04-28 Thread Dario Strbenac
Thanks for this clarification. __ 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 cod

[R] gridBase Base Plot Positioning

2011-04-27 Thread Dario Strbenac
7;m using gridBase_0.4-3. Thanks, Dario. ------ Dario Strbenac Research Assistant Cancer Epigenetics Garvan Institute of Medical Research Darlinghurst NSW 2010 Australia __ R-help@r-project.org mailing list https://sta

[R] Sweave Executes Package Functions Twice

2011-04-15 Thread Dario Strbenac
entPlot(samples.list, 300) I have the current 2.13.0 version of R. I'm sure I've done something wrong, I just can't figure out what. Thanks for any help. -- Dario Strbenac Research Assistant Cancer Epigenetics Garvan Institute of Medical Research Darling

Re: [R] (no subject)

2011-02-01 Thread Dario Strbenac
>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] agnes clustering and NAs

2011-01-29 Thread Dario Strbenac
gt;>> on Fri, 28 Jan 2011 09:23:05 + writes: > >> On Fri, 2011-01-28 at 10:00 +1100, Dario Strbenac wrote: >>> Hello, >>> >>> Yes, that's right, it is a values matrix. Not a dissimilarity matrix. >>> >&g

Re: [R] sapply puzzlement

2011-01-27 Thread Dario Strbenac
nest > >__ >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.

[R] Adding image to plotting area

2011-01-27 Thread Dario Strbenac
Hello, I've drawn a black rectangle over the plotting area, and when I add an image() heatmap, it doesn't take up all the area, but is set inward from the black rectangle. Can anyone suggest how to make it stretch out to the entire area ? Minimal example : y <- matrix(runif(2000*20), nrow = 20

Re: [R] agnes clustering and NAs

2011-01-27 Thread Dario Strbenac
Ligges >Cc: d.strbe...@garvan.org.au, r-help@r-project.org > >On Thu, 2011-01-27 at 10:45 +0100, Uwe Ligges wrote: >> >> On 27.01.2011 05:00, Dario Strbenac wrote: >> > Hello, >> > >> > In the documentation for agnes in the package 'cluster'

[R] agnes clustering and NAs

2011-01-26 Thread Dario Strbenac
also tried getting rid of rows with all NAs in them, and it still gave me the same error. Is this a bug in agnes() ? It doesn't seem to fulfil the claim made by its documentation. The matrix I'm using can be obtained here : http://129.94.136.7/file_dump/dario/iMatrix.obj ---

[R] Nested layout()

2010-12-16 Thread Dario Strbenac
= c(1, 2)) myplot() myplot() ------ Dario Strbenac Research Assistant Cancer Epigenetics Garvan Institute of Medical Research Darlinghurst NSW 2010 Australia __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/

Re: [R] [Rd] S4 Method Rd Warning

2010-08-30 Thread Dario Strbenac
ncan Murdoch >Cc: d.strbe...@garvan.org.au > >On Mon, 30 Aug 2010, Duncan Murdoch wrote: > >> On 30/08/2010 1:00 AM, Dario Strbenac wrote: >>> Hello, >>> >>> I am using R 2.11.0. I have a curious problem where I get a warning in R >>> CMD check

[R] Documenting S4 Methods

2010-08-24 Thread Dario Strbenac
ifference. I haven't been able to find any good tutorials for the new S4 architecture (written post 2006), so I'm not sure where to start with S4. Thanks, Dario. -- Dario Strbenac Research Assistant Cancer Epigenetics Garvan Institute of Medical Research Darlinghurst NSW

[R] identical() mystery

2010-03-01 Thread Dario Strbenac
Hello, I have 2 vectors of the same mode and the same contents but I still get FALSE. Any ideas ? > reference <- c(11, 14, 16, 5, 4, 2, 0, 15, 9, 0) > reference [1] 11 14 16 5 4 2 0 15 9 0 > cpgDensity [1] 11 14 16 5 4 2 0 15 9 0 > identical(cpgDensity, reference) [1] FALSE > mode

[R] Flattening Graphics

2010-02-10 Thread Dario Strbenac
x27;t take a long time to load on a slow computer in Adobe Reader, without using external programs outside of R ? Thanks, Dario. ----- Dario Strbenac Research Assistant Cancer Epigenetics Garvan Institute of Medical Research Darlinghurs