Its not clear from your post which of the tests does not give you
the desired output and what the desired output is in that case.
Just guessing but maybe you meant to use testlist[[i]] instead of testlist[i] in
the loop?
On 5/26/06, Jason Barnhart <[EMAIL PROTECTED]> wrote:
> Hello,
>
> Simply p
Hello,
Simply put, I'm trying to call a function "testme" with value "age=NA". I
wish to use "dotlist<-list(...)" inside the function and have dotlist become:
$age
[1] NA
I'm modifying existing code and need to minimize changing that code so it's
easiest to conform
how I call the existing f
Hi,
I am going to be attempting a build of R for the alphas (our
main need is to collate and present graphically, performance metrics we
gather on our applications).
We have:
CC=cc, CXX=cxx, Fortran V5.51 (f77, f95), GNU make 3.80, Perl 5.8.4
I am hesitant to rebuild GCC on this platform
Try closeAllConnections()
On 5/26/06, Omar Lakkis <[EMAIL PROTECTED]> wrote:
> This may be more of an OS question ...
> I have this call
>
> r = get.hist.quote(symbol, start= format(start, "%Y-%m-%d"), end=
> format(end, "%Y-%m-%d"))
> which does a url request
>
> in a loop and my program runs out
"Omar Lakkis" <[EMAIL PROTECTED]> writes:
> This may be more of an OS question ...
> I have this call
>
> r = get.hist.quote(symbol, start= format(start, "%Y-%m-%d"), end=
> format(end, "%Y-%m-%d"))
> which does a url request
>
> in a loop and my program runs out of file handlers after few hundred
This may be more of an OS question ...
I have this call
r = get.hist.quote(symbol, start= format(start, "%Y-%m-%d"), end=
format(end, "%Y-%m-%d"))
which does a url request
in a loop and my program runs out of file handlers after few hundred
rotations. The error message is: 'Too many open files'.
On 5/26/06, Omar Lakkis <[EMAIL PROTECTED]> wrote:
> This is a simple R.oo question but I, thankfully, hope that someone
> would explain it to me so I would better understand this work frame.
> I create this class:
>
> setConstructorS3("MyExample", function(param=0) {
> print(paste("called with p
Rex Eastbourne wrote:
> Hi,
>
> I just started using R and am having trouble with the below error:
>
> I type:
>
>> df <- read.csv("/home/rex/Desktop/mytable.csv")
>
> which gives me what I want:
>
> ...
> 639 2006-05-26 16:46:54 4 16
> 640 2006-05-26 17:05:36 5 17
> 641 2006-05-26
Hi,
I just started using R and am having trouble with the below error:
I type:
> df <- read.csv("/home/rex/Desktop/mytable.csv")
which gives me what I want:
...
639 2006-05-26 16:46:54 4 16
640 2006-05-26 17:05:36 5 17
641 2006-05-26 17:30:48 6 17
But now I try:
> plot(df[4
This is a simple R.oo question but I, thankfully, hope that someone
would explain it to me so I would better understand this work frame.
I create this class:
setConstructorS3("MyExample", function(param=0) {
print(paste("called with param=", param))
extend(Object(), "MyExample",
.param = p
Try the following function to see if it does what you want. The basic
syntax for your example would be:
> tmp <- squishplot( xlim=c(-0.5,7), ylim=c(-0.5,2.8), asp=1 )
> plot(1:5, rep(1,5), xlim=c(-0.5,7), ylim=c(-0.5,2.8))
> par(tmp) # reset plotting region for future plots
The function definiti
I wrote:
> On p. 48 of "Statistics Complements" to the 3rd MASS edition,
> http://www.stats.ox.ac.uk/pub/MASS3/VR3stat.pdf
> I read that the orthogonal rotations of Z Lambda^-1 remain
> uncorrelated, where Z is the PC and Lambda is the diag matrix of
> singular values. However, the example below th
Try this:
set.seed(1)
r <- .1
n <- 5
test <- data.frame(sp = paste("sp", 1:n, sep = ""), x= rnorm(n), y = rnorm(n))
r <- 1 # radius
f <- function(i) cbind(orig = test[i,1], subset(test, (x - x[i])^2 +
(y - y[i])^2 < r^2))
do.call("rbind", lapply(1:n, f))
On 5/26/06, zhang jian <[EMAIL PROTECTED]
I am sure there are several ways of doing this but how about something like
this:
y <- c(NA,NA,10,NA,2,NA,NA,1,NA,NA)
x <- c(10,20,30,40,50,60,70,80,85,100)
tail(x[!is.na(y)], 1)
or
rev(x[!is.na(y)])[1]
Rudimentary checks indicate that the second expression is much faster than
the first. Also
Thanks Ravi! That's probably more than what I need. I suppose I'll have
to get back to you for some more explanations but for now I'm trying to
apply the log-likelihood (likelihood) that you defined to the fitdistr
function or use the log-likelihood with optim().
Thanks again, that's really helpfu
I just upgraded to the latest ghostscript, AFPL 8.54. When I run the
R output through gs, I get
AFPL Ghostscript 8.54: Set UseCUEColor for UseDeviceIndependentColor
to work properly.
followed by a segfault. the resulting ghostscript file is incomplete
(no %%EOF). probably a ghostscript bug, bu
Is this what you want?
> x
[1] NA NA 10 NA 2 NA NA 1 NA NA
> y
[1] 10 20 30 40 50 60 70 80 85 100
> y[max(which(!is.na(x)))]
[1] 80
Andy
From: Anders Bjørgesæter
>
> Hello
>
> Is there a function to extract the position (i.e. row number or more
> desirable the value from another
R2.3.0, WinXP.
I am trying to fit the model
Y(t) = C1*exp(-exp(a)*t) + C2*exp(-exp(b)*t) - (C1+C2)*exp(-exp(c)*t)
to some pharmacokinetic data. The data derives from a single oral dose
of a drug. Does anyone know how to use peeling and/or other methods to
obtain good starting estimates of
Hello
Is there a function to extract the position (i.e. row number or more
desirable the value from another column with the same rownumber ) of
last number in a vector? This is done in a loop with 1000s of columns.
e.g.
vector/column.n: na,na,10,na,2,na,na,1,na,na
fixed column:10,20,30,40,50,6
Ciao,
you didn't provide lots of details so I'll try to
answer your questions with examples you can find
typing ?PP.test and ?ar. In general, when you run a
command in R you get an output. You just need to
understand what kind of object you get. For the
PP.test
> x <- rnorm(1000)
> pp <- PP.test(x
I donot know how to do it remainly.
Perhaps my question is not clear.
For example,
test=data.frame(sp=paste(c("sp"),1:100,sep=""),x=rnorm(100),y=rnorm(100))
# I want to get the data in the circle of radius = 1 in every point, and I
want to add a sign (e.g. sp1,sp2) in order that I can disting
On Fri, 26 May 2006, John Fox wrote:
> Dear Zhang Jian,
>
> Is it possible that you're using a version of the Rcmdr package that's
> incompatible with your version of R?
That ought to have generated an error much earlier, but of course the
dependencies in an old version of Rcmdr might not have b
ok, i'll try to be more precise.
both functions i need (ar() and PP.test()) are in the package stats.
what i would like to do:
omega<-array(0, dim=c(N+1,7))
omega[1,]<-("series","mean","std","max","min","ar(1)coeff","stdar(1)")
for (i in (2:N+1)){
omega[i,1]<-i-1
omega[i,2]<-mean(y
Lorenzo,
in order to help you more, you should consider sending to the
list some relevant code with the functions and packages you
are using.
Rogerio.
- Original Message -
From: "Lorenzo Bencivelli" <[EMAIL PROTECTED]>
To:
Sent: Friday, May 26, 2006 1:21 PM
Subject: [R] how to pick a va
Hello,
Your mail to [EMAIL PROTECTED] was caught by the
SpamAssassin filter running on the bcs.org.uk mail system.
To confirm that your mail is genuine, please click this
link, or paste it into your browser:
https://bcsnet.bcs.org.uk/approve.php?c=66e3c8769c1611445312f4
You will not have to do t
Hola!
I am programming a class (S3) "symarray" for
storing the results of functions symmetric in its
k arguments. Intended use is for association indices
for more than two variables, for instance coresistivity
against antibiotics.
There is one programming problem I haven't solved, making an inver
Dear Zhang Jian,
Is it possible that you're using a version of the Rcmdr package that's
incompatible with your version of R?
(I won't have access to email this weekend, so will be unable to reply
until Monday to your response.)
I hope this helps,
John
On Fri, 26 May 2006 09:52:31 -0400
"zhang
i need to compute several (hundreds) of regression AR and PP.test for
untary roots.
is there an easy way to pick the values of interest from the output of
these operations?
i would like to fill a matrix (in a for cycle) with all the values of
coefficients, standard deviations, PP statistics and
Hi Aziz,
I am attaching a file that contains the functions that I wrote to compute
the MLE for a binary vonMises mixture, using the EM algorithm. It also
contains a simulation example. Let me know if you have any trouble.
Hope this is helpful,
Ravi.
Mike Wolfgang wrote:
> Dear list,
>
> My current R 2.2.0 in my linux desktop was installed by compiling sources,
> now I want to upgrade it to 2.3.0, is it possible to upgrade it without
> re-compiling sources? Thanks,
No, except if installing a binary distribution.
BTW: You might want to try an
Hi,
I'm still strugling with this copula model but this seems to be the way
to go. I'm now trying to model the marginal distributions and and for
wind direction I use a mixture of 2 von mises. I'd like to estimate all
the parameters (m1,m1,kappa1,kappa2,p) by maximizing the likelihood but
I don't
I am interested in a statistical comparison of multiple (5) time series'
generated from modeling software (Hydrologic Simulation Program Fortran). The
model output simulates daily bacteria concentration in a stream. The multiple
time series' are a result of varying our representation of the stre
Dear list,
My current R 2.2.0 in my linux desktop was installed by compiling sources,
now I want to upgrade it to 2.3.0, is it possible to upgrade it without
re-compiling sources? Thanks,
mike
[[alternative HTML version deleted]]
__
R-help@sta
I still can't see why this is a problem. If a 1x1 matrix should be
treated as a scalar, then it can just be wrapped in drop(), and the
arithmetic will be computed correctly by R.
Are there any cases where this cannot be done? More specifically, are
there any matrix algebra expressions where,
There is also the rotate.persp function in the TeachingDemos package.
It creates a set of slider bars that you can move with the mouse to
change the different options to persp including the angles. It is not
quite as convenient as clicking in the plot and dragging like rgl
allows, but it does have
Thank you to Prof Ripley, Gabor Grothendieck, Dirk Eddelbuettel and
others who emailed with suggestions and comments.
Dr Ripley's suggestion that I reinstall appears to have fixed the
problem, though I confess I have upgraded only to 2.3.0 rather than the
beta 2.3.1. I use Windows XP Pro, Service
Hello,
I have been using two different implementations of the stochastic
gradient boosting (Friedman 2002) : MART(tm) with R and the gbm package.
Both are fairly comparable except that the MART with R systematically
strongly (depending on the dataset though) outperforms the gbm tool in
terms of
I can load the package in other R file, but I can not do it in the file.
How to solve the question?
> local({pkg <- select.list(sort(.packages(all.available = TRUE)))
+ if(nchar(pkg)) library(pkg, character.only=TRUE)})
Loading required package: tcltk
Loading required package: car
Error in parse(f
Hello,
I tried two different implementations of the stochastic gradient
boosting (Friedman 2002) : the MART(tm) with R tool
(http://www-stat.stanford.edu/~jhf/R-MART.html) and the gbm R package.
To me, both seemed fairly comparable, except maybe regarding the
different loss criterion proposed a
Dear Peter,
OK -- I see that this works as advertized.
Thanks,
John
On Fri, 26 May 2006 07:12:52 -0600
P Ehlers <[EMAIL PROTECTED]> wrote:
> No, I don't think so, John. I think what I proposed is
> Deepayan's newer way of setting parameters. I used to do it the
> other way, too (S-PLUS may sti
[EMAIL PROTECTED] wrote:
> Dear all,
>
> I am doing something wrong.
>
> I am trying to apply a formula for sample size calculation as in the book
> "Design and Analysis of Clinical Trials", from Chow et all.
>
> There a suggested sample size strategy uses the formula
>
> 0.30/0.45=F(0.80,2n,
LAURENS, Guillaume a écrit :
> Hi,
>
> I have a bug and I don't find it. Can u help me please.
>
> In attachement :
> - My script file : CPU_study.txt
> - My data sample file : a.txt
>
> When I use it, the error message is :
>> source("H:/R/_workspace/CPU_study_1.R")
> Erreur dans "[<-"(`*tmp*`
No, I don't think so, John. I think what I proposed is
Deepayan's newer way of setting parameters. I used to do it the
other way, too (S-PLUS may still need it), but I find this new
way very handy, since it avoids the get/save/alter/set process.
Try this:
trellis.device()
trellis.par.set(list(axi
On 5/26/2006 8:45 AM, LAURENS, Guillaume wrote:
> Hi,
>
> I have a bug and I don't find it. Can u help me please.
>
> In attachement :
> - My script file : CPU_study.txt
> - My data sample file : a.txt
>
> When I use it, the error message is :
>> source("H:/R/_workspace/CPU_study_1.R")
> Erreur
Dear all,
I am doing something wrong.
I am trying to apply a formula for sample size calculation as in the book
"Design and Analysis of Clinical Trials", from Chow et all.
There a suggested sample size strategy uses the formula
0.30/0.45=F(0.80,2n,2n)/F(0.025,2n,2n)
which gives n=96, as in t
Hi,
I have a bug and I don't find it. Can u help me please.
In attachement :
- My script file : CPU_study.txt
- My data sample file : a.txt
When I use it, the error message is :
> source("H:/R/_workspace/CPU_study_1.R")
Erreur dans "[<-"(`*tmp*`, i, k, value = numeric(0)) : rien à remplac
Thanks Spencer, that is interesting but I must say I'm a bit lost with
the terminology. I'll try to catch up but I'm not sure I need a
complicated model (MC sounds complicated to me but it may not be...). I
plan to use this reliability index just as an indication and I need to
compute it in batch
Dear R-help list readers,
I am fitting mixed models with the lme function of the nlme package.
If I get convergence depends on how the method (ML/REM) and which (and
how much) parameters will depend randomly on the cluster-variable.
How get the bist fit without convergence?
I set the paramet
Hello David and Spencer,
thank you for your replies!
The systemfit-package was exactly what I was looking for.
The only little drawback is, that the nonlinear systemfit does not
support predifined weights yet (in oder to ensure homegenity of
variances when predictios are hetescedastic)
Thanks a
On 5/26/2006 3:39 AM, Antonio, Fabio Di Narzo wrote:
> 2006/5/26, Michael <[EMAIL PROTECTED]>:
>> On 5/26/06, Uwe Ligges <[EMAIL PROTECTED]> wrote:
>>> Michael wrote:
>>>
Hi all,
I have a 2D matrix, which has 100 rows, and 100 columns,
I have a 2D matrix, with 100 rows and
Apple Ho writes:
> I am searching some information about simulating Strauss process in 3D
If you need this immediately, I suggest you follow Brian Ripley's advice.
This probably involves downloading a source tar file of the R package
and finding the Fortran code in library/spatial/src/. The Fort
> outer(c(20,40,20,60), c(5,4,2), "/")
[,1] [,2] [,3]
[1,]45 10
[2,]8 10 20
[3,]45 10
[4,] 12 15 30
cheers
D
On 26/05/06, Andrej Kastrin <[EMAIL PROTECTED]> wrote:
> Dear useRs,
>
> I have two different length vectors: one column (1...m) and one row
> vecto
?outer
> v1 <- c(20,40,20,60)
> v2 <- c(5,4,2)
> outer(v1,v2,'/')
[,1] [,2] [,3]
[1,]45 10
[2,]8 10 20
[3,]45 10
[4,] 12 15 30
>
On 5/26/06, Andrej Kastrin <[EMAIL PROTECTED]> wrote:
>
> Dear useRs,
>
> I have two different length vectors: one column (1...m
Andrej Kastrin wrote:
> Dear useRs,
>
> I have two different length vectors: one column (1...m) and one row
> vector (1...n):
>
> 20
> 40
> 20
> 60
>
> 5 4 2
>
> Now I have to calculate ratios between column vector elements and each
> row vector elements:
>
> 4 5 10
> 8 10 20
> 4 5 20
> 15 1
Dear useRs,
I have two different length vectors: one column (1...m) and one row
vector (1...n):
20
40
20
60
5 4 2
Now I have to calculate ratios between column vector elements and each
row vector elements:
4 5 10
8 10 20
4 5 20
15 12 30
Thank's in advance for any suggestions,
Andrej
_
Try an ordered factor:
subset(HR, ordered(Patient) > 214)
or
HR$Patient <- ordered(HR$Patient)
subset(HR, Patient > 214)
You might also check that it orders them in the way you want.
ordered(HR$Patient) in the first case or just HR$Patient in the
second case will display the data followed
Dear Peter,
Won't that wipe out the other components of axis.text, etc.?
Regards,
John
On Thu, 25 May 2006 06:22:22 -0600
P Ehlers <[EMAIL PROTECTED]> wrote:
>
> John Fox wrote:
>
> > Dear Emilie,
> >
> > This is, I guess, the effect() function in the effects package. If
> so,
> > note that
Andris Jankevics wrote:
> Hi all,
> I have a vector which contains many repeated values.
>
>
>>Z <- c(1,2,3,4,5,1,2,3,4,5,1,2,3,5,5,2,3,4,5)
>
>
> I need to know how many times each number in this vecetor is repeated.
> I can use a command like this:
>
>
>>table (cut(Z,seq(1,5,1)))
Why not
2006/5/26, Michael <[EMAIL PROTECTED]>:
>
> On 5/26/06, Uwe Ligges <[EMAIL PROTECTED]> wrote:
> >
> > Michael wrote:
> >
> > > Hi all,
> > >
> > > I have a 2D matrix, which has 100 rows, and 100 columns,
> > >
> > > I have a 2D matrix, with 100 rows and 100 columns,
> > >
> > > I want to display it
I'm trying to follow an example from ?clara, which plots two clusters:
> x <- rbind(cbind(rnorm(10,0,8), rnorm(10,0,8)),
cbind(rnorm(20,50,8), rnorm(20,50,8)))
> clarax <- clara(x, 2)
> clusplot(clarax)
Suppose I'd like to label these 30 observations on the plot according t
Hi all,
I have a vector which contains many repeated values.
>Z <- c(1,2,3,4,5,1,2,3,4,5,1,2,3,5,5,2,3,4,5)
I need to know how many times each number in this vecetor is repeated.
I can use a command like this:
> table (cut(Z,seq(1,5,1)))
(1,2] (2,3] (3,4] (4,5]
4 4 3 5
But ho
2006/5/26, Peter Ehlers <[EMAIL PROTECTED]>:
>
>
> Antonio, Fabio Di Narzo wrote:
>
> > Hi all.
> > On my R-2.3.0, calling:
> >
> >
> >>plot(1:5, rep(1,5), xlim=c(-0.5,7), ylim=c(-0.5,2.8), asp=1)
> >
> >
> > gives to me a plot (tried pdf and X11) whose y axis goes from about -2
> to
> > about 4.5
On 5/26/06, Uwe Ligges <[EMAIL PROTECTED]> wrote:
>
> Michael wrote:
>
> > Hi all,
> >
> > I have a 2D matrix, which has 100 rows, and 100 columns,
> >
> > I have a 2D matrix, with 100 rows and 100 columns,
> >
> > I want to display it using 3D plot, much like plot3d and mesh/surf
> functions
> > i
Michael wrote:
> Hi all,
>
> I have a 2D matrix, which has 100 rows, and 100 columns,
>
> I have a 2D matrix, with 100 rows and 100 columns,
>
> I want to display it using 3D plot, much like plot3d and mesh/surf functions
> in matlab.
>
> Specifically, in matlab, I just need to do the followin
Hi,
I know this is a bit off-topic, but I am quite puzzled. I am going
through several papers about aerosol physics and in this field you
often have determine the parameters of a distribution to match your
experimental data (one typically uses a Gaussian mixture).
However, in many cases people plot
65 matches
Mail list logo