Re: [R] Efficient sampling from a discrete distribution in R

2007-09-04 Thread Robin Hankin
-contained, reproducible code. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] Incomplete Gamma function

2007-09-03 Thread Robin Hankin
guide http://www.R-project.org/posting- guide.html and provide commented, minimal, self-contained, reproducible code. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743

Re: [R] Behaviour of very large numbers

2007-08-31 Thread Robin Hankin
(437100)i -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Incomplete Gamma function

2007-08-31 Thread Robin Hankin
, self-contained, reproducible code. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] Incomplete Gamma function

2007-08-31 Thread Robin Hankin
On 31 Aug 2007, at 14:06, Prof Brian Ripley wrote: On Fri, 31 Aug 2007, Robin Hankin wrote: Hi Kris lgamma() gives the log of the gamma function. Yes, but he used Igamma. According to ?pgamma, 'pgamma' is closely related to the incomplete gamma function. As defined

[R] integration over a simplex

2007-07-10 Thread Robin Hankin
that all(p0) and sum(p)=1 mean that the support of the Dirichlet distribution is an n-simplex. ] -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help

Re: [R] (no subject)

2007-07-06 Thread Robin Hankin
- guide.html and provide commented, minimal, self-contained, reproducible code. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch mailing list

[R] vectorize a function

2007-06-22 Thread Robin Hankin
that it has no loop? -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] How to create .rda file to be used in package building

2007-06-21 Thread Robin Hankin
/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. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059

[R] triangle contour plots

2007-06-18 Thread Robin Hankin
scatterplots, AFAICS -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] data.frame

2007-06-18 Thread Robin Hankin
. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] besselK

2007-06-14 Thread Robin Hankin
commented, minimal, self-contained, reproducible code. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman

Re: [R] Filling array: No recycling

2007-05-03 Thread Robin Hankin
and provide commented, minimal, self-contained, reproducible code. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch mailing list https

Re: [R] Inflate/Expand/Resize an array

2007-04-27 Thread Robin Hankin
-project.org/posting- guide.html and provide commented, minimal, self-contained, reproducible code. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help

Re: [R] Inflate/Expand/Resize an array

2007-04-27 Thread Robin Hankin
[replying to myself] it might be better to use sweep(f,(1:6)[-2],m,+) instead. On 27 Apr 2007, at 11:56, Robin Hankin wrote: Hi f.dims - c(10,25,1,1,1,14) m.dims - c(10, 1,1,1,1,14) f - array(1:prod(f.dims),f.dims) m - array(1:prod(m.dims),m.dims) jj - do.call(abind,c(rep

Re: [R] A problem about all possible sequences

2007-04-17 Thread Robin Hankin
__ R-help@stat.math.ethz.ch 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. -- Robin Hankin Uncertainty Analyst

Re: [R] Find zeros of analytic functions

2007-04-16 Thread Robin Hankin
complex functions. HTH -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help

[R] quick legend() question

2007-03-22 Thread Robin Hankin
; the first two symbols end up with a line I don't want. The same happens with lwd=c(NA,NA,3). How to coerce legend() into doing what I want? -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743

[R] character to numeric conversion

2007-03-19 Thread Robin Hankin
, 5.978569259122249264778017262, 4.499809670330265066808481929, 2.602689685444383764768503589, 0.E-38] (the output is a single line). In a big run, the string may contain 10^5 or possibly 10^6 numbers. What's the recommended way to convert this to a numeric vector? -- Robin Hankin Uncertainty Analyst National

Re: [R] order of values in vector

2007-03-19 Thread Robin Hankin
grateful for a tip! cheers, Tord -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] character to numeric conversion

2007-03-19 Thread Robin Hankin
in the middle of a multi-digit number, which messes up my conversion to numeric? -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch

Re: [R] character to numeric conversion

2007-03-19 Thread Robin Hankin
On 19 Mar 2007, at 11:20, Robin Hankin wrote: Hello everybody thanks for the tips. I *think* this should be the same thread The manpage for system() says that lines of over 8095 characters will be split. This is causing me problems. How do I get round the 8095 character limit

Re: [R] enumerating non-overlapping pairs of elements from a vector

2007-03-05 Thread Robin Hankin
do read the posting guide http://www.R-project.org/posting- guide.html and provide commented, minimal, self-contained, reproducible code. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743

Re: [R] merge two colums

2007-02-27 Thread Robin Hankin
the posting guide http://www.R-project.org/posting- guide.html and provide commented, minimal, self-contained, reproducible code. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743

