[R] Plotting dendrogram upside-down/mirrored

2011-01-18 Thread Nathan S. Watson-Haigh
is on the bottom and leaves at the top (in horizontal orientation) or root on the right and leaves to the left (in vertical orientation)? Cheers, Nathan -- -- Dr. Nathan S. Watson-Haigh Tel: +61 (0)7 4753 8548 OCE Postdoctoral

[R] Intersect, Union of date/time ranges

2010-03-17 Thread Nathan S. Watson-Haigh
. return the start/end date/time ranges which are in 1 or both sets Is there anything that is currently able to do this? If not, I'll start to code something. Kind regards, Nathan -- Dr. Nathan S. Watson-Haigh OCE Post Doctoral Fellow CSIRO

[R] Superimpose ksmooth() onto barplot

2010-02-09 Thread Nathan S. Watson-Haigh
(rownames(d))), blue)) Cheers, Nathan -- Dr. Nathan S. Watson-Haigh OCE Post Doctoral Fellow CSIRO Livestock Industries University Drive Townsville, QLD 4810 Australia Tel: +61 (0)7 4753 8548 Fax: +61 (0)7 4753 8600 Web: http://www.csiro.au

Re: [R] Help with apply()

2010-02-08 Thread Nathan S. Watson-Haigh
On 8/02/2010 2:08 PM, David Winsemius wrote: On Feb 7, 2010, at 8:26 PM, Nathan S. Watson-Haigh wrote: I have a 2 column data.frame: d[1:5,] a b 180015 C 280016 B 380023 C 480062 B 580069 B I want to apply a function across each

Re: [R] Help with apply()

