Re: [R] sampling from data.frame

2008-12-02 Thread Charles C. Berry
On Wed, 3 Dec 2008, axionator wrote: Hi all, I have a data frame with clustered rows as follows: Cu1 x1 y1 z1 ... Cu1 x2 y2 z2 ... Cu1 x3 y3 z3 ... # end of first cluster Cu1 Cu2 x4 y4 z4 ... Cu2 x5 y5 z5 Cu2 ... # end of second cluster Cu2 Cu3 ... ... cluster-size is 3 in

Re: [R] Help with maps

2008-12-02 Thread Ray Brownrigg
On Wed, 03 Dec 2008, Avram Aelony wrote: On Tuesday, December 02, 2008, at 04:40PM, hadley wickham [EMAIL PROTECTED] wrote: On Tue, Dec 2, 2008 at 6:21 PM, Avram Aelony [EMAIL PROTECTED] wrote: A few questions about maps... (1) How can I find a listing of the internal data sets that

Re: [R] Help with maps

2008-12-02 Thread Ray Brownrigg
On Wed, 03 Dec 2008, Ray Brownrigg wrote: The easiest way would be: map('world', regions=UK, xlim=c(-10, 5), ylim=c(48, 60)) But of course: map('world', regions=c(UK, Ireland), xlim=c(-10, 5), ylim=c(48, 60)) might be more appropriate. HTH Ray Brownrigg MSCS, Victoria University of

Re: [R] help on tapply using sample with differing sample-sizes

2008-12-02 Thread Charles C. Berry
On Tue, 2 Dec 2008, Jourdan Gold wrote: Hello, My question likely got buried so I am reposting it in the hopes that someone has an answer. I have thought more about the question and modified my question. I hope tha But apparently, you have not read the posting guide

[R] [R-pkgs] Rcpp package relaunched

2008-12-02 Thread Dirk Eddelbuettel
New Rcpp versions 0.6.0 and 0.6.1 - The Rcpp package provides C++ classes that greatly facilitate interfacing C or C++ code in R packages using the .Call() interface provided by R. Rcpp provides matching C++ classes for a large number of basic R

[R] Create unique sets of 3 from a vector of IDs?

2008-12-02 Thread philozine
Dear all: This is one of those should be easy problems that I'm having great difficulty solving. I have a vector containing ID codes, and I need to generate a 3-column matrix that contains all possible combinations of three. For example, my ID vector looks like this: A B C D E I need to

Re: [R] Create unique sets of 3 from a vector of IDs?

2008-12-02 Thread Dylan Beaudette
On Tue, Dec 2, 2008 at 7:42 PM, philozine [EMAIL PROTECTED] wrote: Dear all: This is one of those should be easy problems that I'm having great difficulty solving. I have a vector containing ID codes, and I need to generate a 3-column matrix that contains all possible combinations of three.

[R] Taking slices with tensorA

2008-12-02 Thread John Tillinghast
I've set up a simple tensor with indices 'a' and 'b'. ftable(B) b u v w x y a a1 0.001868954 0.403345197 0.030088185 0.137252368 0.142634612 a2 0.396935972 0.945219795 0.068828465 0.314180585 0.446338719 a3 0.752412200 0.748810918

Re: [R] Bug in transform?

2008-12-02 Thread hadley wickham
The underlying issue is actually not in transform() but in data.frame(): aq - airquality[sample(1:153,6),] data.frame(aq, list(a=1,b=2)) Error in data.frame(aq, list(a = 1, b = 2)) : arguments imply differing number of rows: 6, 1 data.frame(aq, list(a=1)) Ozone Solar.R Wind Temp Month

Re: [R] Taking slices with tensorA

2008-12-02 Thread Gabor Grothendieck
There is section on argument matching in ?[ On Tue, Dec 2, 2008 at 10:49 PM, John Tillinghast [EMAIL PROTECTED] wrote: I've set up a simple tensor with indices 'a' and 'b'. ftable(B) b u v w x y a a1 0.001868954 0.403345197 0.030088185

[R] Null values In R.

2008-12-02 Thread paul murima
Hi everyone. I am having problems with NULL values. I understand in R one can command the program to skip null values. Can some one help me on the command line for that. Do i enter is as part of the string in: a- read.table(filename.csv, header = T, row.names=1, sep=,); My problem is largely

Re: [R] Create unique sets of 3 from a vector of IDs?

2008-12-02 Thread G. Jay Kerns
Dear Brandon, On Tue, Dec 2, 2008 at 10:46 PM, Dylan Beaudette [EMAIL PROTECTED] wrote: On Tue, Dec 2, 2008 at 7:42 PM, philozine [EMAIL PROTECTED] wrote: Dear all: This is one of those should be easy problems that I'm having great difficulty solving. I have a vector containing ID codes,

Re: [R] Null values In R.

2008-12-02 Thread Daniel Malter
Hi, for your cor() command you will want to specify the use argument as either complete.obs or as pairwise.complete.obs. The difference between the two is that the former only uses those observations for which ALL information in a is available, whereas the latter uses information that is available

[R] XML-RPC

2008-12-02 Thread Stavros Macrakis
It looks like the xml and httpRequest libraries provide the necessary building blocks for writing an XML-RPC client. Has anyone done this? I'd like to benefit from your experience (or code!). Thanks, -s [[alternative HTML version deleted]]

Re: [R] Create unique sets of 3 from a vector of IDs?

2008-12-02 Thread Kingsford Jones
However, I believe Brandon was trying to get the permutations of size 3, rather than combinations. Dylan provided a solution including repeats. Here's one without: library(gtools) permutations(5, 3, LETTERS[1:5]) [,1] [,2] [,3] [1,] A B C [2,] A B D [3,] A B E [4,] A C B

Re: [R] Create unique sets of 3 from a vector of IDs?

2008-12-02 Thread G. Jay Kerns
Dear Kingsford, You are quite right, my mistake: urnsamples(ID, size = 3, replace = FALSE, ordered = TRUE) Thanks. Jay On Wed, Dec 3, 2008 at 12:04 AM, Kingsford Jones [EMAIL PROTECTED] wrote: However, I believe Brandon was trying to get the permutations of size 3, rather than combinations.

Re: [R] Null values In R.

2008-12-02 Thread Dieter Menne
paul murima wrote: My problem is largely when i attempt to use correlation for my data... xcc - cor(a); The error i get is as follows Error in cor(a) : missing observations in cov/cor As Daniel suggested, it is always best to use the function's parameter to handle NULLs. In

Re: [R] Create unique sets of 3 from a vector of IDs?

2008-12-02 Thread philozine
Dear all: These solutions work beautifully. Many, many thanks. And apologies for my lazy language! I did indeed mean permutations Best regards, Brandon --- On Wed, 12/3/08, G. Jay Kerns [EMAIL PROTECTED] wrote: From: G. Jay Kerns [EMAIL PROTECTED] Subject: Re: [R] Create unique sets

<    1   2