Re: [R] 3F2 hypergeometric function

2007-02-22 Thread Robin Hankin
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. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way

Re: [R] Generating MVN Data

2007-02-13 Thread Robin Hankin
PLEASE do read the posting guide http://www.R-project.org/posting- guide.html and provide commented, minimal, self-contained, reproducible code. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743

[R] blockwise matrix multiplication

2007-02-09 Thread Robin Hankin
partition A according to the equivalence classes of the elements of x and block multiply by M? I want for(i in 1:4){for(j in 1:4){ A[which(x==i),which(x==j)] - A[which(x==i),which(x==j)]*M[i,j] }} Is there a better way than this ghastly for() loop? -- Robin Hankin Uncertainty Analyst

Re: [R] blockwise matrix multiplication

2007-02-09 Thread Robin Hankin
Wow. It generalizes nicely to arbitrary dimensional arrays too. thanks a lot! rksh On 9 Feb 2007, at 14:19, Gabor Grothendieck wrote: Try this: A * M[as.matrix(expand.grid(x,x))[,2:1]] On 2/9/07, Robin Hankin [EMAIL PROTECTED] wrote: Hi Given an n-by-n matrix A, say n=10

Re: [R] circle fill problem

2007-02-08 Thread Robin Hankin
. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] circle fill problem

2007-02-08 Thread Robin Hankin
the problem has been solved (I imagine the problem is easier in 2-d ...) hth, Ingmar On 8 Feb 2007, at 09:52, Robin Hankin wrote: Mini This is a hard problem in general. Recreational mathematics has wrestled with this and similar problems over the years; the general field is the set cover

Re: [R] Index mapping on arrays

2007-02-01 Thread Robin Hankin
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. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way

Re: [R] Need help writing a faster code

2007-02-01 Thread Robin Hankin
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. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way

Re: [R] Permutation problem

2007-01-30 Thread Robin Hankin
read the posting guide http://www.R-project.org/posting- guide.html and provide commented, minimal, self-contained, reproducible code. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743

Re: [R] jump in sequence

2007-01-30 Thread Robin Hankin
-project.org/posting- guide.html and provide commented, minimal, self-contained, reproducible code. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help

Re: [R] curious about dimension of 'apply' output when MARGIN=1

2007-01-18 Thread Robin Hankin
guide http://www.R-project.org/posting- guide.html and provide commented, minimal, self-contained, reproducible code. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743

[R] [[ gotcha

2007-01-16 Thread Robin Hankin
is just a scalar and not a matrix (why is this?) What's the bulletproof method for assigning matrices to a list (whose length is not known at runtime)? -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743

[R] image() and nonsquare matrices

2007-01-12 Thread Robin Hankin
the x axis label is floating far from the x axis. Try 3: image(1:20,1:5,a,asp=1,axes=F,xlab=,ylab=) axis(side=1,pos=0) # No good because the x axis label is absent. How to use image() with a non-square matrix and make axes and labels appear correctly? -- Robin Hankin Uncertainty Analyst

[R] [R-pkgs] Dummy's guide to S4 methods: package Brobdingnag

2007-01-12 Thread Robin Hankin
) and one virtual class (swift). The package includes a vignette that is a step-by-step guide to using S4 methods in the context of an R package. Enjoy Robin -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059

Re: [R] Software for kriging

2007-01-04 Thread Robin Hankin
://www.R-project.org/posting- guide.html and provide commented, minimal, self-contained, reproducible code. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R

[R] write() gotcha

2006-12-18 Thread Robin Hankin
] 4.0 $year [1] 2006 $month [1] 10 $day [1] 03 $`svn rev` [1] 39566 $language [1] R $version.string [1] R version 2.4.0 (2006-10-03) -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743

Re: [R] write() gotcha

2006-12-18 Thread Robin Hankin
On 18 Dec 2006, at 08:50, Prof Brian Ripley wrote: On Mon, 18 Dec 2006, Robin Hankin wrote: Hi I used write() the other day to save some results. Why not save()? It is the only way to preserve the results exactly. It seems that write() does not record the full precision of the objects

Re: [R] Welcome to the R-help mailing list

2006-12-14 Thread Robin Hankin
-contained, reproducible code. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

[R] two connected graphs

2006-12-14 Thread Robin Hankin
-axes of the two graphs must line up. I then want to draw straight lines that connect points of B to a particular point (or points) of A. How do I do this? -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743

[R] backticks

2006-12-04 Thread Robin Hankin
that formulae using non-syntactic names such as `like this` will be accepted. What exactly do backticks do that single or double quotes don't? Where do I look for documentation on this? -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14