2010-02-08 Thread Nathan S. Watson-Haigh
On 8/02/2010 4:33 PM, Jim Lemon wrote: On 02/08/2010 12:26 PM, Nathan S. Watson-Haigh wrote: I have a 2 column data.frame: d[1:5,] a b 1 80015 C 2 80016 B 3 80023 C 4 80062 B 5 80069 B I want to apply a function across each row: for(i in 1:nrow(d)) { + myFun(con, d[i,]$a, d[i

[R] Help with apply()

2010-02-07 Thread Nathan S. Watson-Haigh
apply() to pass data from columns a and b for a given row as arguments to the function myFun(). Thanks in advance for any pointers, Nathan -- Dr. Nathan S. Watson-Haigh OCE Post Doctoral Fellow CSIRO Livestock Industries University Drive

[R] RMySQL - Bulk loading data and creating FK links

2010-01-27 Thread Nathan S. Watson-Haigh
-- Dr. Nathan S. Watson-Haigh OCE Post Doctoral Fellow CSIRO Livestock Industries University Drive Townsville, QLD 4810 Australia Tel: +61 (0)7 4753 8548 Fax: +61 (0)7 4753 8600 Web: http://www.csiro.au/people/Nathan.Watson-Haigh.html

[R] Bulk Match/Replace

2010-01-26 Thread Nathan S. Watson-Haigh
simply substitute the values in vector v with the corresponding id value from lookup table df? I'd expect the following output: v [1] 1 2 2 4 2 4 2 2 4 2 1 2 2 1 2 2 1 2 2 Cheers, Nathan -- Dr. Nathan S

Re: [R] Bulk Match/Replace

2010-01-26 Thread Nathan S. Watson-Haigh
I knew it should be simple . but only if you know how!! Thanks, works a treat!! Nathan Dr. Nathan S. Watson-Haigh OCE Post Doctoral Fellow CSIRO Livestock Industries University Drive Townsville, QLD 4810 Australia Tel: +61 (0)7 4753

[R] RMySQL Append data.frame to table

2010-01-24 Thread Nathan S. Watson-Haigh
on this error, or how I might bulk load this data using RMySQL? Cheers, Nathan -- Dr. Nathan S. Watson-Haigh OCE Post Doctoral Fellow CSIRO Livestock Industries University Drive Townsville, QLD 4810 Australia Tel: +61 (0)7 4753 8548 Fax: +61 (0

[R] decompress tar.gz and zip files

2010-01-12 Thread Nathan S. Watson-Haigh
Can anyone point me in the right direction for decompressing text files that are compressed as tar.gz or zip files? Cheers, Nathan -- Dr. Nathan S. Watson-Haigh OCE Post Doctoral Fellow CSIRO Livestock Industries University Drive

Re: [R] Converting indices of a matrix subset

2009-07-09 Thread Nathan S. Watson-Haigh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Steven, This looks great. Thanks! Nathan Steve Lianoglou wrote: Hi Nathan, On Jul 8, 2009, at 10:20 PM, Nathan S. Watson-Haigh wrote: I have two matrices: m1 - matrix(1,4,4) m1 [,1] [,2] [,3] [,4] [1,]1111 [2

[R] Converting indices of a matrix subset

2009-07-08 Thread Nathan S. Watson-Haigh
eventually want to be able to do things like: m1[-c(ind2)] - 0 m1 [,1] [,2] [,3] [,4] [1,]0000 [2,]0100 [3,]0010 [4,]0001 Any thoughts? Cheers, Nathan - -- - Dr. Nathan S

[R] Coerce rectangular matrix to symmetrical square matrix

2009-06-17 Thread Nathan S. Watson-Haigh
11 12 Would be coerced to: A B C D E F A 1 2 3 4 5 9 B 2 0 0 0 6 10 C 3 0 0 0 7 11 D 4 0 0 0 8 12 E 5 6 7 8 0 0 F 9 10 11 12 0 0 Any thoughts on how to achieve this? Cheers, Nathan - -- - Dr. Nathan S

[R] Identifying clusters of size n

2009-06-14 Thread Nathan S. Watson-Haigh
. Nathan S. Watson-Haigh OCE Post Doctoral Fellow CSIRO Livestock Industries Queensland Bioscience Precinct St Lucia, QLD 4067 Australia Tel: +61 (0)7 3214 2922 Fax: +61 (0)7 3214 2900 Web: http://www.csiro.au/people/Nathan.Watson-Haigh.html

Re: [R] Identifying clusters of size n

2009-06-14 Thread Nathan S. Watson-Haigh
points within a cluster should be using some measure. Any thoughts? Nathan - -- - Dr. Nathan S. Watson-Haigh OCE Post Doctoral Fellow CSIRO Livestock Industries Queensland Bioscience Precinct St Lucia, QLD 4067 Australia Tel: +61 (0)7 3214

[R] Package Licences

2009-05-29 Thread Nathan S. Watson-Haigh
Are there any particular licences under which R packages must be released or is it the discretion of the author? The same question if the package is to be destined for CRAN? Kind regards, Nathan -- Dr. Nathan S. Watson-Haigh OCE Post

Re: [R] Splitting Area under curve into equal portions

2009-03-26 Thread Nathan S. Watson-Haigh
-contained, reproducible code. - -- - Dr. Nathan S. Watson-Haigh OCE Post Doctoral Fellow CSIRO Livestock Industries Queensland Bioscience Precinct St Lucia, QLD 4067 Australia Tel: +61 (0)7 3214 2922 Fax: +61 (0)7 3214 2900 Web: http

[R] Splitting Area under curve into equal portions

2009-03-25 Thread Nathan S. Watson-Haigh
. Nathan S. Watson-Haigh OCE Post Doctoral Fellow CSIRO Livestock Industries Queensland Bioscience Precinct St Lucia, QLD 4067 Australia Tel: +61 (0)7 3214 2922 Fax: +61 (0)7 3214 2900 Web: http://www.csiro.au/people/Nathan.Watson-Haigh.html

[R] Rmpi - send/receive multiple objects to slaves

2009-03-24 Thread Nathan S. Watson-Haigh
) { # A slave has closed down. closed_slaves - closed_slaves + 1 } } mpi.close.Rslaves() /code - -- - Dr. Nathan S. Watson-Haigh OCE Post Doctoral Fellow CSIRO Livestock Industries Queensland Bioscience Precinct St Lucia

[R] Create package with Fortran 90 and C code

2009-02-16 Thread Nathan S. Watson-Haigh
this? Cheers, Nathan - -- - Dr. Nathan S. Watson-Haigh OCE Post Doctoral Fellow CSIRO Livestock Industries Queensland Bioscience Precinct St Lucia, QLD 4067 Australia Tel: +61 (0)7 3214 2922 Fax: +61 (0)7 3214 2900 Web: http://www.csiro.au/people

Re: [R] Looping over a matrix passed to .C

2009-02-11 Thread Nathan S. Watson-Haigh
. - -- - Dr. Nathan S. Watson-Haigh OCE Post Doctoral Fellow CSIRO Livestock Industries Queensland Bioscience Precinct St Lucia, QLD 4067 Australia Tel: +61 (0)7 3214 2922 Fax: +61 (0)7 3214 2900 Web: http://www.csiro.au/people/Nathan.Watson-Haigh.html

[R] Looping over a matrix passed to .C

2009-02-10 Thread Nathan S. Watson-Haigh
- -- - Dr. Nathan S. Watson-Haigh OCE Post Doctoral Fellow CSIRO Livestock Industries Queensland Bioscience Precinct St Lucia, QLD 4067 Australia Tel: +61 (0)7 3214 2922 Fax: +61 (0)7 3214 2900 Web: http://www.csiro.au/people/Nathan.Watson-Haigh.html

[R] pairs() help - colour histograms on diagonal

2009-02-02 Thread Nathan S. Watson-Haigh
, diag.panel=panel.hist) So I'd like the top-left histogram on the diagonal to be coloured black, then the next one on the diagonal to be coloured blue etc. Is this possible? Cheers, Nathan - -- - Dr. Nathan S. Watson-Haigh OCE Post Doctoral

[R] R package tests

2009-01-14 Thread Nathan S. Watson-Haigh
. Are these approaches used for testing packages in CRAN? Cheers, Nathan - -- - Dr. Nathan S. Watson-Haigh OCE Post Doctoral Fellow CSIRO Livestock Industries Queensland Bioscience Precinct St Lucia, QLD 4067 Australia Tel: +61 (0)7 3214 2922 Fax: +61

Re: [R] Precision in R

2009-01-14 Thread Nathan S. Watson-Haigh
-contained, reproducible code. - -- - Dr. Nathan S. Watson-Haigh OCE Post Doctoral Fellow CSIRO Livestock Industries Queensland Bioscience Precinct St Lucia, QLD 4067 Australia Tel: +61 (0)7 3214 2922 Fax: +61 (0)7 3214 2900 Web: http

[R] fitting curve to data

2009-01-11 Thread Nathan S. Watson-Haigh
- -- - Dr. Nathan S. Watson-Haigh OCE Post Doctoral Fellow CSIRO Livestock Industries Queensland Bioscience Precinct St Lucia, QLD 4067 Australia Tel: +61 (0)7 3214 2922 Fax: +61 (0)7 3214 2900 Web: http://www.csiro.au/people/Nathan.Watson-Haigh.html

Re: [R] fitting curve to data

2009-01-11 Thread Nathan S. Watson-Haigh
) lines(x, predict(lm(y~I(x^2 Nathan S. Watson-Haigh nathan.watson-ha...@csiro.au 01/12/09 2:19 AM I have the following data: y [1] 0.000 0.004 0.008 0.016 0.024 0.032 0.044 0.064 0.072 0.088 0.108 0.140 [13] 0.156 0.180 0.208 0.236 0.264 0.296 0.320 0.360 0.408 0.444 0.472 0.524

[R] Memory Efficiency of Symmetric Matrix

2009-01-06 Thread Nathan S. Watson-Haigh
be able to almost half the memory usage for large matrices. Any thoughts/comments? Cheers, Nathan - -- - Dr. Nathan S. Watson-Haigh OCE Post Doctoral Fellow CSIRO Livestock Industries Queensland Bioscience Precinct St Lucia, QLD 4067

Re: [R] Memory Efficiency of Symmetric Matrix

2009-01-06 Thread Nathan S. Watson-Haigh
to test it out with my usual 24k x 24k size matrices. Fra: r-help-boun...@r-project.org på vegne af Nathan S. Watson-Haigh Sendt: on 07-01-2009 01:28 Til: r-h...@r-project.org Emne: [R] Memory Efficiency of Symmetric Matrix I'm generating a symmetric

[R] Understanding dsyrk_ in C code

2009-01-06 Thread Nathan S. Watson-Haigh
and beta is 0, this reduces to: = 1*A*A' + 0*C = A*A' Which is simply the cross productam I correct? Cheers, Nath - -- - Dr. Nathan S. Watson-Haigh OCE Post Doctoral Fellow CSIRO Livestock Industries Queensland Bioscience Precinct St

Re: [R] Understanding dsyrk_ in C code

2009-01-06 Thread Nathan S. Watson-Haigh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Charles C. Berry wrote: On Wed, 7 Jan 2009, Nathan S. Watson-Haigh wrote: I'm trying to understand some C code in an R package I'm using. I'm address this question here as it's matrix algebra...and I'm no pro at that! the C command reads

Re: [R] [ExternalEmail] Pearson Correlation Speed

2008-12-15 Thread Nathan S. Watson-Haigh
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Charles C. Berry wrote: On Mon, 15 Dec 2008, Nathan S. Watson-Haigh wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Nathan S. Watson-Haigh wrote: I'm trying to calculate Pearson correlation coefficients for a large matrix of size 18563 x

[R] Pearson Correlation Speed

2008-12-14 Thread Nathan S. Watson-Haigh
my R scripts - any pointers on that? Thanks for any input - I hope I just need a hand over the initial hurdles and then I can get onto that up-hill learning curve!! Nathan - -- - Dr. Nathan S. Watson-Haigh OCE Post Doctoral Fellow CSIRO