Francois (sorry can't type the right letter) , thanks a million for the
detailed response, you have really cool functions there !
Philippe : I will definitely follow your advice later, but I got some time
pressure from the current project, so have to go with the easy sol. now ,
thanks a
Hi,
Thanks a lot for your response, but it is strange that when I do attach()
, I got the follow error:
Error in attach(e) : attach only works for lists and data frames
Any suggestions on this?
tong
- Original Message -
From: Henrik Bengtsson [EMAIL PROTECTED]
Date: Monday,
Dear all R users,
Suppose I have a VECTOR of time series y[t] consists of 2000 data point. For
example suppose I have data frame which has two columns. First column
represents a time series of exchange rate for 2000 days. And the second column
represents the price of a commodity for the same
Not sure to really understand 1) . The makefile (available at
http://cran.r-project.org/doc/contrib/Makefile-rcb) use wget
--passive-ftp
http://www.stats.ox.ac.uk/pub/Rtools/mingw-cross5.tar.bz2; This version
seems to be the current, I am correct ? Note that :
[EMAIL
On Tue, 9 Jan 2007, Stéphane Dray wrote:
Not sure to really understand 1) . The makefile (available at
http://cran.r-project.org/doc/contrib/Makefile-rcb) use wget --passive-ftp
http://www.stats.ox.ac.uk/pub/Rtools/mingw-cross5.tar.bz2; This version
seems to be the current, I am correct ?
On Tue, 9 Jan 2007, Tong Wang wrote:
Hi,
Thanks a lot for your response, but it is strange that when I do attach()
, I got the follow error:
Error in attach(e) : attach only works for lists and data frames
Any suggestions on this?
Update your R, as the posting guide asked you to in
Happy New Year, dear useRs...and Linda.
I have a small toy-script that plots Taylor Diagrams for vectors, it is
not wonderful but may help...
perhaps you can change some details for your own needs.
It is far from optimization,... perhaps someone can do this and put it
into a package ?
Hope this
I have a question about constructing the likelihood function where there
is censoring at level 1 in a two-level random effects sum.
In a conventional solution, the likelihood function is constructed using
the density for failures and the survivor function for (in this case,
right) censored
Dear List,
I would appreciate help on the following matter:
I am aware that higher dimensional contingency tables can be analysed using
either log-linear models or as a poisson regression using a generalized linear
model:
log-linear:
loglm(~Age+Site, data=xtabs(~Age+Site, data=SSites.Rev,
Dear David,
Thank you very much for this reply. But unfortunately it is not that I want. In
my equation 'a' is a vector with length 2, 'b' and 'c' are matrix with row and
columns 2. It is like Vector Autoregressive model, but there is some difference
between that model and my model. Is there
Hello,
I was hoping for some advice in changing 2 defaults in a logistic regression.
1. It looks like the first category is the reference category? In the
following syntax 'where' has 4 levels, how can I make the reference
category the third category?
model- glm(cbind(sucesses, failures) ~
an option is to use ?relevel(), e.g.,
life.use$where. - relevel(life.use$where, 3)
model- glm(cbind(sucesses, failures) ~ where. + who + firstep +
dxnarrow +
age + sex + medyear, family = binomial, data = life.use)
print(model, digits = 1)
print(model, digits = 2)
print(model, digits
Hi all,
I want to write a wrapper for an analysis of variance and I face a curious
problem. Here are two different wrappers:
fun.1 - function(formula) {
summary(aov(formula))
}
fun.2 - function(formula) {
oneway.test(formula)
}
values - c(15, 8, 17, 7, 26, 12, 8, 11, 16, 9, 16,
oneway.test is using substitute on its arguments so its literally
getting formula rather than the value of formula. Try these:
fun.3 - function(formula) {
mc - match.call()
mc[[1]] - as.name(oneway.test)
eval.parent(mc)
}
fun.3(values ~ group)
fun.4 - function(formula) {
Unfortunatelly, i have to fill all the cells, with numbers..., so I need a
better machine, or i have to split the data for smaller
parts, but that way is much slower, but i see i dont have other alternative
way.
But thanx for your help, because i work with big networks too (1
vertex), and
On Tuesday 09 January 2007 15:14, Gabor Grothendieck wrote:
oneway.test is using substitute on its arguments so its literally
getting formula rather than the value of formula.
Ah-haa... I understand now. Thanks for the tips, they both work as expected.
Best,
Adrian
Try these:
fun.3 -
oneway.test expects a literal formula, not a variable containing a
formula. The help page says
formula: a formula of the form 'lhs ~ rhs' where 'lhs' gives the
sample values and 'rhs' the corresponding groups.
Furthermore, if you had
foo.2 - function() oneway.test(value ~ group)
Not sure about R, but for a Perl example check
http://yosucker.sourceforge.net/ .
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tudor Bodea
Sent: Monday, January 08, 2007 11:53 AM
To: r-help@stat.math.ethz.ch
Cc: Tudor Bodea
Subject: [R] Access,
On Tuesday 09 January 2007 15:41, Prof Brian Ripley wrote:
oneway.test expects a literal formula, not a variable containing a
formula. The help page says
formula: a formula of the form 'lhs ~ rhs' where 'lhs' gives the
sample values and 'rhs' the corresponding groups.
Hi R-friends
I don´t know why the min() function below return the min value as factor.
When i force the aicc.min using a as.numeric() function, it return a factor
index (1,2,..) and not min value as I want. By the way, I included a
sessionInfo() at the end of this e-mail.
In fact I
Thanks Brian
The new version fixed the problem.
Prof Brian Ripley [EMAIL PROTECTED] wrote:
Please check you have the latest version of nlme (3.1-79), as some
restrictions of this sort were lifted a few weeks ago.
If you have, please note the advice about a minimal reproducible example
in
Why will the following command not work
sapply(objects(),dim)
What does it say about the objects list? What does it say about the dim
command?
Likewise, the following also does not work
all-ls()
for (f in all) print(dim(f))
--
Farrel Buchinsky
[[alternative HTML version deleted]]
Hello
I haev some .csv data files with missing values - eg below
1,'F','C04','X100',20.93,'C','B',7,8,7.5,2421,2230,2230,2,1,85,43,85,46,48,60
If I have a missing value - so file looks like ,85,46,,48, etc
then RSQLite reads it as zero. ,85,46,0,48, etc
I need it read it as NA.
Tried various
You need something like this:
sapply(objects() , function(x)(dim(eval(parse(text = x)
a - rnorm(1)
b - matrix(rnorm(4), ncol = 2, nrow = 2)
sapply(objects() , function(x)(dim(eval(parse(text = x)
$a
NULL
$b
[1] 2 2
Cheers,
Thierry
Milton Cezar Ribeiro wrote:
Hi R-friends
I don´t know why the min() function below return the min value as factor.
When i force the aicc.min using a as.numeric() function, it return a factor
index (1,2,..) and not min value as I want. By the way, I included a
sessionInfo() at the
Farrel Buchinsky wrote:
Why will the following command not work
sapply(objects(),dim)
What does it say about the objects list? What does it say about the dim
command?
Likewise, the following also does not work
all-ls()
for (f in all) print(dim(f))
'objects()' returns character strings
Hi Milton!
I don't know why, but this thing happend with me too, quite a lot times.
It's a useful way that convert the value type like that:
*as.numeric(as.character(min(...)))*
Zoltan
2007/1/9, Milton Cezar Ribeiro [EMAIL PROTECTED]:
Hi R-friends
I don´t know why the min() function below
BaRow == Barry Rowlingson [EMAIL PROTECTED]
on Tue, 09 Jan 2007 14:53:05 + writes:
BaRow Farrel Buchinsky wrote:
Why will the following command not work
sapply(objects(),dim)
What does it say about the objects list? What does it say about the dim
command?
dear all,
I want to perform a posthoc test for my ANCOVA:
a1-aov(seeds~treatment*length)
With
summary(glht(a1, linfct = mcp(treatment = Tukey)))
R tells me: covariate interactions found -- please choose appropriate
contrast
How do I build these contrasts?
Ideally, I would like to have the
You have assumed everything as I meant it.
I understand what is happening now. ls() simply creates a vector with
character elements and dim() sees each element as not having dimensions. The
critical part of what you have shown is the get(command) that turns what is
just a string into the dataframe
Guys, thanks very much for your help. Rscript looks great and I'll look
forward to it.
The /usr/bin/env thing seems to be a general difficulty with the mechanism.
One's first thought has to be to modify env to parse and then pass the
arguments in the expected way (maybe #!/usr/bin/env2?), and of
I want to manipulate lists as described below:
Imagine these two lists:
list1
$WR7
[1] 1 2 3 4
$YH5YH6
[1] 3 4 5 6 7
$YH4
[1] 4 5
$UC4UC8
[1] 4 5 6 7 8 9
list2
V1V2
1WR7Averrhoa
2 ? Sarcotheca
3 YH5YH6
Hi Richard,
It would help if you provided a bit more on how you are going about
the import (along with your version of R and RSQLite).
R Gott [EMAIL PROTECTED] writes:
I haev some .csv data files with missing values - eg below
Earl F. Glynn [EMAIL PROTECTED] writes:
Prof Brian Ripley [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Here is a reasonable shot:
findfuns - function(x) {
if(require(x, character.only=TRUE)) {
env - paste(package, x, sep=:)
nm - ls(env, all=TRUE)
See below.
On 1/9/07, Farrel Buchinsky [EMAIL PROTECTED] wrote:
You have assumed everything as I meant it.
I understand what is happening now. ls() simply creates a vector with
character elements and dim() sees each element as not having dimensions. The
critical part of what you have shown is
Laurent,
Since you question was not about odfWeave (despite the message title),
it would have been better to send this question to an OpenOffice mailing
list.
That said, I think that the issues was your workflow (odt - html -
doc). HTML is plain text, so when you saved the file in that format
Dear Peter,
I tryed something like
head(especies.aicc)
especie aicc
1 Attila.rufus 17.15934
2 Attila.rufus 11.41371
3 Attila.rufus 11.41371
4 Attila.rufus 19.55998
5 Attila.rufus 17.23780
6 Attila.rufus 19.22545
especies.min-aggregate.data.frame(especies.aicc,list
Milton Cezar Ribeiro wrote:
Dear Peter,
I tryed something like
head(especies.aicc)
especie aicc
1 Attila.rufus 17.15934
2 Attila.rufus 11.41371
3 Attila.rufus 11.41371
4 Attila.rufus 19.55998
5 Attila.rufus 17.23780
6 Attila.rufus 19.22545
Hi all,
why doesn't something like this does not work?
speedy -
(sdata$VaR sdata$DdtdAbs) sdata$DdtdDuration = qpois(pct,lambda)
sdata$Ddtd MinDD
or sdata$Ddtd[sdata$Ddtd 0 sdata$VaR sdata$DdtdAbs]
sdata looks like this:
dataId date value Ddtd VaR
I suppose this doesn't work for the same reason as
sdata$VaR sdata$DdtdAbs sdata$DdtdDuration = 1
does only return FALSE and not a vector of TRUE and FALSE as
sdata$VaR sdata$DdtdAbs
would return.
Is there a ways around this?
Benjamin
On 1/9/07, Benjamin Dickgiesser [EMAIL PROTECTED]
Milton,
have you looked at the structure of your data.frame?
str(especies.aicc)
Are you sure especies.aicc is defined as numeric?
b
On Jan 9, 2007, at 10:51 AM, Milton Cezar Ribeiro wrote:
Dear Peter,
I tryed something like
head(especies.aicc)
especie aicc
1
Georg Hoermann [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Peter Dalgaard wrote:
Earl F. Glynn wrote:
Thanks a lot for the help. I will post the script when its ready
(an introduction for our biology students to time series, just 8 hours)
I've been working with one of our labs
Is the solution this simple?
sdata$VaR sdata$DdtdAbs sdata$DdtdDuration = 1
Regards, Johan
2007/1/9, Benjamin Dickgiesser [EMAIL PROTECTED]:
I suppose this doesn't work for the same reason as
sdata$VaR sdata$DdtdAbs sdata$DdtdDuration = 1
does only return FALSE and not a vector of TRUE
On Tue, 9 Jan 2007, Benjamin Dickgiesser wrote:
I suppose this doesn't work for the same reason as
sdata$VaR sdata$DdtdAbs sdata$DdtdDuration = 1
does only return FALSE and not a vector of TRUE and FALSE as
See ?:
'' and '' indicate logical AND and '|' and '||' indicate
John Lawrence Aspden wrote:
I'm actually tempted to use
#!/usr/bin/env r
rm(list=ls())
Ahem, it turns out to be better to use:
#!/usr/bin/env r
rm(list=ls()[ls()!=argv])
--
Contractor in Cambridge UK -- http://www.aspden.com
__
Thx for the help, sorry I am just used to use from php and simply
assumed it would work identically.
On 1/9/07, Patrick Burns [EMAIL PROTECTED] wrote:
S Poetry (and other documentation) will tell you
the difference between '' and ''.
Patrick Burns
[EMAIL PROTECTED]
+44 (0)20 8525 0696
Kuhn, Max a écrit :
Laurent,
Since you question was not about odfWeave (despite the message title),
it would have been better to send this question to an OpenOffice mailing
list.
That said, I think that the issues was your workflow (odt - html -
doc). HTML is plain text, so when you saved the
Received Tue 09 Jan 2007 12:36pm +1100 from Bhanu Kalyan.K:
Dear Mr. Bengtsson,
Now i am able to work with R-Matlab interface comfortably. Thanks to you.
Recently, I came to know that R can be used for data mining as well. I went
through the following site for this :
John Lawrence Aspden wrote:
John Lawrence Aspden wrote:
I'm actually tempted to use
#!/usr/bin/env r
rm(list=ls())
Ahem, it turns out to be better to use:
#!/usr/bin/env r
rm(list=ls()[ls()!=argv])
Eww!! I'm not sure you want to do that. I would recommend sticking with:
Hi my friends,
I'm very new to R and need your help.
I used R and ltm package for item response theory (IRT) modeling.
I also need to compute differential item function (DIF) for IRT
models. I searched the archive but basically found nothing.
Could you help me find some sources about
Hi,
A function calculates the absolute difference between the two largest values
of each row of a matrix, as shown in the following example code:
cx - matrix(runif(15),5)
cy - t( apply(cx, 1, order, decreasing=TRUE) )
cz - rep(0, nrow(cx))
for( i in 1:nrow(cx) ) cz[i] - abs(diff(cx[i,
I don't know of any functions specifically designed to handle DIF (e.g.,
mantel-hantzel). But, ltm does give you the point estimates and standard
errors so you can do a t-test between the focal and reference groups.
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL
There is an improved version of the original random forest algorithm
available in the party package (you can find some additional
information on the details here:
http://www.stat.uni-muenchen.de/sfb386/papers/dsp/paper490.pdf ).
I do not know whether it yields a solution to your problem about
On Tue, 2007-01-09 at 16:10 -0500, Christos Hatzis wrote:
Hi,
A function calculates the absolute difference between the two largest values
of each row of a matrix, as shown in the following example code:
cx - matrix(runif(15),5)
cy - t( apply(cx, 1, order, decreasing=TRUE) )
cz -
Thanks, Marc.
This is what I was trying to do but could not get it to work.
-Christos
-Original Message-
From: Marc Schwartz [mailto:[EMAIL PROTECTED]
Sent: Tuesday, January 09, 2007 4:32 PM
To: [EMAIL PROTECTED]
Cc: 'R-help'
Subject: Re: [R] A vectorization question
On Tue,
Jeffrey Horner wrote:
John Lawrence Aspden wrote:
I'm actually tempted to use
#!/usr/bin/env r
rm(list=ls()[ls()!=argv])
Eww!! I'm not sure you want to do that. I would recommend sticking with:
#!/usr/bin/r -v
as that gives you a truer scripting environment. I understand that
Welcome Christos.
Note that my first example can actually be simplified to:
apply(mat, 1, function(x) -diff(sort(x, decreasing = TRUE)[1:2]))
Since we really just need to negate the difference, rather than take the
abs().
The advantage of this approach is that the two max values will always
That's true. Just need to negate the difference. Actually, straight diff
can be used after reversing the vector:
apply(mat, 1, function(x) diff(sort(x, decreasing = TRUE)[2:1]))
I only have 3 columns in my matrix so sorting should not add much overhead,
but I will time both versions.
Thanks
Seth Falcon [EMAIL PROTECTED] wrote in message
news:[EMAIL PROTECTED]
Are you sure you need to? I just tried your code above with:
pkgs - c(Biobase, GOstats, flrblr, bazbaz)
And while I see warning messages about the flrblr and bazbaz packages,
the function completed and I get the expected
Maybe I misunderstand what you want to do, one solution is:
l1
$a
[1] 1 2
$b
[1] 1 2 3
$c
[1] 1 2 3 4
l2
V1 V2
1 d nd
2 c nc
3 b nb
4 a na
names(l1)-sapply(names(l1),function(n)l2[l2$V1==n,2])
l1
$na
[1] 1 2
$nb
[1] 1 2 3
$nc
[1] 1 2 3 4
On 1/10/07, Christoph Heibl [EMAIL
Hello, I am afraid I do not fully understand all intricacies of
programming in lattice plots. In the code below I try to plot an ROC
curve, following R-news 4(1). When I condition on the variable 'group' I
get the error message below, when I plot the curve for all data (i.e., y
~ pred.prob), I
61 matches
Mail list logo