Re: [R] Multiplying two vectors of the same size to give a third vector of the same size

2023-06-20 Thread Philip Rhoades via R-help
kept. Of course, if you do not want to keep the NA, that can trivially be removed: C[!is.na(C)] [1] 0.00 0.36 0.81 I actually got there myself after a bit of experimenting! - but you pointed me in the right direction! Thanks! Phil. -Original Message- From: Philip Rhoades Sent: T

Re: [R] OK, next Q - a sort of factorial on a vector

2023-06-20 Thread Philip Rhoades via R-help
I am thinking of shouldn't need any grunt that would require rewriting any functions in C or Rust or something . . P. On Tue, Jun 20, 2023 at 8:46 PM Philip Rhoades via R-help wrote: Ivan, On 2023-06-21 03:32, Ivan Krylov wrote: В Wed, 21 Jun 2023 03:13:52 +1000 Philip Rhoades

Re: [R] Multiplying two vectors of the same size to give a third vector of the same size

2023-06-20 Thread Philip Rhoades via R-help
second Q was something reasonable to ask the list? Anyway now that I need to use R again, the basics should come back to me I hope - but I will check out the tutorials again in any case . . Thanks to Uwe as well (very nice!), Phil. On Tue, Jun 20, 2023 at 8:38 AM Philip Rhoades via R-h

Re: [R] OK, next Q - a sort of factorial on a vector

2023-06-20 Thread Philip Rhoades via R-help
Ivan, On 2023-06-21 03:32, Ivan Krylov wrote: В Wed, 21 Jun 2023 03:13:52 +1000 Philip Rhoades via R-help пишет: This: !(1,2,3,4,5) would give this: (2,3,4,5, 6,8,10, 12,15, 20) Do you mean taking a product of every element of the vector with all following vector elements? A

[R] OK, next Q - a sort of factorial on a vector

2023-06-20 Thread Philip Rhoades via R-help
People, What I mean is, is there an elegant way to do this: This: !(1,2,3,4,5) would give this: (2,3,4,5, 6,8,10, 12,15, 20) and this: !(1,2,NA,4,5) would give this: (2,4,5, 8,10, 20) ? Thanks! Phil. -- Philip Rhoades PO Box 896 Cowra NSW 2794 Australia E-mail: p

Re: [R] Multiplying two vectors of the same size to give a third vector of the same size

2023-06-20 Thread Philip Rhoades via R-help
< threshold] Ah, I see . . And you can of course do all the above as a one-liner. Yes. Is that what you wanted? Exactly except I meant: Result <- C[C > threshold] Thanks! Phil. -Original Message- From: R-help On Behalf Of Philip Rhoades via R-help Sent: Tues

[R] Multiplying two vectors of the same size to give a third vector of the same size

2023-06-20 Thread Philip Rhoades via R-help
between 0.0 and 1.0 or NULL - If there is a NULL in the multiplication, then the result in the cell for C is also a NULL - If there is a value less than (say) 0.01 in the multiplication, then the result in the cell for C is 0.0 Any suggestions appreciated! Phil. -- Philip Rhoades PO Box

Re: [R] A general question about using Bayes' Theorem for calculating the probability of The End of Human Technological Civilisation

2019-03-19 Thread Philip Rhoades
would be immediately posting at CrossValidated.com (i.e., stats.stackexchange.com) Thanks - I will check that out . . P. -- David. On March 19, 2019 10:42:24 AM PDT, Philip Rhoades wrote: People, I have only a general statistics understanding and have never actually used Bayes

[R] A general question about using Bayes' Theorem for calculating the probability of The End of Human Technological Civilisation

2019-03-19 Thread Philip Rhoades
ear? Once the prior gets small enough people won't bother with the calculations anyway . . Does anyone know of any existing work on this topic? I want to write a plain-English doc about it but I want to have the stats clear in my head . . Thanks, Phil. -- Philip Rhoades PO Box 896 C

[R] A Neural Network question

2016-04-18 Thread Philip Rhoades
to get this last bit of the spreadsheet working so I can move on to doing actual work with the R packages with better understanding? Thanks, Phil. -- Philip Rhoades PO Box 896 Cowra NSW 2794 Australia E-mail: p...@pricom.com.au __ R-help@r