Re: [R] backticks

2006-12-04 Thread Robin Hankin
Peter Aha! so R backticks work just like bash backticks (duh!) unless they are on the LHS of an assignment. [We bash people now use $(...) instead] Could we add something to this effect to Quotes.Rd? rksh On 4 Dec 2006, at 14:33, Peter Dalgaard wrote: Robin Hankin wrote: [snip] What

Re: [R] analog to the matlab buffer function?

2006-12-01 Thread Robin Hankin
-project.org/posting- guide.html and provide commented, minimal, self-contained, reproducible code. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help

Re: [R] t.test()

2006-11-24 Thread Robin Hankin
On 23 Nov 2006, at 13:46, Peter Dalgaard wrote: Robin Hankin [EMAIL PROTECTED] writes: Hi I have a vector x of length n. I am interested in x[1] being different from the other observations (ie x[-1]). [snip] What arguments do I need to send to t.test() to test my null? [snip

[R] t.test()

2006-11-23 Thread Robin Hankin
null? -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] t.test()

2006-11-23 Thread Robin Hankin
Robin Hankin Verzonden: donderdag 23 november 2006 14:12 Aan: [EMAIL PROTECTED] Onderwerp: [R] t.test() Hi I have a vector x of length n. I am interested in x[1] being different from the other observations (ie x[-1]). My null hypothesis is that x[1] is drawn from a Gaussian distribution

[R] do.call(+, ...)

2006-11-17 Thread Robin Hankin
in my list) How to do this nicely? -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman

Re: [R] do.call(+, ...)

2006-11-17 Thread Robin Hankin
(i){matrix((1:6)^i, 2, 3)} do.call(++, sapply(1:4, f, simplify=FALSE)) [,1] [,2] [,3] [1,]4 120 780 [2,] 30 340 1554 Cheers, Romain Quoting Robin Hankin [EMAIL PROTECTED]: Hi How do I make do.call() take + as a function for a list of more than two elements? Toy

Re: [R] filling an array, vectorized

2006-11-17 Thread Robin Hankin
return(force.integer(aperm(process(a, d), permute))) } -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch mailing list https

Re: [R] do.call(+, ...)

2006-11-17 Thread Robin Hankin
. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] do.call(+, ...)

2006-11-17 Thread Robin Hankin
(++,l[-n]) + l[[n]] } Aha, the dreaded ..1 argument. Where do I look for documentation on this? [It is mentioned twice in The R Language Definition, but I'm no wiser] -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel

Re: [R] filling an array, vectorized

2006-11-16 Thread Robin Hankin
-help@stat.math.ethz.ch 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. -- Robin Hankin Uncertainty Analyst National Oceanography Centre

Re: [R] filling an array, vectorized

2006-11-16 Thread Robin Hankin
, Robin Hankin [EMAIL PROTECTED] wrote: Tamas first of all, Thank You for a really well-posed, interesting problem. Answer follows. do.index - function(a,f){ jj - function(i){seq_len(dim(a)[i])} index - as.matrix(expand.grid(sapply(1:length(dim (a)),jj,simplify=FALSE))) a[index

Re: [R] Multivariate regression

2006-10-30 Thread Robin Hankin
://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. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel

[R] combinatorics

2006-10-13 Thread Robin Hankin
Hi How do I generate all ways of ordering sets of indistinguishable items? suppose I have two A's, two B's and a C. Then I want AABBC AABCB AACBC ABABC . . .snip... BBAAC . . .snip... CBBAA [there are 5!/(2!*2!) = 30 arrangements. Note AABBC != BBAAC] How do I do this? -- Robin Hankin

Re: [R] combinatorics

2006-10-13 Thread Robin Hankin
, MA 01801 Tel: 781-938-3830 www.nuverabio.com -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robin Hankin Sent: Friday, October 13, 2006 10:19 AM To: [EMAIL PROTECTED] Subject: [R] combinatorics Hi How do I generate all ways of ordering sets

Re: [R] A statement over multiple lines (i.e. the ... feature in Matlab)

2006-10-05 Thread Robin Hankin
__ R-help@stat.math.ethz.ch 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. -- Robin Hankin

Re: [R] A statement over multiple lines (i.e. the ... feature in Matlab)

2006-10-05 Thread Robin Hankin
On 5 Oct 2006, at 09:34, Bjørn-Helge Mevik wrote: Robin Hankin wrote: For the line breaking, R deals with incomplete lines by not executing the statement until you finish it. Beware, however, that syntactically valid lines do get executed immediately (at least at the prompt). yes

Re: [R] Block comments in R?

2006-10-05 Thread Robin Hankin
that block of (incorrect) code? or use a good editor that supports commenting and uncommenting blocks. Uwe Ligges -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743

Re: [R] Some questions about plotting with R

2006-10-04 Thread Robin Hankin
Graphics by Paul Murrell [1] will tell you all you need to know, and the excellent, online R graphics gallery [2] has lots of examples. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743

Re: [R] How to generating diagnal blocks ?

2006-09-21 Thread Robin Hankin
. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

[R] functions and strings

2006-09-13 Thread Robin Hankin
Hi If string - xyz f - function(x){1 + sin(cos(x)) + exp(x^2)} How do I manipulate string and f() to give the string 1 + sin(cos(xyz)) + exp(xyz^2) ? -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743

Re: [R] functions and strings

2006-09-13 Thread Robin Hankin
- gsub(x, xyz, deparse(body(f))[2]) sub('^[[:space:]]+', '', strng) -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch mailing list https

Re: [R] functions and strings

2006-09-13 Thread Robin Hankin
)} strng - gsub((x), (xyz), deparse(body(f))[2], fixed = TRUE) sub('^[[:space:]]+', '', strng) [1] sin(xyz) + exp(xyz) Best, Dimitris -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743

Re: [R] functions and strings

2006-09-13 Thread Robin Hankin
= TRUE) sub('^[[:space:]]+', '', strng) [1] sin(xyz) + exp(xyz) Best, Dimitris -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch

