> I want to take the first variable (column) of a data frame and regress
> it against all other variables.
>
> bla <- function (dat) {
>reg <- lm(whateverthefirstofthevariablenamesis ~., data=dat)
>return(reg)
> }
>
>
Thanks to all who answered my question:
Prof. Brian Ripley:
Dear Monica
Guess the reason for the problem you are seeing is that you are
requiring simulations from the predictive distribution. geoR is doing
this simulation in a joint step, simulating from the joint predictive
distriubtion [as far as I know some other geostatistical software
packages are
On Wed, 24 Mar 2004, Fred J. wrote:
> Hello
> the maunal states "When the if statement is not in a
> block the else, if present, must appear on the same
> line as statement1. Otherwise the new line at the end
> of statement1 yields a syntactically complete
> statement that is evaluated."
> well, w
Using debugger() for post-mortem debugging is the best way to chase down
the immediate cause of an error, which seems to be the issue here.
If you use debug() (which is not a `dubuger') you need to single-step
(with n), and look at values just before the line in which the error
occurs.
There are
On 24 Mar 2004, Ross Boylan outgrape:
> By the way, I'm in the dark about (r)sprng. From some of the snow docs,
> I thought that was really snow's business. But your site notes that the
> Rmpi packages are withough SPRNG support. And Tony Rossini's pages (I
> think) had a slightly cryptic remar
> From: Alexander Sirotkin [at Yahoo] [mailto:[EMAIL PROTECTED]
>
> Christian,
>
> I think I understand your point, but I do not
> completely agree with you. I also did not describe
> my problem clear enough.
>
> > If you see two
> > clusterings on the same
> > data, they are identical, if the
You assigned `f' whatever the result of
sub("(.+/.+?/)(.+)?","\\2",p,perl=TRUE) is. The only way for `f' not to
exist after that assignment (that I can think of anyway) is if there was an
error raised in the sub() call. Otherwise `f' will always exist! You
should simply check what value `f' has.
Hello
I am trying for an hour now,
> p <- "c:/data/"
or
> p <- "c:/data/abc.hig"
d <- sub("(.+/.+?/)(.+)","\\1",p,perl=TRUE)
f <- sub("(.+/.+?/)(.+)?","\\2",p,perl=TRUE)
if (exists("f")){ #why this gives TRUE no mater what?
do this with d and f
} else {
do that with d
}
thanks
Goodness Patrick, this must surely qualify for the obfuscated R competition finals. I
love it!
There are two solutions I can think of with do.call and here they are:
> x <- 1
> x2 <- runif(10)
> x12 <- c("x", "x2")
> do.call("cbind", lapply(x12, as.name))
x x2
[1,] 1 0.99327265
On 24 Mar 2004 at 20:14, Valentin Stanescu wrote:
> Hello everyone
> I am trying to fit an ordered probit/logit model for bank rating
The CRAN package MCMCpack has at least ordered probit.
Kjetil Halvorsen
> prediction.
> Besides polr() in MASS package which is not written especially for
> thi
Anyone Knows how Shoud I Fit a Mixed Effects Ordered Logistic Model in
R? (lme?)
[]s
Leonard Assis
Estatístico - CONFE 7439
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Valentin
Stanescu
Sent: quarta-feira, 24 de março de 2004 15:15
To: [EMAIL PROTEC
On 24 Mar 2004 at 15:05, Monica Palaseanu-Lovejoy wrote:
> Hi,
>
> Very so often when i am plotting something, doing a histogram, or
> whatever i am struggling to find out which are the numbers for
> different colors, palette names, types of lines, symbols, etc. Is
> there any documentation on li
> what is wrong with this if structure? I am
> getting an error on the line where "else" is
>
> thanks
>
> if (exists("f")){
> dt <- read.csv(file.path(d,f),header=F)#data frame
> builddl(dt,f)
> else
The block started by "if(...){" isn't complete - it needs a matching "}"
before it is
Ross Boylan <[EMAIL PROTECTED]> writes:
> For the last couple of days when I go to http://cran.us.r-project.org/ I
> see only the left-hand margin logo and table of contents. If I click on
> one of the links there, I get a timeout. Other sites (e.g.,
> http://cran.stat.ucla.edu/) work fine for m
Christian,
I think I understand your point, but I do not
completely agree with you. I also did not describe
my problem clear enough.
> If you see two
> clusterings on the same
> data, they are identical, if they are 100%
> identical, and if not, then
> not.
What you are actually saying is that
Hello
the maunal states "When the if statement is not in a
block the else, if present, must appear on the same
line as statement1. Otherwise the new line at the end
of statement1 yields a syntactically complete
statement that is evaluated."
well, what is wrong with this if structure? I am
getting a
For the last couple of days when I go to http://cran.us.r-project.org/ I
see only the left-hand margin logo and table of contents. If I click on
one of the links there, I get a timeout. Other sites (e.g.,
http://cran.stat.ucla.edu/) work fine for me.
Lacking complete confidence this is a bug*, a
Hi
Pisut Tempatarachoke wrote:
Hi all,
In the following example,
#--EXAMPLE--
test <- function(subfigure)
{
plot(c(1:10),c(1:10),cex=4)
text(1,9,subfigure,cex=10)
}
m <- matrix(c(1,2,5,5,3,4,5,5),4,2)
layout(m)
test("a")
test("b")
test("c")
test("d")
test("e")
#--
You also have carriage return as a debug command. I think
you are looking for:
?recover
Fred J. yahoo.com> writes:
:
: Hello
: just learned HowTo but R, reminded me with the way
: Perl does it but with much less on-line commands, R
: "AFAIK" has n, c, Q and where and cann't debug outside
:
Well, you can insert `browser()' right above the offending line, then run
the code again. It will stop with the `browse>' prompt right before that
line. You can then check which value(s) give you the problem.
Have you tried Mark Bravington's `debug' package on CRAN? There's an
article on it in
Hello
just learned HowTo but R, reminded me with the way
Perl does it but with much less on-line commands, R
"AFAIK" has n, c, Q and where and cann't debug outside
the {}.
1) is there a more versatile/flexable debugging method
for R?
I have saved 2 functions in an ASCII file "digfun".
"getdata"
On Wed, 24 Mar 2004, Ross Boylan wrote:
> On Wed, 2004-03-24 at 08:03, Luke Tierney wrote:
> > On Tue, 23 Mar 2004, Ross Boylan wrote:
> >
> > > There are a few points I found unclear or unmentioned in the snow
> > > documentation (mostly I looked at the cluster.html web page). I thought
> > > I
I'm dealing with a classification problem using ordinal logistic
regression. In the case of binary logistic regression with unequal
proportions of 0's and 1's, a threshold in the interval [0,1] has to be
adapted to transform back the predicted probabilities into 0 and 1.
This can be done qu
Ross Boylan <[EMAIL PROTECTED]> writes:
> By the way, I'm in the dark about (r)sprng. From some of the snow docs,
> I thought that was really snow's business. But your site notes that the
> Rmpi packages are withough SPRNG support. And Tony Rossini's pages (I
> think) had a slightly cryptic rem
I have some more good news and some questions.
On Tue, 2004-03-23 at 20:50, Hao Yu wrote:
> Sorry. I have not been able to update Rmpi since the version
> 0.4-4 on R site.
I don't think any version of Rmpi is on the R site at the moment.
Minor aside: Also, it would be nice if the packages starti
On Wed, 24-Mar-2004 at 12:23PM +0100, Philipp Pagel wrote:
|> Hi!
|>
|> > I have a little problem with saving plots to file. I use the command
|> > postscript() followed by the plotting command and a dev.off().
|> >
|> > When I then look at the resulting image saved to disk, some of the
|>
Gefore anyone jumps on me, I fibbed:
> From: Liaw, Andy
>
> Perhaps simler:
>
> > x1 <- 1:5
> > x2 <- 2:7
That should've been x2 <- 2:6. (I mistyped the first time, but
cut-and-pasted the wrong line...)
> > xname <- c("x1", "x2")
> > sapply(xname, get)
> x1 x2
> [1,] 1 2
> [2,] 2 3
>
I think you are looking for the eval-parse-text idiom:
eval(parse(text=paste("cbind(", paste(my.names, collapse=", "), ")")))
Patrick Burns
Burns Statistics
[EMAIL PROTECTED]
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poetry and "A Guide for the Unwilling S User")
Stephane DRAY wro
Perhaps simler:
> x1 <- 1:5
> x2 <- 2:7
> xname <- c("x1", "x2")
> sapply(xname, get)
x1 x2
[1,] 1 2
[2,] 2 3
[3,] 3 4
[4,] 4 5
[5,] 5 6
HTH,
Andy
> From: Stephane DRAY
>
> Hi Tom,
>
> Your approach did not work,
>
> > do.call("cbind", as.list(my.names))
> [,1] [,2]
> [1
On Wed, 2004-03-24 at 08:03, Luke Tierney wrote:
> On Tue, 23 Mar 2004, Ross Boylan wrote:
>
> > There are a few points I found unclear or unmentioned in the snow
> > documentation (mostly I looked at the cluster.html web page). I thought
> > I'd mention them here.
> >
> > What is the start up e
Hi Tom,
Your approach did not work,
> do.call("cbind", as.list(my.names))
[,1] [,2]
[1,] "x" "x2"
but it helps me a lot to find the good one:
do.call("cbind", as.list(parse(text=my.names)))
Thanks,
At 14:56 24/03/2004, Tom Blackwell wrote:
I believe the syntax is
result <- do.call(cbin
I believe the syntax is
result <- do.call(cbind, as.list(my.names))
Haven't checked this on your example, though.
- tom blackwell - u michigan medical school - ann arbor -
On Wed, 24 Mar 2004, Stephane DRAY wrote:
> Hello list,
> I have two vectors x and x2:
>
> x=runif(10)
> x2=runif(1
?get to convert names into objects
> -Original Message-
> From: Stephane DRAY [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 24, 2004 11:41 AM
> To: [EMAIL PROTECTED]
> Subject: [R] binding vectors or matrix using their names
>
>
> Hello list,
> I have two vectors x and x2:
>
> x=r
Hello list,
I have two vectors x and x2:
x=runif(10)
x2=runif(10)
and one vectors with their names :
my.names=c("x","x2")
I would like to cbind these two vectors using their names contained in the
vector my.names.
I can create a string with comma
ncomma=paste(my.names,collapse=",")
and now, I j
It isn't lm but terms.formula. Compare
terms(dat$y ~ .,data = dat)
terms(dat[, 1] ~ ., data = dat)
Now as to why, exactly, see the C code in src/main/model.c.
The short answer is that dat$y matches y, and dat[, 1] does not.
(I am not at all sure the first is intentional.)
On Wed, 24 Mar 2004, B
First: Thanks to everyone who develops R, maintains r-help, and participates
in the list :)
This is a silly follow up question.
>From Andy Liaw:
> dat <- data.frame(y=rnorm(10), x1=rnorm(10), x2=rnorm(10))
(Silly question - if the answer is on the lm or formula help page I didn't
get it:)
Why
Hello everyone
I am trying to fit an ordered probit/logit model for bank rating
prediction.
Besides polr() in MASS package which is not written especially for this as
far as I know, do you know how else I can do this?
I already found the modified polr () version on the
Valentin STANESCU
Enrst an
Hi,
I am looking for an elegant solution to the following problem. When I
load a package, let's say ROracle, I want some custom actions to be done
on top of what package's .First.lib does. In this specific example I
want to open a connection to the only database I have around.
And I don't see how
Christian Hoffmann wsl.ch> writes:
>
> Hi all,
>
> I just cannot think of how to do it:
> I want to take the first variable (column) of a data frame and regress
> it against all other variables.
>
> bla <- function (dat) {
>reg <- lm(whateverthefirstofthevariablenamesis ~., data=dat)
>
Dear Alexander,
On Wed, 24 Mar 2004, Alexander Sirotkin [at Yahoo] wrote:
> Like you said, such kind of test will not give me
> anything that Rand index does not, except for p-value.
>
> The null hypothesis, in my case, is that clustering
> results does not match a different clustering, that
> s
On Wed, 24 Mar 2004, Christian Hoffmann wrote:
> Hi all,
>
> I just cannot think of how to do it:
> I want to take the first variable (column) of a data frame and regress
> it against all other variables.
>
> bla <- function (dat) {
>reg <- lm(whateverthefirstofthevariablenamesis ~., data=d
Joerg Schaber <[EMAIL PROTECTED]> writes:
> Hi,
>
> concerning my earlier mail, maybe someone has noted from the variable names
> that I try to analyse mircoarrary experiments.
>
> Does anybody know of a R-implementation of the two-step mixed-model
> normalization procedure proposed by
>
> Wolfing
Here is a little function that will show available colors in groups
of 100 at a time.
I've only tested it in an X windows environment.
function (indx = 0:6)
{
for (ii in unique(indx)) {
is <- 100 * ii + 1:100
if (min(is) > length(colors())) {
cat("Maximum value of
Stephane DRAY biomserv.univ-lyon1.fr> writes:
> [...]
> the colors used when you use number are those in palette:
> > palette()
> [1] "black" "red" "green3" "blue""cyan""magenta"
> "yellow" "gray"
> > plot(1:20,col=1:20)
>
> You can define your own palette with colors available
> "ivo" == ivo welch <[EMAIL PROTECTED]>
> on Wed, 24 Mar 2004 10:49:55 -0500 writes:
ivo> Is it possible to instruct R to output a line number
ivo> Is it possible to instruct R to output a line number
ivo> when an error or warning is encountered in a source()
ivo> file
See
?palette
?colors
the colors used when you use number are those in palette:
> palette()
[1] "black" "red" "green3" "blue""cyan""magenta"
"yellow" "gray"
> plot(1:20,col=1:20)
You can define your own palette with colors available in colors:
> palette(colors()[sample(1:657,20)])
You might be trying too hard:
> dat <- data.frame(y=rnorm(10), x1=rnorm(10), x2=rnorm(10))
> fit <- lm(dat)
> summary(fit)
Call:
lm(formula = dat)
Residuals:
Min 1Q Median 3Q Max
-1.11643 -0.42746 -0.01442 0.55902 1.04890
Coefficients:
Estimate Std. Error
Thanks--I'll try this new version when I get back to working on
this--hopefully soon.
luke
On Tue, 23 Mar 2004, Hao Yu wrote:
> Sorry. I have not been able to update Rmpi since the version
> 0.4-4 on R site. However, I have been using and testing Rmpi
> internally since 0.4-4. Now it is version
On Tue, 23 Mar 2004, Ross Boylan wrote:
> There are a few points I found unclear or unmentioned in the snow
> documentation (mostly I looked at the cluster.html web page). I thought
> I'd mention them here.
>
> What is the start up environment for the children?
>
Hello,
> -Original Message-
> From: Monica Palaseanu-Lovejoy
> [SMTP:[EMAIL PROTECTED]
> Sent: Wednesday, March 24, 2004 4:06 PM
> To: [EMAIL PROTECTED]
> Subject: [R] colors, lines, characters documentation
>
> Hi,
>
> Very so often when i am plotting something, doing a hist
Hi all,
I just cannot think of how to do it:
I want to take the first variable (column) of a data frame and regress
it against all other variables.
bla <- function (dat) {
reg <- lm(whateverthefirstofthevariablenamesis ~., data=dat)
return(reg)
}
What kind of function do I have to take inste
Is it possible to instruct R to output a line number when an error or
warning is encountered in a source() file?
sincerely, /iaw
__
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
I'm using 'agnes' from the 'cluster' package to cluster my data
hierarchically.
I need to find out the 'optimal' number of clusters.
In 'Finding Groups in Data: An Introduction to Cluster Analysis' Kaufman
and Rousseeuw refer to a strategy proposed by R. Mojena ('Hierarchical
grouping methods
Hi, many questions at once there, but here some help regarding
*symbols*.
I've pasted a function plotSymbols() that shows all symbols available.
Note that the the symbols pch >= 128 are system dependent so you
should not expect them to look the same on Windows, Mac and Unix. Try
also plotSymbols(
Dear all,
Does anybody know whether the (general) Lagrange Multiplier testing
framework for restrictions on linear models has been implemented in some
package?
My goal is to test for omitted variables, i.e. restrictions of the kind
beta_i=0, in the specification of an econometric model.
There ar
Hi,
Very so often when i am plotting something, doing a histogram, or
whatever i am struggling to find out which are the numbers for
different colors, palette names, types of lines, symbols, etc. Is
there any documentation on line with all these numbers / names
and the associated symbol / colo
At 11:17 2004-03-24, you wrote:
I'm working with count data following over-dispersed poisson distribution
and have to work with mixed-models on them (like proc GENMOD on SAS sys.).
I'm still not to sure about what function to use.
This is confusing: Proc GENMOD fits generalized linear models (GLM)
> "Erin" == Erin Hodgess <[EMAIL PROTECTED]>
> on Wed, 24 Mar 2004 08:13:01 -0600 writes:
Erin> Dear R and S+ People: Is it possible to take one of
Erin> the R libraries and put it into S+ please?
"libraries" (i.e. a collection of compiled code): definitely not
"as is".
Howev
In some cases it is possible to port an R *package* to S-PLUS: people have
done both that and the reverse.
If you have some specific examples in mind we may be able to help you
further. Since you are on Windows, it may not be easy unless you have the
requisite tools (e.g. Visuall C++ and Fortran)
Dear R and S+ People:
Is it possible to take one of the R libraries and put it
into S+ please?
R Windows XP 1.8.1
S+ Version 6.2
Thanks in advance!
Sincerely,
Erin Hodgess
Associate Professor
Department of Computer and Mathematical Sciences
University of Houston - Downtown
mailto: [EMAIL PROTEC
Please remove me from the mailing list
-Original Message-
From: [EMAIL PROTECTED]
To: Shengqiao Li
Cc: r-help
Sent: 24/03/2004 10:10 AM
Subject: Re: [R] Rmpi and PBS
On Tue, 2003-12-30 at 08:39, Shengqiao Li wrote:
> Hello:
>
> Anybody knows how to run Rmpi through PBS (Portable Batch Sy
Joerg Schaber <[EMAIL PROTECTED]> writes:
> Hi,
>
> I have the following linear mixed model:
>
> y(g,i,j,k,l)=u + L(g) + T(i) + D(j) + S(k) + (TS)(i,k) + error(g,i,j,k,l)
>
> where S(k) and the combined effect (TS)(i,k) are random effects
> whereas the rest are fixed effects.
> How do I speci
You are probably running out of memory address space. Can you
1) Try this in 1.9.0 beta which gives a more informative error message,
and
2) Use traceback() and the debugging tools to locate the error more
exactly.
3) Consider using the options to loess to reduce the load. Loess is not
des
Hi,
I am trying to do a bayesian prediction for soil pollution data above
a certain threshold, using geoR.
Everything is working fine until i am doing the krig.bayes. I tried to
do the prediction on a grid 67 by 113 cells and my computer is
freezing to death. At larger numbers of cells it tel
Hi,
I have been successfully using the loess function for normalisation of a 2D
array set.
We have recently improved the quality criteria for the data and the numbers
of data points has been reduced to around from around 1000 to 700.
Previously the following would return the loess normalised values
Joerg,
Have you looked at the BioConductor packages (www.bioconductor.org)? I'm
not sure if that particular one is there, but there are MANY methods for
normalization as well as objects for dealing with microarray data that may
be of interest.
Sean
On 3/24/04 7:01 AM, "Joerg Schaber" <[EMAIL PR
On Wed, 24 Mar 2004, MMarques Power wrote:
>
> Recently working with strings and data
> I have found a small problem.
>
> Windows XP
> R 1.8.1
>
> Reading data from a "txt file" with readLine.
> finding a specific line with "grep" command, all OK.
> but here comes the problem...
> After finding
Hi,
concerning my earlier mail, maybe someone has noted from the variable names
that I try to analyse mircoarrary experiments.
Does anybody know of a R-implementation of the two-step mixed-model
normalization procedure proposed by
Wolfinger et al. (2001) J. Comput. Biol. 8:625-637?
That would b
Recently working with strings and data
I have found a small problem.
Windows XP
R 1.8.1
Reading data from a "txt file" with readLine.
finding a specific line with "grep" command, all OK.
but here comes the problem...
After finding the correct line(s) i need to find a substring
inside each string
Hello and thank you for your email. We strive to respond to all email inquiries within
one business day. If your issue cannot wait that long, please call us at 877-438-8966.
Our hours are 6:00 a.m. to 6:00 p.m. Pacific Standard Time, Monday through Friday.
For reference, your assigned case ID i
[Apology to the list for the off-topic rant...]
As it turned out, I also have a problem with LOF/GOL/etc. tests: I'd bet
most of the time when such a test is carried out, it is _not_ the only test
being done, but the p-values in the downstream analysis are almost never
adjusted for this. How val
Hi,
I have the following linear mixed model:
y(g,i,j,k,l)=u + L(g) + T(i) + D(j) + S(k) + (TS)(i,k) + error(g,i,j,k,l)
where S(k) and the combined effect (TS)(i,k) are random effects whereas
the rest are fixed effects.
How do I specifiy the random part of the model formula in lme(),
especiall
Hi!
> I have a little problem with saving plots to file. I use the command
> postscript() followed by the plotting command and a dev.off().
>
> When I then look at the resulting image saved to disk, some of the
> axis labels are missing (see attached image). Is there a way to fix
> this.
Sun, 14 Mar 2004, Jan Verbesselt wrote:
> Dear R specialists,
>
> I have two time series in a data.frame and want to plot them in the same
> plot(), with the left axis scaled to time series 1 (-700,0) and the
> right axis scaled to time series 2 (-0.2, 0.4).
>
> plot(timeserie1)
> lines(timeseri
This is not a PS problem. The barplot you made has its horizontl axis
suppressed by default. See argument axis.lty in ?barplot
Joris
Frank Gerrit Zoellner wrote:
Hi all!
I have a little problem with saving plots to file.
I use the command postscript() followed by the plotting command and a dev.
Dear All,
I would like to ask a question on the colour scheme I can specify for a
plot(survfit.model).
I have four lines of Drosophila, kept at 3 different temperatures. About
100 individuals per line and temperature were scored, no censoring.
the data looks like:
linetempday stat
Dear All,
Are there recommended functions to test for (exact) significance when the
samples are drawn from small finite populations (which sometimes are not much
bigger than the sample)?
I am looking for
- differences in central tendency
- differences of proportions
- difference in distributio
Hi all!
I have a little problem with saving plots to file.
I use the command postscript() followed by the plotting command and a dev.off().
When I then look at the resulting image saved to disk, some of the axis labels are
missing (see attached image). Is there a way to fix this.
Yours,
--
Fr
Dear all,
I'm working with count data following over-dispersed poisson distribution
and have to work with mixed-models on them (like proc GENMOD on SAS sys.).
I'm still not to sure about what function to use. It seems to me that a
glmmPQL will do the job I want, but I'll be glad if people who worke
www.kssg.com a pricing consulatancy based in Manchester (UK) are seeking an
experienced statistical analyst.
Candidates must be eligible to work in the EU. If you are interested please
send an updated CV to [EMAIL PROTECTED] .
Company Overview
KSS is a leading provider of pricing and revenue m
Hi all,
In the following example,
#--EXAMPLE--
test <- function(subfigure)
{
plot(c(1:10),c(1:10),cex=4)
text(1,9,subfigure,cex=10)
}
m <- matrix(c(1,2,5,5,3,4,5,5),4,2)
layout(m)
test("a")
test("b")
test("c")
test("d")
test("e")
#--
Like you said, such kind of test will not give me
anything that Rand index does not, except for p-value.
The null hypothesis, in my case, is that clustering
results does not match a different clustering, that
someone alse did on the same data.
And I do believe that this hypothesis is valid.
Basic
82 matches
Mail list logo