Re: [R] using complete.cases() with nested factors

2008-09-04 Thread hadley wickham
On Thu, Sep 4, 2008 at 4:19 PM, Ken Knoblauch [EMAIL PROTECTED] wrote: Andrew Barr wabarr at gmail.com writes: This maybe a newbie question. I have a dataframe that looks like the sample at the bottom of the email. I have monthly precipitation data from several sites over several years.

Re: [R] using complete.cases() with nested factors

2008-09-04 Thread Gabor Grothendieck
See ?subset and ?ave and try this: subset(DF, ave(year, year, FUN = length) == 12) On Thu, Sep 4, 2008 at 5:04 PM, Andrew Barr [EMAIL PROTECTED] wrote: Hello, This maybe a newbie question. I have a dataframe that looks like the sample at the bottom of the email. I have monthly

Re: [R] modeling interval data, a.k.a. irregular timeseries

2008-09-04 Thread Rolf Turner
It seems to me you that have a sequence (``series'') of random times, rather than a sequence of values of a random variable observed at a irregularly spaced times. Hence I would say that point process modelling, rather than time series modelling, would be more appropriate. You could

Re: [R] (with subject)

2008-09-04 Thread Gabor Grothendieck
I assume the problem is that you want the axis to have all 12 months but your data is much shorter. Try this: mos - seq(as.Date(2008-01-01), length = 12, by = month) plot(range(mos), range(rawData$y), type = n, xaxt = n) lines(rawData$Date, rawData$y) axis(1, mos, month.abb) On Thu, Sep 4,

[R] how to deal with NaN in boot object

2008-09-04 Thread Jinsong Zhao
Hi there, I use boot() to do bootstrap simulation on my statistic, I get a boot object, named obj. For certain reasons, there are some NaN in obj$t. Now, I hope to get confidence interval using boot.ci(), it give the following error: Error in if (const(t, min(1e-08, mean(t)/1e+06))) { :

Re: [R] isoMDS and dist

2008-09-04 Thread stephen sefick
I don't know for sure about isoMDS, but package vegan is a good place to start with a very good viginette. Stephen On Thu, Sep 4, 2008 at 5:02 PM, Carolyn A. Pucko [EMAIL PROTECTED] wrote: I am starting with a matrix in which rows are vegetation plots and columns are various characteristics

[R] help for color parameter

2008-09-04 Thread Zheng Lu
Dear all: I attached the dataset with this email and post codes as below. My questions is related to the 'col=temp.col' for the line and pch in my code, I have 4 IDs, 10 DIDs and each ID include different DIDs, for example, first ID has 3 DIDs, then the color is the first three

[R] algorithm to create unique identifiers

2008-09-04 Thread Ralph S.
Hi all, I am trying to create a unique identifier for each row, combining numbers from three columns. Do you know if there is a general formula to do this (or some manual where I can read about this)? I figure I can use the numeric entries of the columns as coordinates and multiply them

[R] Derived classes

2008-09-04 Thread rkevinburton
Coming from a C++ and C# background I would like to know how inheritance works with 'R'. The classical example is I can define an abstract class 'Shape' and have an array of 'Shape's but each instance could be a Circle, Square, Triangle, etc. because they all derive from 'Shape'. At runtime if

Re: [R] algorithm to create unique identifiers

2008-09-04 Thread Henrik Bengtsson
On Thu, Sep 4, 2008 at 8:44 PM, Ralph S. [EMAIL PROTECTED] wrote: Hi all, I am trying to create a unique identifier for each row, combining numbers from three columns. Do you know if there is a general formula to do this (or some manual where I can read about this)? I figure I can use

[R] smoothing with the Gaussian kernel

2008-09-04 Thread dxc13
useR's, Does anyone know what function or package allows one to specify use of the Gaussian kernel to smooth a data set, or is this just the default for most functions? Thanks, dxc13 -- View this message in context:

Re: [R] Maximum likelihood estimation

2008-09-04 Thread toh
Yes I'm trying to optimize the parameters a, b, p and lambda where a 0, b 0 and 0 p 1. I attached the error message that I got when I run mle. t - c(1:90) y - c(5,10,15,20,26,34,36,43,47,49,80,84,108,157,171,183,191,200,204,211,217,226,230, +

[R] library/function that estimates parameters of well known distributions from empirical data?

2008-09-04 Thread Ted Byers
I found this a few months ago, but for the life of me I can't remember what the function or package was, and I have had no luck finding it this week. I have found, again, the functions for working with distributions like Cauchy, F, normal, c., and ks.test, but I have not found the functions for

[R] Trouble with R CMD check: I can't seem to get dependencies right (maybe I'm using R_LIBS incorrectly?)

2008-09-04 Thread Dylan Arena
Hi there, I'm in the following directory: ~/Documents/Rstuff/diceFiles/dice_1.1 The directory dice is in this directory, with all the usual build files (DESCRIPTION, NAMESPACE, etc). I'm trying to run the following command: R CMD check dice (where dice is the name of the package I'm

Re: [R] algorithm to create unique identifiers

2008-09-04 Thread Christos Hatzis
It might be an overkill for what you need, but take a look at package Ruuid. -Christos -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Ralph S. Sent: Thursday, September 04, 2008 11:44 PM To: r-help@r-project.org Subject: [R] algorithm to create

[R] how to write a escape sequences in to a file

2008-09-04 Thread Kurapati, Ravichandra (Ravichandra)
Hi Str1-hai Str2-hru I want to write these 2 strings in a file separated by newline. How can I get this. Thanks K.Ravichandra [[alternative HTML version deleted]]

Re: [R] Derived classes

2008-09-04 Thread Gabor Grothendieck
Try this: # constructor for Square makeSquare - function(name, side) structure(list(name = name, side = side), class = c(Square, Shape)) # generic getName - function(shape) UseMethod(getName) # Shape method getName.Shape - function(shape) shape$name # generic getArea - function(shape)

<    1   2