Re: [R] functions and strings

2006-09-13 Thread Robin Hankin
), 'foo', names(formals(f))) 2 * foo/sin(foo) - b Hope that helps, Rich -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch mailing list

[R] exactly representable numbers

2006-09-11 Thread Robin Hankin
between these two. I have a little function that does some of this: f - function(x,FAC=1.1){ delta - x while(x+delta x){ delta - delta/FAC } return(delta*FAC) } But this can't be optimal. Is there a better way? -- Robin Hankin Uncertainty Analyst National Oceanography Centre

Re: [R] exactly representable numbers

2006-09-11 Thread Robin Hankin
right across the IEEE range] rksh On 11 Sep 2006, at 10:50, Sundar Dorai-Raj wrote: Robin Hankin said the following on 9/11/2006 3:52 AM: Hi Given a real number x, I want to know how accurately R can represent numbers near x. In particular, I want to know the infimum of exactly

Re: [R] exactly representable numbers

2006-09-11 Thread Robin Hankin
for this. Wouldn't it be a good idea to have some function that returns the smallest exactly representable number strictly greater than x? Or does this exist already? Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059

Re: [R] What is the matrix version of min()

2006-09-06 Thread Robin Hankin
- guide.html and provide commented, minimal, self-contained, reproducible code. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch mailing list

Re: [R] Create a vector from another vector

2006-08-30 Thread Robin Hankin
, self-contained, reproducible code. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] Create a vector from another vector

2006-08-30 Thread Robin Hankin
-help@stat.math.ethz.ch 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. -- Robin Hankin Uncertainty Analyst National Oceanography Centre

Re: [R] Create a vector from another vector

2006-08-30 Thread Robin Hankin
- guide.html and provide commented, minimal, self-contained, reproducible code. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch mailing

Re: [R] Help with Functions

2006-08-29 Thread Robin Hankin
-project.org/posting- guide.html and provide commented, minimal, self-contained, reproducible code. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help

[R] big numbers

2006-08-22 Thread Robin Hankin
(a) and log(b), follows. f - function(a,n=100){ out - rep(0,n) out[1] - a for(i in 2:n){ out[i] - sum(exp(out[1:i])) + rexp(1) } return(log(out)) } then f(1,10) has infinities in it, even though the values should be moderate size. What are my options here? -- Robin Hankin

Re: [R] listing a sequence of vectors in a matrix

2006-08-22 Thread Robin Hankin
Hi f - function(a,n){(1:a)[1:n]} t(sapply(c(2,3,4,4,4,5,6),f,n=5)) [,1] [,2] [,3] [,4] [,5] [1,]12 NA NA NA [2,]123 NA NA [3,]1234 NA [4,]1234 NA [5,]1234 NA [6,]12345 [7,]1

Re: [R] listing a sequence of vectors in a matrix

2006-08-22 Thread Robin Hankin
- guide.html and provide commented, minimal, self-contained, reproducible code. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch mailing list