[R] Using R for modelling Australian Senate Election in NSW?

2014-09-30 Thread Philip Rhoades
nting wheels etc) would be much appreciated! Regards, Phil. -- Philip Rhoades GPO Box 3411 Sydney NSW 2001 Australia E-mail: p...@pricom.com.au __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] GGPLOT Question - #2

2014-04-06 Thread Philip Rhoades
People, On 2014-04-06 22:31, Philip Rhoades wrote: People, OK, the last two bits of the puzzle - can I colour the bars independently and change the scale from linear to logarithmic? To answer my own question - the attached file works for me but I guess could be improved? Thanks, Phil

Re: [R] GGPLOT Question - #2

2014-04-06 Thread Philip Rhoades
People, OK, the last two bits of the puzzle - can I colour the bars independently and change the scale from linear to logarithmic? Thanks, Phil. On 2014-04-06 22:23, Philip Rhoades wrote: Stephen, On 2014-04-06 22:09, stephen sefick wrote: add +coord_flip() at the end. Does that do it

Re: [R] GGPLOT Question

2014-04-06 Thread Philip Rhoades
Stephen, On 2014-04-06 22:09, stephen sefick wrote: add +coord_flip() at the end. Does that do it? Wow! - that was a fast response! - yes that works - thanks a lot! Regards, Phil. On Sun, Apr 6, 2014 at 7:03 AM, Philip Rhoades wrote: People, I have this script: library(ggplot2

[R] GGPLOT Question

2014-04-06 Thread Philip Rhoades
to get geom_crossbar to print horizontally? - I couldn't find it . . and there doesn't seem to be a horizontal equivalent? Thanks, Phil. -- Philip Rhoades GPO Box 3411 Sydney NSW 2001 Australia E-mail: p...@pricom.com.au __ R-help

Re: [R] A trivial plot gives open circles as the plot char but another one gives me "q"s . . why is this?

2012-04-03 Thread Philip Rhoades
David, On 2012-04-03 22:29, David Winsemius wrote: On Apr 3, 2012, at 1:19 AM, Philip Rhoades wrote: People, On my home computer with a real plot I get what I expect - open circles as the plot character - on my work computer I get "q"s ! So I tried a trivial test plot o

Re: [R] A trivial plot gives open circles as the plot char but another one gives me "q"s . . why is this?

2012-04-03 Thread Philip Rhoades
Brian, On 2012-04-03 18:58, Prof Brian Ripley wrote: On Tue, 3 Apr 2012, peter dalgaard wrote: On Apr 3, 2012, at 07:19 , Philip Rhoades wrote: People, On my home computer with a real plot I get what I expect - open circles as the plot character - on my work computer I get "q&quo

[R] A trivial plot gives open circles as the plot char but another one gives me "q"s . . why is this?

2012-04-02 Thread Philip Rhoades
d although the home computer is Fedora 16 and the work one is Fedora 15). It is very frustrating . . Thanks, Phil. -- Philip Rhoades GPO Box 3411 Sydney NSW 2001 Australia E-mail: p...@pricom.com.au __ R-help@r-project.org mailing list https

[R] Portrait and Lanscape PDF in the one document

2011-10-17 Thread Philip Rhoades
People, I want to create a multi-page PDF doc and the pdf command works fine if I only use Portrait OR Landscape but how do I create a document that contains BOTH sorts of pages? Is it possible? - I couldn't find info about it. Thanks, Phil. -- Philip Rhoades GPO Box 3411 Sydne

Re: [R] Boxplot BUT with Mean, SD, Max & Min ?

2011-09-26 Thread Philip Rhoades
Gabor, On 2011-09-27 04:31, Gabor Grothendieck wrote: On Mon, Sep 26, 2011 at 1:45 PM, Philip Rhoades wrote: Gabor, Bill, On 2011-09-27 02:51, Gabor Grothendieck wrote: On Mon, Sep 26, 2011 at 12:11 PM, Philip Rhoades wrote: Gabor, On 2011-09-27 00:35, Gabor Grothendieck wrote

Re: [R] Boxplot BUT with Mean, SD, Max & Min ?

