Thanks for the correction Gabor. I am still new to R.
Gabor Grothendieck wrote:
>
> forecast must be quoted:
>
> install.packages("forecast")
>
> and in this case its actually part of the forecasting bundle so we
> could also do this:
>
> install.packages("forecasting")
>
> Look at ?install
I am looking for the most efficient way to replace all occurrences of NaN in a
data frame with NA. I can do this with a double loop, but it seems that there
should be a higher level and more efficient way. With is.na, I could use
ifelse, but if.nan seems not to have similar capabilities.
T
try this:
dat <- data.frame(x = rnorm(10), y = rnorm(10),
z = rnorm(10), g = gl(5,2))
dat$x[sample(10, 3)] <- NaN
dat$y[sample(10, 3)] <- NaN
dat$z[sample(10, 3)] <- NaN
dat[] <- lapply(dat, function(x){
x[is.nan(x)] <- NA
x
})
I hope it helps.
Best,
Dimitris
Peck, Jon wrote:
I
Peck, Jon spss.com> writes:
>
> I am looking for the most efficient way to replace all occurrences of NaN in a
data frame with NA. I can do this
> with a double loop, but it seems that there should be a higher level and more
efficient way. With is.na, I
> could use ifelse, but if.nan seems not
Michael Braun MIT.EDU> writes:
>
> I have some data that is split into two groups: some "actual" data,
> and some simulated data, generated from several different models. The
> actual data come from two different datasets (calibration and
> holdout), and the simulations were calibrated o
Jean-Pierre Bresciani tuebingen.mpg.de> writes:
> is there a specific/appropriate function/package to perform post hoc tests
> when running a two way repeated measures anova? I'm looking for something
> that will be equivalent to the 'TukeyHSD()' for between subjects anova (with
> 'aov()'). For o
Thank you again, Stas. Indeed, treating both as random variables and taking the
expansion of Y/N gives the more general expression for the variance. Now, what
I see in this new expression is that when cluster sizes are all the same, there
is no covariance between Y and N and then the variance re
Having spent the last few weeks trying to decipher R, I feel I may finally be
getting somewhere, but i'M still in need of some advice and all my tutors seem
to be on holiday!
Basically a bit of background, I have data collected on a population of Lizards
which includes age,sex, and body condit
On Fri, Aug 15, 2008 at 7:57 AM, Liaw, Andy <[EMAIL PROTECTED]> wrote:
> I couldn't resist, either...
>
>> From: Henrik Bengtsson
>>
>> Hmm,
>>
>> couldn't resists:
>>
>> > X <- NA
>> > is.logical(X)
>> [1] TRUE
>> > (X == TRUE)
>> [1] NA
>>
>> > "==.MaybeNA" <- function(e1, e2) { !is.na(e1) && (e1
On Sat, 16 Aug 2008, Brown, Heidi wrote:
Having spent the last few weeks trying to decipher R, I feel I may
finally be getting somewhere, but i'M still in need of some advice and
all my tutors seem to be on holiday!
Basically a bit of background, I have data collected on a population of
Liza
Hi Jon,
Here's one way.
> x <- c(1,2,3,4,NaN)
> y <- c(1,2,NaN,4,5)
>
> myDF <- data.frame(x,y)
> myDF
x y
1 1 1
2 2 2
3 3 NaN
4 4 4
5 NaN 5
>
> myDF[ is.na(myDF) ] <- NA
> myDF
x y
1 1 1
2 2 2
3 3 NA
4 4 4
5 NA 5
Cheers,
Bob
=
Check your tectonic plates. You may have been using predict() to get those
figures.
--- On Fri, 8/15/08, John P. Burkett <[EMAIL PROTECTED]> wrote:
> From: John P. Burkett <[EMAIL PROTECTED]>
> Subject: Re: [R] map("state" ...) Is the USA cracking up?
> To: R-help@r-project.org
> Received:
> <[EMAIL PROTECTED]>
> on Fri, 15 Aug 2008 00:51:56 +0100 writes:
> Im using the edcf function to look at a number of
> empirical distributions graphically for run-time analyses
> of stochastic optimization algorithms. When dealing with
> problems where the optimal
Thank you very much Dr. Brian -- I appreciate your response. I
understand the idea of building the constraints into the equation but
my problem is that i have to deal with potentially hundreds of dummy
variables, and I want the sum of their estimates to equal zero, so LS
can be fitted with an inter
Good day,
A function is used on a database with 50 rows and 200 collumns. every row is 1
seperate study that the function should run through. Desired outcome are [x,y]
and a weight for that coordinate.
I have problems with generating x.
## Generating random time or x coordinate (through
Try this:
is.na(DF) <- is.na(DF)
or this which returns a transformed data frame without
overwriting DF:
replace(DF, is.na(DF), NA)
On Fri, Aug 15, 2008 at 10:27 PM, Peck, Jon <[EMAIL PROTECTED]> wrote:
> I am looking for the most efficient way to replace all occurrences of NaN in
> a data fram
I'd like a little advice as to when it's appropriate to create an
R-package and submit it, as opposed to just providing the source to some
simple code.
In this case, I've written a function that draws a line plot (with
options for points, etc) where the color of the line changes at
specified va
Hi,
the argument use should be: use="p" (for pairwise complete obs.)
Daniel
-
cuncta stricte discussurus
-
-Ursprüngliche Nachricht-
Von: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Im
Auftrag von rcoder
Gesendet: Friday, August 15, 200
On 16/08/2008 1:54 PM, Carl Witthoft wrote:
I'd like a little advice as to when it's appropriate to create an
R-package and submit it, as opposed to just providing the source to some
simple code.
In this case, I've written a function that draws a line plot (with
options for points, etc) where t
Dieter:
Thank you for your response. As you requested, I created a self-
running example, pasted below. It may be a little wordier than I
would like, but it runs.
The data I am creating assumes that there are two datasets ("calib"
and "hold"), with actual values actual.calib and actual.hol
Dieter Menne wrote:
Jean-Pierre Bresciani tuebingen.mpg.de> writes:
is there a specific/appropriate function/package to perform post hoc tests
when running a two way repeated measures anova? I'm looking for something
that will be equivalent to the 'TukeyHSD()' for between subjects anova (with
Gabor Grothendieck gmail.com> writes:
> is.na(DF) <- is.na(DF)
I knew you would win the shortest competition. I missed you at the useR meeting.
Dieter
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read th
Dear All:
I need some guidance in calculating a goodness-of-fit statistic for a Tobit
Regression model.
To develop the Tobit regression, I used the tobit() method from the AER
package, which is basically a simpler interface to the survreg() method.
I've read about pseudo R2 and C-index and wa
I am still struggling on how edit axes on a filled contour plot. I have
managed to figure out how to place labels on the key of this graph but how
to place the axes I want on this plot still eludes me. This command produces
the plot I am looking for however as mentioned before these axes only go
f
Dear all,
Recently I am generating large random samples (10M) and any duplicated
numbers are not desired.
We tried several RNGs in R and found Wichmann-Hill did not produce
duplications.
The duplication problem is the interesting birthday problem. If there are
M possible numbers, randomly d
Thanks for all the suggestions. The last one is certainly minimalist!
On Aug 16, 1:20 pm, Dieter Menne <[EMAIL PROTECTED]> wrote:
> Gabor Grothendieck gmail.com> writes:
>
> > is.na(DF) <- is.na(DF)
>
> I knew you would win the shortest competition. I missed you at the useR
> meeting.
>
> Diete
Hi Daniel,
Thanks for your reply. I experimented with various options since my poet and
eventually tried use="pairwise.complete.obs" which seemed to do the trick.
Thanks,
rcoder
Daniel Malter wrote:
>
> Hi,
>
> the argument use should be: use="p" (for pairwise complete obs.)
>
> Daniel
>
27 matches
Mail list logo