Re: [R] Help with matrix manipulation

2006-07-28 Thread Robin Hankin
-help@stat.math.ethz.ch 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. -- Robin Hankin Uncertainty Analyst National Oceanography Centre

Re: [R] mirror vector?

2006-07-28 Thread Robin Hankin
commented, minimal, self-contained, reproducible code. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch mailing list https

Re: [R] mirror vector?

2006-07-28 Thread Robin Hankin
://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. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel

Re: [R] how to resample (or resize) matrix?

2006-07-27 Thread Robin Hankin
@stat.math.ethz.ch 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. -- Robin Hankin Uncertainty Analyst National Oceanography Centre

[R] inserting rows into a matrix

2006-07-27 Thread Robin Hankin
,]341 anyone? -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] inserting rows into a matrix

2006-07-27 Thread Robin Hankin
)) a3 Essentially use the product to pick out the rows with at least one 0 and replace these rows with 0s. HTH. -Christos -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robin Hankin Sent: Thursday, July 27, 2006 9:54 AM To: RHelp Subject: [R

Re: [R] inserting rows into a matrix

2006-07-27 Thread Robin Hankin
Message- From: Robin Hankin [mailto:[EMAIL PROTECTED] Sent: Thursday, July 27, 2006 10:16 AM To: [EMAIL PROTECTED] Cc: 'Robin Hankin'; 'RHelp' Subject: Re: [R] inserting rows into a matrix Hi Christos thanks for this, but it won't work because in my application f(A2) will fail

[R] Stirling numbers

2006-07-19 Thread Robin Hankin
Hi anyone coded up Stirling numbers in R? [I need unsigned Stirling numbers of the first kind] cheers Robin -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743

[R] par(mfrow,mai) and multiple plot problem

2006-07-10 Thread Robin Hankin
(main=t=2) f(main=t=3) f(ylab=dog) f() f() f(ylab=slug) f() f() f(ylab=pig) f() f() dev.off() -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help

Re: [R] par(mfrow,mai) and multiple plot problem

2006-07-10 Thread Robin Hankin
De Wolf wrote: Check ?layout It gives you more flexibility than par(mfrow=c(a,b)) For instance, you can define your margins between the graphs as cells in the layout without filling them by a plot. Joris Robin Hankin wrote: Hi I'm having difficulty with a multiple plot. -- Robin

[R] combining tables

2006-06-19 Thread Robin Hankin
=2,dogs=6,slugs=3,crabs=0))) cats squid pigs dogs slugs crabs 7 7 2 6 3 0 Note that we have 7 cats altogether, and the crabs correctly show as zero counts. How to do this nicely in R? -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton

[R] [R-pkgs] new package on CRAN

2006-05-31 Thread Robin Hankin
. I would be very interested to hear any comments or suggestions that the List may have. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 ___ R-packages mailing

[R] package installation problem

2006-05-23 Thread Robin Hankin
-Computer:~/scratch% anyone? -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] package installation problem

2006-05-23 Thread Robin Hankin
/gcc4.0/bin/ Now the second problem is that the file for -lgfortran can't be found. To solve this, add FLIBS=-L/usr/local/gcc4.0/lib to the Makevars file. best wishes rksh On 23 May 2006, at 08:25, Robin Hankin wrote: (this after asking the package author) Hi I cannot install the rmvnorm

Re: [R] Matrix in 3D

2006-05-22 Thread Robin Hankin
__ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting- guide.html -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023

Re: [R] sparklines

2006-05-17 Thread Robin Hankin
://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting- guide.html -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743

Re: [R] sparklines

2006-05-17 Thread Robin Hankin
for MacOS on intel. Any help would be greatly appreciated. Thanks Robert __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting- guide.html -- Robin

[R] Legendre symbols

2006-05-02 Thread Robin Hankin
≡ a (mod p) * −1 if not [courtesy Wikipedia] ] I might also need Jacobi's generalization of this. -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help

[R] summary(lm(x~y)) difference between R-2.2.1 and R-2.3.0

2006-04-27 Thread Robin Hankin
, 0.335523922927148, -0.736834541760754, -0.903503651131917, -0.877903767920926, 0.0943505569140546, 0.370818730053123, 0.366310076543096, 0.6119 [snip] -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743

Re: [R] summary(lm(x~y)) difference between R-2.2.1 and R-2.3.0

2006-04-27 Thread Robin Hankin
to function properly. On 4/27/06, Robin Hankin [EMAIL PROTECTED] wrote: Hi -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@stat.math.ethz.ch

  1   2   3   >