2011-09-26 Thread Philip Rhoades
Gabor, Bill, On 2011-09-27 02:51, Gabor Grothendieck wrote: On Mon, Sep 26, 2011 at 12:11 PM, Philip Rhoades wrote: Gabor, On 2011-09-27 00:35, Gabor Grothendieck wrote: On Mon, Sep 26, 2011 at 9:56 AM, Philip Rhoades wrote: People, It appears that there is no way of getting

Re: [R] Boxplot BUT with Mean, SD, Max & Min ?

2011-09-26 Thread Philip Rhoades
Gabor, On 2011-09-27 00:35, Gabor Grothendieck wrote: On Mon, Sep 26, 2011 at 9:56 AM, Philip Rhoades wrote: People, It appears that there is no way of getting Boxplots to plot using Mean, SD, Max & Min - is there something else that would do what I want?  I couldn't find it .

[R] Boxplot BUT with Mean, SD, Max & Min ?

2011-09-26 Thread Philip Rhoades
People, It appears that there is no way of getting Boxplots to plot using Mean, SD, Max & Min - is there something else that would do what I want? I couldn't find it . . Thanks, Phil. -- Philip Rhoades GPO Box 3411 Sydney NSW 2001 Australia E-mail: p...@pric

[R] Increase space between xlab and X axis tick labels

2011-09-25 Thread Philip Rhoades
e space between xlab and the X axis tick labels? Thanks, Phil. -- Philip Rhoades GPO Box 3411 Sydney NSW 2001 Australia E-mail: p...@pricom.com.au __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

[R] Converting large JSON data into multidimensional array

2011-06-29 Thread Philip Rhoades
1]] [1] "01.01.01.02" [[3]][[2]] [1] -2.303347 [[4]] [[4]][[1]] [1] "01.01.01.03" [[4]][[2]] [1] -2.354964 . . I would like to convert the data into a: 50.32.20.22 array and be able to do calculations on the array like: mean( tst[ 50,,20,00 ] ) etc Suggestions

Re: [R] Multiple (7) Y axes?

2011-06-16 Thread Philip Rhoades
(10,0,0.4)),yaxt='n',col=i,type='l') axis(4,line=(i-1)*1.5,col=i-1,col.ticks=i-1) } You may need to tweek around the options a bit and check that the tickmarks are actually labelling the correct axes and that the colors correspondI did not check this thoroughly! HTH Jannis

[R] Multiple (7) Y axes?

2011-06-16 Thread Philip Rhoades
plot but I couldn't find examples of any more than that - is it possible? Thanks, Phil. -- Philip Rhoades GPO Box 3411 Sydney NSW2001 Australia E-mail: p...@pricom.com.au __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/

[R] Importing JSON Hash Table

2011-06-03 Thread Philip Rhoades
People, I have found out how to create basic R hash tables and use "ls" and "get" and I can import my JSON hash table file with: x <- fromJSON( file="t.json" ) but if I have previously created x with: x = new.env(hash=T) - as soon as I import from the file, x stops being a hash table . .

[R] Additive/multiplicative estimations?

2008-12-30 Thread Philip Rhoades
the results of the two tests are greater than 50% and the two tests are unrelated, the actual likelihood should be more than the mean of the two tests. Thanks, Phil. -- Philip Rhoades GPO Box 3411 Sydney NSW 2001 Australia E-mail: p...@pricom.com.au

Re: [R] Using metric units in plots

2008-06-20 Thread Philip Rhoades
Prof Brian Ripley, Prof Brian Ripley wrote: On Fri, 20 Jun 2008, Philip Rhoades wrote: People, It appears that one has to use Imperial measurements in plot parameters? I can't find any info on using metric units . . In package grid you can use several different units. When I s

[R] Using metric units in plots

2008-06-20 Thread Philip Rhoades
People, It appears that one has to use Imperial measurements in plot parameters? I can't find any info on using metric units . . Thanks, Phil. -- Philip Rhoades Pricom Pty Limited (ACN 003 252 275 ABN 91 003 252 275) GPO Box 3411 Sydney NSW 2001 Australia E-mail: [EMAIL PROT