I am using fft(x) to compute the fft of a real-valued sequence. This returns
(as expected an array of complex numbers. Is ther an R function to transform
these complex numbers into two arrays for the magnitude and phase? Basically
polar notation?
Thank you.
Kevin
_
Please read ?complex.
On Sun, 27 Jul 2008, [EMAIL PROTECTED] wrote:
I am using fft(x) to compute the fft of a real-valued sequence. This
returns (as expected an array of complex numbers. Is ther an R function
to transform these complex numbers into two arrays for the magnitude and
phase? Basi
Martin Maechler <[EMAIL PROTECTED]> a écrit :
"CG" == Christophe Genolini <[EMAIL PROTECTED]>
on Sat, 26 Jul 2008 12:12:12 +0200 writes:
CG> Martin Maechler <[EMAIL PROTECTED]> a écrit :
>>> "CG" == Christophe Genolini <[EMAIL PROTECTED]>
>>> on Tue, 22
Every time I issue a plot command it removes the current plot and replaces it
with the plot that I just issued. I would like to keep both plots. I looked in
the documentation and found plot.new but was unable to get it to work. I think
I want that functionality. Any suggestions?
Thank you.
Kev
Hi
I have a data frame, including x1, x2, x3, and y. I use lm() to fit
second-order linear model, like the following:
ft <- lm(y ~ x1 + x2 + x3 + I(x1 * x1) + I(x1 * x2) + I(x1 * x3) + I(x2
* x2) + I(x2 * x3) + I(x3 * x3), mydata)
if the independent variable number is large, the formula will be
On Sun, 27 Jul 2008, S Ellison wrote:
Looking at the legend() source the filled box line colour is hardcoded :
if (mfill) {
if (plot) {
fill <- rep(fill, length.out = n.leg)
rect2(left = xt, top = yt + ybox/2, dx = xbox, dy = ybox,
col = fill, densi
ur prog gives following result:
weighted.var(c(1,-1), c(0.5,0.5))
[1] 2
is it ok?
On Thu, Jul 24, 2008 at 7:57 PM, Gavin Simpson <[EMAIL PROTECTED]>wrote:
> On Thu, 2008-07-24 at 02:25 +0530, Arun Kumar Saha wrote:
> > There is a R function to calculate weighted mean : weighted.mean() under
> >
Hi,
I would like to know how to build the transfer function modeling for
bivariate time series data. I tried searching for relevant threads, but
could not find much help with it.
Thanks
Ashish
[[alternative HTML version deleted]]
__
R-
On Sun, 27 Jul 2008 05:00:48 +, Oliver M. Haynold wrote:
> I am using wireframe from the lattice package, with the shade option set
> to TRUE. When I output to PDF or Postscript, a line gets drawn around
> each polygon of my surface which causes ugly Moiré effects and doesn't
> make sense in my
(x1 + x2 + x3) ^2 will give you the main effects and the interactions.
So this will shorten your equation to
ft <- lm(y ~ (x1 + x2 + x3) ^2 + I(x1 * x1)+ I(x2 * x2) + I(x3 * x3),
mydata)
HTH,
Thierry
ir. Thierry Onke
Kevin,
Open a new plot window before plotting the second plot.
plot(rnorm(10), runif(10))
X11()
plot(rnorm(10), runif(10))
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Instit
Hi Jinsong and Thierry,
>> (x1 + x2 + x3) ^2 will give you the main effects and the interactions.
Although it wasn't specifically requested it is perhaps important to note
that (...)^2 doesn't expand to give _all_ interaction terms, only
interactions to the second order, so the interaction term
I feel there is something wrong in definition in weighted variance.
Say for a fair dice the variance of outcome should be : 2.92 (
http://en.wikipedia.org/wiki/Variance)
However if I use cov.wt() or weighted.var() by Gavin, I get :
cov.wt(as.data.frame(1:6), rep(0.6, 6))
$cov
1:6
1:6 3.5
$c
oh now I got, R is taking unbiased estimator, anyways thanks
On Sun, Jul 27, 2008 at 2:54 PM, Arun Kumar Saha
<[EMAIL PROTECTED]>wrote:
> I feel there is something wrong in definition in weighted variance.
>
> Say for a fair dice the variance of outcome should be : 2.92 (
> http://en.wikipedia.or
Thank you, Bill. I think I misread some text in my statistics handbook. This has
helped to clear it up. Sorry for taking up your time and thank you for replying.
M. Grace
Quoting [EMAIL PROTECTED]:
> The help file for dwtest says
>
> formula: a symbolic description for the model to be tested (or
There appears to be a very promising response surface package being discussed
at useR-2008, but I have been unable to find the package on CRAN or contact
the authors.
www.statistik.uni-dortmund.de/useR-2008/abstracts/Sztendur+Diamond.pdf
Tom
Jinsong Zhao wrote:
>
> Hi,
>
> Is there a pack
Hi,
I was wondering if anybody might have a reference for
me: My R code is growing and getting more and more
confusing. Thus, I figure it's time to switch to
object-oriented again. I have done oo programming in
C++ and Java before but the first few tutorial on R oo
were a bit confusing for me.
I
Tom La Bone wrote:
There appears to be a very promising response surface package being discussed
at useR-2008, but I have been unable to find the package on CRAN or contact
the authors.
www.statistik.uni-dortmund.de/useR-2008/abstracts/Sztendur+Diamond.pdf
Tom
Thanks for pointing me to this.
This message was also sent to the MEDSTATS mailing list, so here is the reply I
posted to that:
Philippe,
The machinery to use is to split follow-up time so finely that you can safely
assume that rates are constant in each interval, and then just stuff it all
into a Poisson model. This allows
On Sun, 27 Jul 2008, Paul Hiemstra wrote:
Hi,
One option is:
?spsample
- which implements most of Ripley (1981, reprinted 2004, ch.3), and for
even more choice, see functions in the spatstat package for point
patterns, and the spsurvey package.
Roger
cheers,
Paul
Raphael Saldanha sch
Dear Folks,
We need to fit the model y~x assuming there are random errors in both
x and y. Numerical Recipes (Press et al.) have two useful functions,
fitxy and fitexy, which handle cases of unspecified and specified
errors respectively.
Are there equivalent functions in base R or a ins
Is it possible to fit a structural equation model with link functions in R? I
am trying to build a logistic-regression-like model in sem, because
incorporating the dichotomous variables linearly seems inappropriate. Mplus
can do something similar by specifying a 'link' parameter, but I would like
Hi list,
I was using Sweave and was wondering if anyone has had any luck changing the
font colors of the code chunks. For instance, in my .Rnw preample I tried
including:
===
\usepackage[usenames]{colors}
\definecolor{darkred}{rgb}{0.545,0,0}
\definecolor{midnightblue}{rgb}{0.098,0.098,0.439}
\
Werner Wernersen <[EMAIL PROTECTED]> [Sun, Jul 27, 2008 at 01:55:26PM CEST]:
[...]
> Is there any brief tutorial on oo programming in R
> especially for people who have done oo in Java or C++
> before? That would be really helpful.
"How S4 methods work" highlights the differences between R's funct
> Is it possible to install your development version of reshape? I could not
> find it alongside of ggplot2 on github.
Not yet, but I'm working on it.
> If not, I've added "..." in the
> method for the current version and it seems to work for me.
Yes, that's the exact change I made.
Thanks!
Ha
On Sun, Jul 27, 2008 at 4:19 AM, Mark Difford <[EMAIL PROTECTED]> wrote:
>
> Hi Jinsong and Thierry,
>
>>> (x1 + x2 + x3) ^2 will give you the main effects and the interactions.
>
> Although it wasn't specifically requested it is perhaps important to note
> that (...)^2 doesn't expand to give _all_
Hi Matt
Your method is the easiest way for me to install the 64-bit R. I followed the
directions on your web site and then did the following:
R --arch=x86_64
source("http://bioconductor.org/biocLite.R";)
biocLite(type = "source",lib =
"/Library/Frameworks/R.framework/Versions/2.8/Resources/RL
Werner Wernersen wrote:
>
> I have done oo programming in C++ and Java before but the first few
> tutorial on R oo were a bit confusing for me.
>
My personal experience is that the type of OO programming that makes for
example Java code nice and easy to structure is not possible in R. The
bigg
I've never used it myself but I recall reading about this R.oo package a while
ago - might be worth considering?
http://www1.maths.lth.se/help/R/R.oo/
- Original Message
From: Werner Wernersen <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Sent: Sunday, July 27, 2008 4:55:26 AM
Subject: [R
I wrote an R program to fit a bivariate Poisson log-normal model. The
model is first proposed by Aitchison and Ho (1989) in Biometrika, Volume
76 pages 643-653. The model involves using a double integration. The
following is the program and the data that I used. My major problem was
that R was runn
This page is also a brief introduction to the S3 classes:
http://www.ibm.com/developerworks/linux/library/l-r3.html
(see section on 'Object-oriented R')
and for S4, in addition to "How S4 methods work":
http://developer.r-project.org/methodDefinition.html
- Original Message
From: Jo
Hi,
I have two time series, y and x. Diff(y) and Diff(x) both show no
autocorrelation. But durbin.watson(lm(Diff(y)~lag(Diff(x),k=-4)) gives a DW
value of zero. How come the residule is autocorrelated while Diff(y) and
Diff(x) are not? Does anyone know if in my case a DW of zero indicates
serial c
Hi Murali,
The plot function works on an "lm" object. The example from the help page of
lm.
Ritwik
ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14)
trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69)
group <- gl(2,10,20, labels=c("Ctl","Trt"))
weight <- c(ctl, trt)
anova(lm.D9
Hi Daniela,
Will the "optim" function with the method "L-BFGS-B" work for you?
Look for the "lower" argument in the function.
Ritwik
On Fri, Jul 25, 2008 at 9:07 AM, Daniela Garavaglia
<[EMAIL PROTECTED]> wrote:
>
> I'm looking for a R function which can maximise this logliklihood function,
> un
sem is package for pretty traditional covariance matrix analysis. To
deal with other members of exponential family than normal, you can
also look at GLLAMM package (http://www.gllamm.org) that works from
Stata. Or Mplus. Or you might have some luck building up a mixed model
for your purpose, see ?n
Dear Folks,
We need to fit the model y~x assuming there are random errors in both
x and y. Numerical Recipes (Press et al.) have two useful functions,
fitxy and fitexy, which handle cases of unspecified and specified
errors respectively.
Are there equivalent functions in base R or a ins
#I would like to interpolate a straight line between 06/08/06 04:16:00 -
06/08/06 20:31:00 with values and then sum them. This is an estimate of
ecosystem #respiration and I will be using this in a larger context(48 days
of these diurnal curves), but for right now I am just trying to figure out
h
Try this using your z and library(zoo):
# extract section of interest
w <- window(z, start=chron("6/8/6", "4:16:0"), end=chron("6/8/6", "20:31:0"))
# zap all interior points with NA's and then fill back in using linear
interpolation
lin <- na.approx(replace(w, time(w) > start(w) & time(w) < end(w
I continue to struggle with mixed models. The square zero version
of the problem that I am trying to deal with is as follows:
A number (240) of students are measured (tested; for reading
comprehension)
on 6 separate occasions. Initially (square zero) I want to treat the
test time as a facto
I'll address the question of whether you can use the bootstrap to
improve estimates, and whether you can use the bootstrap to "virtually
increase the size of the sample".
Short answer - no, with some exceptions (bumping / Random Forests).
Longer answer:
Suppose you have data (x1, ..., xn) and a s
Hi everyone,
I want to perform an operation on a matrx that outputs the product of
successive pairs of rows. For example: calculating the product between rows
1 & 2; 3 & 4; 5 & 6...etc.
Does anyone know of any readily available functions that can do this?
Thanks,
rcoder
--
View this message
Hello,
I am trying to convert english words to numeric equivalents, e.g., abc to 123.
Is there a function or library or package for doing this in R? If not, can it
be done easily in R?
Thanks,
Oscar
[[alternative HTML version deleted]]
___
Hi everyone,
Using the rolling regression function - rollingRegression(formula, data,
width, ...) - is there a way to output only selected coefficients to a
results matrix. For e.g. if I only wanted the slope coefficients to be
recorded, how would I go about doing this?
Thanks,
Michael
--
View
On 28/07/2008, at 12:32 PM, oscar Linares wrote:
Hello,
I am trying to convert english words to numeric equivalents, e.g.,
abc to 123. Is there a function or library or package for doing
this in R? If not, can it be done easily in R?
Your question is very ill-posed. What ``english word'
Dear R list:
I have a data set that I would like to bring it. The fourth column
shows as numeric, but I want it to be a factor. Is there a way to do
this from the read.table statement, or should I just wait and use the
factor function please?
thanks,
Edna Bell
_
On 28/07/2008, at 3:26 PM, Edna Bell wrote:
Dear R list:
I have a data set that I would like to bring it. The fourth column
shows as numeric, but I want it to be a factor. Is there a way to do
this from the read.table statement, or should I just wait and use the
factor function please?
Loo
HI:
I need ideas on how to make this code shorter (maybe with a second loop?).
The code as it is works, but in this case I only have 14 samples, but it
will become insane with more, so I need a way to make it more automatic. The
problem is that the output from ts1, ts2, and so on is a vector with m
Hi, all,
I am having trouble getting R to take pnm images via mogrify
i.e.
mogrify -resize 320x217 -format pnm *.png
However R via pixmap says that it can't read the file. If you have
any ideas like a package that can read jpeg files, etc., I would
appreciate it.
Best wishes,
Art Robert
See EBImage on Bioconductor.org. /Henrik
On Sun, Jul 27, 2008 at 10:21 PM, Arthur Roberts
<[EMAIL PROTECTED]> wrote:
> Hi, all,
>
> I am having trouble getting R to take pnm images via mogrify
>
> i.e.
>
> mogrify -resize 320x217 -format pnm *.png
>
> However R via pixmap says that it can't read t
Hello
I am using Sweave to generate some pdf reports using R on a Windows
platform and would like to control the output directory that the
generated .tex file goes to. Basically I use the following commands in
a batch file:
set outdir=c:/output/1234
Rscript -e Sweave('C:/pathpathpath/script.Rn
On Mon, 28 Jul 2008, [EMAIL PROTECTED] wrote:
Hello
I am using Sweave to generate some pdf reports using R on a Windows
platform and would like to control the output directory that the
generated .tex file goes to. Basically I use the following commands in
a batch file:
set outdir=c:/output/12
51 matches
Mail list logo