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

2012-02-15 Thread robin hankin
oftware, 46(8), 1-20. URL http://www.jstatsoft.org/v46/i08/ best wishes Robin -- Robin Hankin Uncertainty Analyst hankin.ro...@gmail.com ___ R-packages mailing list r-packa...@r-project.org https://stat.ethz.ch/mailman

Re: [R] Trouble installing gsl wrapper

2010-10-30 Thread robin hankin
d object '/usr/lib64/R/library/gsl/libs/gsl.so': >>>  libgsl.so.0: cannot open shared object file: No such file or directory >>> ERROR: loading failed >>> * removing ‘/usr/lib64/R/library/gsl’ >>> >>>> sessionInfo() >>> >>> R v

Re: [R] boundary check

2010-09-24 Thread Robin Hankin
<- iden(M) : subscript out of bounds > > Or I must be wrong somewhere. > > > Feng > > > On Sep 24, 12:39 pm, Robin Hankin wrote: > >> Hello >> >> convex hulls in large numbers of dimensions are hard. >> >> For your problem, though, o

Re: [R] boundary check

2010-09-24 Thread Robin Hankin
Hello convex hulls in large numbers of dimensions are hard. For your problem, though, one can tell whether a given point is inside or outside by using linear programming: > X <- matrix(rnorm(50), 10, 5) > x_i <- matrix(rnorm(5), 1, 5) > isin.chull function(candidate,p,plot=FALSE,give.answers=FA

[R] simple table/matrix problem

2010-07-30 Thread Robin Hankin
Hi Given three vectors x <- c(fish=3, dogs=5, bats=2) y <- c(dogs=1, hogs=3) z <- c(bats=3, dogs=5) How do I create a multi-way table like the following? > out x y z bats 2 0 3 dogs 5 1 5 fish 3 0 0 hogs 0 3 0 ('out' is a matrix). See how the first line shows 'x' has 2 bats, 'y' has

Re: [R] Function to compute the multinomial beta function?

2010-07-06 Thread Robin Hankin
It's usually better to build vectorization in to functions: > beta3<- function (n1, n2, n3) exp(lgamma(n1)+lgamma(n2)+lgamma(n3)-lgamma(n1+n2+n3)) > f <- function(x){exp(sum(lgamma(x))-lgamma(sum(x)))} > beta3(5,3,8) [1] 1.850002e-07 > f(c(5,3,8)) [1] 1.850002e-07 > rksh On 07/06/2010 01:54

Re: [R] Apply a shift which is a function of the array.

2010-07-02 Thread Robin Hankin
Hello again Jim It seems that ashift() from the same package *doesn't* do what you want. But you can use shift() as follows: > myshift <- function(x){shift(x,1-which.max(x))} > a <- matrix(runif(30),5,6) > a [,1] [,2] [,3] [,4] [,5] [,6] [1,] 0.268955362

Re: [R] Apply a shift which is a function of the array.

2010-07-02 Thread Robin Hankin
Hello Jim you can use ashift() from the same library which does (I think) what you want. HTH, Robin On 07/02/2010 12:05 PM, Jim Hargreaves wrote: Dear List, I have a 2,000x10,000 array of time domain data which when plotted draws a distinct pulse. The matrix is 10,000 pulses of length

Re: [R] table() of a factor

2010-06-29 Thread Robin Hankin
ctor(c(rep("a",3),"b","d"), levels = letters[1:5]) table(x) x a b c d e 3 1 0 1 0 Cheers, -Felix On 29 June 2010 20:59, Robin Hankin wrote: Hi suppose I have a factor 'x': x<- as.factor(c(rep("a",3),"b","

[R] table() of a factor

2010-06-29 Thread Robin Hankin
Hi suppose I have a factor 'x': > x <- as.factor(c(rep("a",3),"b","d")) > table(x) x a b d 3 1 1 > > But this is not what I want because I need to include the fact that the count of "c" is zero. I can't just change the levels of x: > levels(x) <- c("a","b","c","d") > table(x) x a b c d 3 1 1

Re: [R] add points to 3D plot using p3d {onion}

2010-01-27 Thread Robin Hankin
Hello Bradley I don't think there's an easy way to do what you want because the viewing angles are internal to p3d(). Frankly p3d() tries to be all things to all men (the arguments are a mess) and inevitably isn't as flexible as one might wish. I take it you want to do this: data(bunny) p3

Re: [R] Generating data from Null Distribution

2010-01-06 Thread Robin Hankin
Jim the 2x2 case is reasonably straightforward because the support is quite a small set. With the aylmer package you could do this: > a <- matrix(c(1,5,7,8),2,2) > sample(seq_along(allprobs(a)),100,replace=TRUE,prob=allprobs(a)) [1] 3 2 4 1 3 4 4 4 4 3 3 4 4 2 3 4 5 4 3 3 4 4 2 1 4 3 3 3 4 2

Re: [R] expand.grid game

2009-12-21 Thread Robin Hankin
g like: all <- 0 for(i in (2:8)){ jj <- blockparts(rep(9,8),17) all <- all + dim(jj) } Or am I missing something?! Ted. On 21-Dec-09 07:57:32, Robin Hankin wrote: Hi library(partitions) jj <- blockparts(rep(9,8),17) dim(jj) gives 318648 HTH rksh baptiste augui

Re: [R] expand.grid game

2009-12-21 Thread Robin Hankin
ser system elapsed 0.160 0.068 0.228 In some ways I think this is close to Hadley's suggestion, though I didn't know how to implement it. Thanks a lot to everybody who participated, I have learned interesting things from a seemingly innocuous question. Best regards, baptiste 200

Re: [R] expand.grid game

2009-12-21 Thread Robin Hankin
Hi library(partitions) jj <- blockparts(rep(9,8),17) dim(jj) gives 318648 HTH rksh baptiste auguie wrote: Dear list, In a little numbers game, I've hit a performance snag and I'm not sure how to code this in C. The game is the following: how many 8-digit numbers have the sum of their di

Re: [R] Fishers exact test at < 2.2e-16

2009-12-17 Thread Robin Hankin
The aylmer package has some functionality in this regard which you may find useful. In particular, you can use good() to get a feel for the number of tableaux that are consistent with the specified marginal totals: > good(dat2) [1] 42285210 > good(dat3) [1] 2.756286e+12 > HTH rksh Søren

Re: [R] how to creat a matrix

2009-12-11 Thread Robin Hankin
Hi try R> library(magic) R> ashift(diag(5),1) HTH rksh enrique Dallazuanna wrote: Try this: N <- 5 diag(1, N)[c(N, 1:(N - 1)),] On Fri, Dec 11, 2009 at 1:47 PM, Moohwan Kim wrote: Dear R family I am attempting to create a matrix. e.g., 0 0 0 0 1 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0

Re: [R] access elements of a named list using a factor

2009-10-23 Thread Robin Hankin
uot;pigs", "slugs")) jj <- list(pigs = 1:10, slugs = 1:3) jj[levels(f)[1]] jj[[levels(f)[1]]] Best, Dimitris Robin Hankin wrote: Hi I have a factor 'f' and a named list 'jj'. I want names(jj) to match up with levels(f). How do I use levels(f) to a

[R] access elements of a named list using a factor

2009-10-23 Thread Robin Hankin
Hi I have a factor 'f' and a named list 'jj'. I want names(jj) to match up with levels(f). How do I use levels(f) to access elements of jj? > f <- factor(c("pigs","pigs","slugs")) > f [1] pigs pigs slugs Levels: pigs slugs > > jj <- list(pigs=1:10,slugs=1:3) My attempts to produce jj$pig

Re: [R] reference on fisher.test()

2009-10-16 Thread Robin Hankin
Hi fexact.c points you to the original ACM paper: /* ALGORITHM 643, COLLECTED ALGORITHMS FROM ACM. THIS WORK PUBLISHED IN TRANSACTIONS ON MATHEMATICAL SOFTWARE, VOL. 19, NO. 4, DECEMBER, 1993, PP. 484-488. - You may find the discussion

[R] generalization of tabulate()

2009-10-16 Thread Robin Hankin
Hi I want a generalization of tabulate() which works on rows of a matrix. Suppose I have an integer matrix 'observation': > observation y1 y2 y3 1 4 0 1 4 0 2 0 3 4 1 0 0 5 0 0 1 4 2 0 3 Each row corresponds to a (multivariate) observation. Note that the first two rows are identical: this mea

Re: [R] S4 tutorial

2009-10-14 Thread Robin Hankin
Peng the Brobdingnag package includes a vignette that gives a step-by-step guide to creating a simple package that uses S4. best wishes Robin Peng Yu wrote: I'm looking for some tutorial on S4. I only find the following one, which is not in English. Can somebody let me know if there is any

Re: [R] sparse vectors

2009-09-08 Thread Robin Hankin
ummary(theSum) hth, b On Sep 8, 2009, at 10:19 AM, Henrique Dallazuanna wrote: Try this: abMerge <- merge(a, b, by = 'index', all = TRUE) list(index = abMerge$index, val = rowSums(abMerge[,2:3], na.rm = TRUE)) On Tue, Sep 8, 2009 at 10:06 AM, Robin Hankin wrote: Hi I deal w

[R] sparse vectors

2009-09-08 Thread Robin Hankin
Hi I deal with long vectors almost all of whose elements are zero. Typically, the length will be ~5e7 with ~100 nonzero elements. I want to deal with these objects using a sort of sparse vector. The problem is that I want to be able to 'add' two such vectors. Toy problem follows. Suppose I

Re: [R] Goldbach partitions code

2009-03-03 Thread Robin Hankin
Hi interesting blog! not strictly relevant, but there are various number-theoretic functions implemented in the elliptic package which you might find useful. best wishes Robin murali.me...@fortisinvestments.com wrote: Folks, I put up a brief note describing my naive attempts to compute Gol

Re: [R] R parser for If-else

2009-02-25 Thread Robin Hankin
I too have had many problems with if-else. My solution is to always always always use the line "} else {" in any if-else construction. This guarantees that there won't be problems of the sort discussed here. HTH rksh Martin Maechler wrote: "D" == Dani on Tue, 24 Feb 2009 14:09:36 -

Re: [R] How to handle large numbers?

2009-02-11 Thread Robin Hankin
Feng checkout the Brobdingnag package: > library(Brobdingnag) > exp(1000)/(exp(1007)+5) [1] NaN > as.numeric(exp(as.brob(1000))/(exp(as.brob(1007))+5)) [1] 0.000911882 > Feng Li wrote: Dear R, I have two questions: 1, Why both R and Matlab give 0*Inf==NaN? To my knowledge, it should be zer

[R] pdf() and pch problems

2009-01-22 Thread Robin Hankin
Hi R-2.8.1, Suse 11.1 I'm having problems with pdf(). In the following transcript, file 'f.pdf' does not use the expected symbols for the plot. It uses a 'q' letter instead of the open circle I get when viewing the graphics window. I also get the same under r47678. Does anyone else get this

[R] reshape() problems

2009-01-22 Thread Robin Hankin
Hi I have a data frame with timeseries information like this: year cell Q1Q2 Q3 Q4 1940 1 1.2 1.4 1.41.9 1941 1 2.9 2.1 3.4 2.4 1942 1 2.7 3.2 1.52.6 1940 2 1.4 2.1 2.62.4 1941 2 2.4 1.4 1.43.4

Re: [R] R package tests

2009-01-15 Thread Robin Hankin
I think the OP was asking about test suites that test the software. The R package structure includes a test/ directory which you can use to put tests. For example, in the onion package I check that I have got my signs and multiplication table correctly implemented: stopifnot(Hi*Hj == Hk) sto

Re: [R] Construct All Possible Strings from 4 Bases (ATCG)

2008-12-17 Thread Robin Hankin
Gundala f <- function(n){expand.grid(rep(list(seq_len(4)),n))} HTH Robin Gundala Viswanath wrote: Dear all, Is there an efficient way in R to construct all strings from 4 bases (ATCG). If we want a length L string, there are 4 ^ L possible strings of such. e . g with L = 2 we have AA

Re: [R] Complex integration in R

2008-12-12 Thread Robin Hankin
Hi Borja library(elliptic) ?myintegrate HTH rksh Borja Soto Varela wrote: Dear R-user I need a function to approximate a complex integration. My function is: aprox2=function(s,x,rate){ dexp(x,rate)*exp(-s*x) } where argument s is a complex number. I can't use the integrate function b

Re: [R] for loop query

2008-12-09 Thread Robin Hankin
Hi start simple! Work out *each* row combined with *each* row, to give (in your case) a 26-by-26 matrix. Only after you have got this working, start thinking about making it run faster [eg by only evaluating the upper triangular entries] To do a nested loop, do M <- matrix(0,n,n) for(i in

Re: [R] Lexical Permutation Algorithm in R

2008-12-05 Thread Robin Hankin
Rory there are several packages that perform this. I would use permn() of the combinat library, then, if lexicographical order is important, sort it explicitly. HTH rksh [EMAIL PROTECTED] wrote: Hi all Here is a rather naive implementation of the SEPA algorithm for generating lexical p

Re: [R] small numbers

2008-12-04 Thread Robin Hankin
Hi use the logarithmic representation for your problem. The Brobdingnag package uses such a form in a (more-or-less) user-transparent manner. HTH rksh Marc Jekel wrote: Dear R Fans, I have a simple probem but cannot find any reference to the soultion. I want to do calculations with small n

Re: [R] hypergeometric

2008-12-03 Thread Robin Hankin
The hypergeo package should be able to deal with this, although the function you specify below looks like a degenerate case (if I understand it correctly) so the convergence rate is likely to be slow. Let me know how you get on best wishes Robin (author of hypergeo) Jarle Brinchmann wrote:

Re: [R] Multidimensional array with R

2008-11-20 Thread Robin Hankin
Hello a good place to start is R-and-octave.txt, in the contributed docs section of CRAN. This translates between common matlab and R commands HTH rksh Michael Zak wrote: Hi there I know, I'm sure you discussed this stuff 100 times, but I really have a basic understanding problem, if a

Re: [R] Generating unique permutations of a vector

2008-11-14 Thread Robin Hankin
Annette I understand your problem. I think you may find 'blockparts(rep(5,5),5)' helpful. I'm working on permutations of multisets right now and expect to have functionality in partitions package as soon as I finish the Other Ten Thousand Things On My Things To Do List.arts Perhaps we could ta

Re: [R] Computational problems in R

2008-10-28 Thread Robin Hankin
Hello. The Brobdingnag package uses that identity for a logarithmic representation and also has a hack for negative numbers. HTH rksh A.Noufaily wrote: Many thanks for your suggestions... I am still checking which one is the most useful for my simulations. Concerning using logs, this m

Re: [R] weird behavior with the 3rd root....

2008-10-27 Thread Robin Hankin
This comes up from time to time. The problem is that one needs complex numbers to address taking the third root: there are three cube roots for any nonzero number (real or complex). To wit: > (-0.084121928394+0i)^(1/3) [1] 0.2190818+0.3794609i > (-0.084121928394-0i)^(1/3) [1] 0.21908

Re: [R] Generating a valid covariance matrix

2008-09-26 Thread Robin Hankin
Megh corr.matrix() in the 'emulator' package can calculate P-D variance matrices using any of a very broad class of methods. HTH rksh Megh Dal wrote: I want to generate a valid variance-covariance matrix. One way could be to generate some random sample from multivariate normal distribution

Re: [R] Generalising to n-dimensions

2008-09-26 Thread Robin Hankin
own in advance. You can get 'd' from a single row of expand.grid() [but you will have to coerce it to a matrix] HTH rksh Thank you, Laura On Wed, Sep 24, 2008 at 8:27 PM, Laura Bonnett <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]>> wrote: Can I ask what a and v

Re: [R] How to draw the graph of f(x,y) = x * y ?

2008-09-24 Thread Robin Hankin
Paul you might find the view() function in the 'elliptic' package useful. This function implements various methods to visualize functions over the complex plane. HTH rksh Paul Smith wrote: Dear All, The function curve() draws the graph of functions from R to R. Is there some homologous f

Re: [R] Generalising to n-dimensions

2008-09-23 Thread Robin Hankin
Laura Bonnett wrote: crosstable[,,expand[d,1],expand[d,2],expand[d,3],...expand[d,n]] crosstable is just a crosstabulation of an n+2-dimensional dataset and I am trying to pick out those that are in combination 'd' of expand. So for example, for 5-dimensional data using your example: Var1

Re: [R] Generalising to n-dimensions

2008-09-23 Thread Robin Hankin
First bit: > x <- c(3,2,2) > expand.grid(sapply(x,seq_len)) Var1 Var2 Var3 1 111 2 211 3 311 4 121 5 221 6 321 7 112 8 212 9 312 10122 11222 12322 >

Re: [R] how to keep up with R?

2008-09-22 Thread Robin Hankin
Adaikalavan Ramasamy wrote: I agree! The best way to learn (and remember for longer) is to teach someone else about it. And there is not reason not to repeat some of the anlysis done on SAS with R. That way you can verify your outputs or compare the presentations. If you consistently find dif

Re: [R] how to keep up with R?

2008-09-18 Thread Robin Hankin
Hi Wensei. Why not do as I do? Find an interesting area of numerical computation (perhaps not statistical) that has not been implemented in open-source. Then write an R package for it, under GPL-2, then write an article about the new package in R-news or JSS. works for me. Best wishes Ro

Re: [R] give all combinations

2008-09-01 Thread Robin Hankin
Hi Yuan, Lucien, List. try this: f <- function (...) { args <- list(...) if(length(args)==0){ return(NULL) } if (length(args) == 1) { return(args[[1]]) } if (length(args) > 2) { jj <- do.call("Recall", c(args[-1])) return(do.call("Recall", c(list(ar

[R] [R-pkgs] new package multipol

2008-04-23 Thread Robin Hankin
enjoy -- Robin Hankin Uncertainty Analyst and Neutral Theorist, National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 ___ R-packages mailing list [EMAIL PROTECTED] https://stat.ethz.ch/mailman/listinfo/r-pac

Re: [R] S4 : package creation

2008-03-25 Thread Robin Hankin
t; > -- > Martin Morgan > Computational Biology / Fred Hutchinson Cancer Research Center > 1100 Fairview Ave. N. > PO Box 19024 Seattle, WA 98109 > > Location: Arnold Building M2 B169 > Phone: (206) 667-2793 > > __ > R-help

Re: [R] empty array

2008-03-18 Thread Robin Hankin
gt; Christophe > > __ > 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-con

Re: [R] Bessel functions of complex argument

2008-03-10 Thread Robin Hankin
://newton.ex.ac.uk/research/emag > http://projects.ex.ac.uk/atto > > __ > 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 >

Re: [R] [OT] "normal" (as in "Guassian")

2008-03-04 Thread Robin Hankin
gt; [edit] > On 3 Mar 2008, at 19:17, Douglas Bates wrote: > >>>> >>>> -- Robin Hankin Uncertainty Analyst and Neutral Theorist, National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 ___

[R] PDF with computationally expensive normalizing constant

2008-02-11 Thread Robin Hankin
ecute something like a <- CalculateNormalizingConstant(a) and after this, object "a" would then have the numerically computed NC in place. Is this a Good Idea? Are there any PDFs implemented in R in which this is an issue? -- Robin Hankin Uncertainty Analyst and Neutra

Re: [R] learning S4

2008-02-11 Thread Robin Hankin
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 and Neutral Theorist, National Oceanography Centre, Southampton European Way

Re: [R] Appell Hypergeometric function

2008-02-07 Thread Robin Hankin
> 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 and Neutral Theorist, National Oceanography Ce

[R] "=" in functions and matlab (was: Multiplying each row of a big matrix with a vector)

2008-01-30 Thread Robin Hankin
t? > > Can anyone tell me how to correct that? > > Regards, > > > > - > > [[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/li

Re: [R] An "R is slow"-article

2008-01-09 Thread Robin Hankin
> skype:gustaf_rydevik > > __ > 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-containe

Re: [R] array addition

2007-12-21 Thread Robin Hankin
s[[1]] b <- args[[2]] dima <- dim(a) dimb <- dim(b) stopifnot(length(dima) == length(dimb)) out <- array(0, pmax(dima, dimb)) return(do.call("[<-", c(list(out), lapply(dima, seq_len), list(a))) + do.call("[<-", c(li

[R] array addition

2007-12-19 Thread Robin Hankin
468 10 > x2 [,1] [,2] [,3] [1,]147 [2,]258 [3,]369 > x [,1] [,2] [,3] [,4] [,5] [1,]27 1279 [2,]49 148 10 [3,]36900 > Note the zeros at lower-right. Is there a ready-ma

Re: [R] can R solve these paired equations

2007-12-17 Thread Robin Hankin
> A(1+(1-x)*(1+y)/x-A))=B > > > > > > [[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-projec

Re: [R] Matrix Inversion

2007-12-12 Thread Robin Hankin
ways to find more information about why it is singular? > > Thanks. > __ > 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, s

Re: [R] rowSums() and is.integer()

2007-11-21 Thread Robin Hankin
s no > coercion per se. > >> However, one advantage of coercion is to avoid integer overflow. > > Indeed, as I told Robin Hankin privately, that was the design reason. > Brian Ripley also reminded me that the sum() of integers is an integer, behaviour that I find desirable. T

Re: [R] All nonnegative integer solution

2007-11-19 Thread Robin Hankin
__ > 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. -- Robin Hankin Uncertainty A

Re: [R] R det

2007-11-19 Thread Robin Hankin
ide 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] creating discretized data

2007-11-16 Thread Robin Hankin
didn't get it. Any help? Thanks > > Ilham > > [[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-pro

Re: [R] rowSums() and is.integer()

2007-11-12 Thread Robin Hankin
On 10 Nov 2007, at 07:32, Prof Brian Ripley wrote: > On Fri, 9 Nov 2007, Robin Hankin wrote: > >> Hi >> >> [R-2.6.0, macOSX 10.4.10]. >> >> The helppage says that rowSums() and colSums() >> are equivalent to 'apply' with 'FUN = sum

[R] rowSums() and is.integer()

2007-11-09 Thread Robin Hankin
ums() returns a float. Why is this? -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-he

Re: [R] "flipping" vector and matrix

2007-10-23 Thread Robin Hankin
er > > __ > 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,

Re: [R] "flipping" vector and matrix

2007-10-23 Thread Robin Hankin
anks > > Rainer > > __ > 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-containe

Re: [R] create diagonal matrix within a for cycle

2007-10-23 Thread Robin Hankin
__ > 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,

Re: [R] Multiply a 3D-array by a vector (weighted combination of matrices)

2007-10-17 Thread Robin Hankin
gt; __ > 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, reproduci

Re: [R] reference for logistic regression

2007-10-11 Thread Robin Hankin
because of A" which is pretty much what the standard deviation page says. Is this what you meant? -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 __ R-

Re: [R] rearrange data columns

2007-10-11 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

Re: [R] Multivariate chi-square distribution function

2007-10-10 Thread Robin Hankin
puter Engineering, > Texas A&M University, > College Station, TX > > __ > 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 comme

Re: [R] Question about Distinguishable Permutation

2007-10-09 Thread Robin Hankin
quot;, "combinat", and "partitions" include related functionality. However, none of these (AFAICS) solves your problem, which is now on my Things To Do List [don't hold your breath]. What is your application? > > Thank you So much. -- Robin Hankin Uncertain

Re: [R] error installing gsl pkg

2007-10-03 Thread Robin Hankin
> tia, Randy > [[alternative HTML version deleted]] > > __ > 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 >

Re: [R] Sweave: tables vs matrices

2007-09-14 Thread Robin Hankin
I can't think of a way to arrange things so that: (i) I have only one set of numbers to maintain, and (ii) an NA appears as a "-" in the LaTeX table. best wishes rksh On 14 Sep 2007, at 09:52, Gavin Simpson wrote: > On Fri, 2007-09-14 at 09:34 +0100, Robin Hankin wrote: &g

[R] Sweave: tables vs matrices

2007-09-14 Thread Robin Hankin
2, NA, NA, 2 ),byrow=TRUE,nrow=4) jj <- rbind(jj,apply(jj,2,sum,na.rm=TRUE)) jj <- cbind(jj,apply(jj,1,sum,na.rm=TRUE)) jj @ -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-

[R] vectorize a matrix conversion

2007-09-12 Thread Robin Hankin
print(c(i,j,k)) Y[k,i] <- X[i,j] Y[k,j] <- X[j,i] } k <- k+1 } } -- Robin Hankin Uncertainty Analyst National Oceanography Centre, Southampton European Way, Southampton SO14 3ZH, UK tel 023-8059-7743 ___

Re: [R] Passing parameters to 'optim' fn function

2007-09-12 Thread Robin Hankin
t; 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, Sou