This post is NOT a question, but an answer. For readers please disregard all
earlier posts by myself about this question.
I'm posting for two reasons. First to say thanks, especially to Dimitris, for
suggesting the use of errorest in the ipred library. Second, so that the
solution to this probl
Here's one more possibility:
> subset(x, a %in% a[duplicated(a)])
a b
2 2 10
3 2 10
4 3 10
5 3 10
6 3 10
HTH,
Marc Schwartz
On Thu, 2005-03-17 at 22:25 -0500, Liaw, Andy wrote:
> OK, strike one...
>
> Here's my second try:
>
> > cnt <- table(x[,1])
> > v <- as.numeric(names(cnt[cnt > 1]))
Tiago,
Assuming the column in x is sorted:
t = which(duplicated(x[, 1]))
x[sort(union(t-1, t)),]
or, if not sorted:
t = which(duplicated(sort(x[, 1])))
x[sort(union(t-1, t)),]
Rob
On Mar 17, 2005, at 6:11 PM, Tiago R Magalhaes wrote:
> Hi
>
> I want to extract all the rows in a data frame th
OK, strike one...
Here's my second try:
> cnt <- table(x[,1])
> v <- as.numeric(names(cnt[cnt > 1]))
> v
[1] 2 3
> x[x[,1] %in% v, ]
a b
2 2 10
3 2 10
4 3 10
5 3 10
6 3 10
Andy
> From: Liaw, Andy
>
> Does this work for you?
>
> > x[table(x[,1]) > 1,]
> a b
> 2 2 10
> 3 2 10
> 5 3 10
> 6
Does this work for you?
> x[table(x[,1]) > 1,]
a b
2 2 10
3 2 10
5 3 10
6 3 10
Andy
> From: Tiago R Magalhaes
>
> Hi
>
> I want to extract all the rows in a data frame that have duplicates
> for a given column.
> I would expect this question to come up pretty often but I have
> researched
Please use a meaningful subject line!
You want SlowSleep == 7.7, not SlowSleep = 7.7.
Have you read the posting guide as others (including myself) have
suggested? Have you also read "An Introduction To R," which comes with
all R distributions?
--sundar
Brett Stansfield wrote on 3/17/2005 8:09 PM
Please use a meanful subject line!
You want SlowSleep == 7.7, not SlowSleep = 7.7.
Have you read the posting guide as others (including myself) have
suggested? Have you also read "An Introduction To R," which comes with
all R distributions?
--sundar
Brett Stansfield wrote on 3/17/2005 8:09 PM:
I
Dear Bret,
You appear to have used = (for assignment or argument specification) when
you meant == (equals).
I hope this helps,
John
John Fox
Department of Sociology
McMaster University
Hamilton, Ontario
Canada L8S 4M4
905-525-9140x23604
http://socserv.mcmaster.c
All,
In looking at `optim', it doesn't appear that it is
possible to impose nonlinear constraints on Nelder-
Mead. I am sufficiently motivated to try to code
something in C from scratch and try to call it from
R
Does anyone have some good references to barrier
and/or penalization methods fo
Hi
I want to extract all the rows in a data frame that have duplicates
for a given column.
I would expect this question to come up pretty often but I have
researched the archives and surprisingly couldn't find anything.
The best I can come up with is:
x <- data.frame(a=c(1,2,2,3,3,3), b=10)
xdu
I recently tried to make R highlight certain features in a scatterplot
matrix
pairs(sleep[c("SlowSleep", "ParaSleep", "logbrw", "loglife", "loggest",
"logbw")],
* col=1+as.integer(ParaSleep > 5.5))
this worked fine but when I wanted to add another condition i.e
where another variabl
Do you mean when you encounter a new term? I would think document *length*
wouldn't matter; presumably you have a list of terms already. If so you
could treat each document as a vector of term codes, then use "tabulate" to
get the column for that document.
If you're using all terms that appear in
On Thu, 17 Mar 2005 15:11:50 +0100 (CET), Johannes Hüsing
<[EMAIL PROTECTED]> wrote :
>
>> On Thu, 17 Mar 2005 13:20:32 +0100 (CET), Johannes Hüsing
>> <[EMAIL PROTECTED]> wrote :
>[...]
>>>Is there a way that the dot-dot-dot argument of a
>>>function accepts a list as single arguments, such
>>>as
Hello,
I have a question on glm - poisson. I would like to
fit a model on proportion of counts with some factors,
and I decided to use glm - poisson because count data
is essentially related to poisson. However, since I
need to deal with proportion, and glm - poisson does
not allow non-integer res
I'm trying to create a term document matrix where the columns are the
documents, the rows are the terms in the documents, and the cells are a
weight of term frequency in the document. My problem is the documents
are all different lengths. So when I add a new document, if the document
length is grea
Paul H Artes <[EMAIL PROTECTED]> writes:
> Dear R,
>
> I'm looking for exact p-values for Spearman's rank correlation in the
> presence of ties. This is available in StatXact and SPSS, but I
> haven't yet found it in R. Has anyone implemented this?
The algorithm used by those two (it's the same
Fredrik Lundgren wrote:
> Dear List,
>
> RMySQL is old and wouldn't install on R 2.0.1.
> How should the source be rewritten to be accepted by R 2.0.1.
>
> With thanks
>
> Fredrik Lundgren
>
> __
> R-help@stat.math.ethz.ch mailing list
> https://stat.
Dr. Phillip Good will offer his short course Modeling in R April 8
April 29, 2005, online at statistics.com. This 3-week course will show you
how to use R to create models for use in classification and prediction. You
will be introduced to advanced graphing methods as needed. Modeling
tech
Dear List,
RMySQL is old and wouldn't install on R 2.0.1.
How should the source be rewritten to be accepted by R 2.0.1.
With thanks
Fredrik Lundgren
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the p
Dear R,
I'm looking for exact p-values for Spearman's rank correlation in the
presence of ties. This is available in StatXact and SPSS, but I
haven't yet found it in R. Has anyone implemented this?
--
Paul H Artes
Assist Prof, Ophth Vis Sci
Dalhousie University, QEII Eye Care Centre
Halifax, NS,
Hello,
New user of R I did experience some trouble using R and ODBC on Windows
XP, MS Access and PostgreSQL.
While querying a database is relatively simple, the use of sqlSave is a
bit more tricky.
After a large series of trial, I finally succeeded to get it work
provided :
1. I leave the app
Sundar Dorai-Raj wrote on 3/17/2005 2:27 PM:
Ghosh, Sandeep wrote on 3/17/2005 1:25 PM:
Hi All,
For the following data when I use xyplot in package lattice the
intervals are in the order of 2, 24, 8, but instead I want them to be
in the order 2, 8, 24.
Treatment Interval value
A
Ghosh, Sandeep wrote on 3/17/2005 1:25 PM:
Hi All,
For the following data when I use xyplot in package lattice the intervals are
in the order of 2, 24, 8, but instead I want them to be in the order 2, 8, 24.
Treatment Interval value
A 2 0.448
A24
You are right.
...
print(xyplot(...))
...
solved the problem.
Many thanks
hadley wickham <[EMAIL PROTECTED]> wrote:
Are you running them from a function?
You probably want to check out 7.22 Why do lattice/trellis graphics
not work? in the R faq.
Hadley
On Thu, 17 Mar 2005 11:37:53 -080
Thank you for your post.
If I run:
trellis.dev(pdf, filename="junk.pdf')
plot(c(1:10))
dev.off()
I get the correct junk.pdf.
But when I try to draw some fancy stuff using xyplot(...), then I just get a
junk.pdf of 4kb only, and abode says ".. error, .. it has no page." If I remove
dev.off(
Hello everyone.
This question might be a bit off topic, but I thought
that (a) there couldn't be a better group to address
my questions and (b) that others might find it useful
too; It also might start an interesting discussion
thread.
I use R often for simulation purposes (which generally
invo
Hi All,
For the following data when I use xyplot in package lattice the intervals are
in the order of 2, 24, 8, but instead I want them to be in the order 2, 8, 24.
Treatment Interval value
A 2 0.448
A24 1.85
A 8
On Thu, 2005-03-17 at 19:27 +0100, javier garcia wrote:
> Hi all;
>
> please, has anyone found a way to convert a series of png files created in an
> R script into a video (as avi), from within the same R script?
>
> I know this has little relation with typical R problems. Just because I've
> s
On Thu, 2005-03-17 at 18:30 +, Ken Termiso wrote:
> Hi all,
>
> I searched through the archives, but couldn't find a fix...
>
> Basically, I've got a bunch of numeric vectors and one character vector that
> I want to bind into a data frame. When I include the character vector as a
> column
Hi all,
I searched through the archives, but couldn't find a fix...
Basically, I've got a bunch of numeric vectors and one character vector that
I want to bind into a data frame. When I include the character vector as a
column in the data frame, all the numeric columns get factored in the data
f
Hi all;
please, has anyone found a way to convert a series of png files created in an
R script into a video (as avi), from within the same R script?
I know this has little relation with typical R problems. Just because I've
spent all day without finding a solution, and perhaps anyone has done i
Dear R-people,
I am mainly programming in Matlab (version 7), both under Windows XP and
under Suse Linux 9.0. Programs should run on both systems. I would like
to use R-functions from within Matlab. So far, I did this by writing and
reading ascii-files. Now I tried RMatlab, which I could not insta
Hello!
I am interested, is it possible to get a call from the function (like with
match.call), but in such a way that the call would include all elements to a
function, not only those that were set in a call. What I want is to have
also specified arguments that are not listed in the original call a
Terry Mu wrote:
there is a vector, like:
1, 1, 1, 2, 2, 3, 3, 4, 5, 5,
I'd like a function that gives me only 1, 2, 3, 4, 5
See ?unique
Uwe Ligges
thank you
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE
You can use unique()
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Terry Mu
Sent: Thursday, March 17, 2005 12:24 PM
To: R-Help
Subject: [R] beginner question: how to sort out distinct values from a
vector
there is a vector, like:
1, 1, 1, 2, 2, 3, 3, 4
thank you so much! all of you!
On Thu, 17 Mar 2005 11:30:10 -0600, Marc Schwartz
<[EMAIL PROTECTED]> wrote:
> On Thu, 2005-03-17 at 12:24 -0500, Terry Mu wrote:
> > there is a vector, like:
> > 1, 1, 1, 2, 2, 3, 3, 4, 5, 5,
> >
> > I'd like a function that gives me only 1, 2, 3, 4, 5
>
> See ?u
On Thu, 2005-03-17 at 12:24 -0500, Terry Mu wrote:
> there is a vector, like:
> 1, 1, 1, 2, 2, 3, 3, 4, 5, 5,
>
> I'd like a function that gives me only 1, 2, 3, 4, 5
See ?unique
HTH,
Marc SChwartz
__
R-help@stat.math.ethz.ch mailing list
https://s
?unique
Terry Mu wrote:
there is a vector, like:
1, 1, 1, 2, 2, 3, 3, 4, 5, 5,
I'd like a function that gives me only 1, 2, 3, 4, 5
thank you
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posti
there is a vector, like:
1, 1, 1, 2, 2, 3, 3, 4, 5, 5,
I'd like a function that gives me only 1, 2, 3, 4, 5
thank you
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R
We need more info to help you. What do you mean by "crash", does it
generate an error or something ?
I presume you have just installed R. How did you install it ? If you did
from source, did you do a "make check" ? I had this problem once and it
was traced to a broken gcc version
http://tolstoy.ne
Zhongming Yang wrote:
Dear All:
I need draw some figure through trellis.device and save them as pdf files. How can I close trellis.device (something like dev.off() in nonlattice figure)?
dev.off() is correct, because trellis.device also starts "regular"
devices (with appropriate sttings).
Uwe
Dear All:
I need draw some figure through trellis.device and save them as pdf files. How
can I close trellis.device (something like dev.off() in nonlattice figure)?
Many thanks
Zhongming Yang
-
[[alternative HTML version deleted]]
you could re-parameterize, e.g.,
EM <-
c(4.5000,6.,10.5000,5.,27.,20.7500,16.7500,23.,38.7500)
W <- array(EM, c(3,3))
d <- c(10, 20, 20)
##33
fn <- function(x){
x <- exp(x) / sum(exp(x))
r <- W%*%x - d
crossprod(r, r)[1,1]
}
opt <- optim(rnorm(3), fn)
res <- ex
All,
A couple of updates here:
1. According to a post on the Fedora lists this morning and an article
at:
http://www.heise.de/newsticker/meldung/57616
the version 7.0 Adobe Reader that I referenced in my original post is
still a _Pre-Release_ version, NOT the final version.
If accurate, it wou
Dear list,
I am using R.2.0.1 on a G5 biprocessor 2.5GHz with 2Go RAM (Mac OS X
10.3.8).
I have some problems to use the plot function... it makes my R
application crash !
Have someone any idea about this problem ???
Thanks,
Edouard
__
R-help@stat.ma
As promised here is my reply. I am assuming that your problem is
changing the order of the xyplots by idno.
The plotting order in lattice is determined by the levels of md$idno. By
default it was reading the levels from top to bottom of the dataset as
unique(md$idno) would do.
library(nlme); l
Dear R-ians,
I want to perform an linear unmixing of image pixels in fractions of
pure endmembers. Therefore I need to perform a constrained linear
least-squares problem that looks like :
min || Cx - d || ² where sum(x) = 1.
I have a 3x3 matrix C, containing the values for endmembers and I have
> On Thu, 17 Mar 2005 13:20:32 +0100 (CET), Johannes Hüsing
> <[EMAIL PROTECTED]> wrote :
[...]
>>Is there a way that the dot-dot-dot argument of a
>>function accepts a list as single arguments, such
>>as funcall in several Lisp dialects?
>
> do.call() comes close to what you want.
[...]
Indeed i
I think you have restated your question a couple of days ago here
http://tolstoy.newcastle.edu.au/R/help/05/03/14095.html
I will reply to that thread as it is simpler and easier.
The only new thing this thread adds is "where is the data a5 used to
create Figure 4.18 in MASS (4th Ed)" ?
Regards, A
Hello
I am trying to fit a REML to some soil mineral data which has been
collected over the time period 1999 - 2004. I want to know if the 19
different treatments imposed, differ in terms of their soil mineral
content. A tree model of the data has shown differences between the
treatments can be at
Rachel Pearce wrote:
I am sorry that this is another novice question. I am having trouble
using "legend" with the survival curve plot from the survival package,
and I wonder if it is because I have rescaled my plot.
Here is the relevant segment of code:
plot(survfit(Surv(OS,Status)~shortishcr1),
On Thu, 17 Mar 2005 13:20:32 +0100 (CET), Johannes Hüsing
<[EMAIL PROTECTED]> wrote :
>Dear all,
>I have a list of time series and want to plot them.
>Is there a way that the dot-dot-dot argument of a
>function accepts a list as single arguments, such
>as funcall in several Lisp dialects?
do.call
Yes, I was thinking of the trivial problem of 2 matrices. Nice to know I
am not the only one who made the same error.
Thanks to Thomas Lumley, John Fox, Dimitris Rizopoulos for pointing this
out and many others for providing the correct solution.
Regards, Adai
On Wed, 2005-03-16 at 11:07 -0600,
I am sorry that this is another novice question. I am having trouble
using "legend" with the survival curve plot from the survival package,
and I wonder if it is because I have rescaled my plot.
Here is the relevant segment of code:
> plot(survfit(Surv(OS,Status)~shortishcr1),main='Overall Survi
Dear all,
I have a list of time series and want to plot them.
Is there a way that the dot-dot-dot argument of a
function accepts a list as single arguments, such
as funcall in several Lisp dialects?
Greetings
Johannes
__
R-help@stat.math.ethz.ch maili
Jonathan Charrier wrote:
Hi everybody,
it's a technical question .
i have a matrix with 30 columns and 4 rows,
i start my program and i found this error:
"error in solve.default(sBB + Z[,,i] %*% Gamma %*% t(Z[,,i])):
system is computationally singular: reciprocal condition number =
7.6377e-01
Christian gmail.com> writes:
>
> Dear all.
>
> First of all, thanks to Jon, Martin, Bogdan and Roland since they tried
> to help me.
>
> In order I tried to
> 1) install the libf2c0-3.4.1-4mdk.i586.rpm.
> 2) install R 2.0.1 from the source.
>
> 1) Didn't work, since the "info" is still not s
There's no real R user interface under linux, but it's not that better to have
one...ESS/Emacs is pretty good!
(you'll just get nervous when you'll want to save plots, look rplots up in
goolge)
*Try Rcmdr package, hope sci-views-R we'll be available soon for non-M$windoz
OS
*or have a look
Bjoern,
thanks for your mail. But when reporting problems with a contributed
package, please contact the maintainer first or at least Cc him when
writing to R-help.
The problem below is in the formula method of sigest because the frac
argument gets passed on to model.frame which causes the error.
Please read the posting guide and
1) Use the appropriate list, R-devel, and
2) Tell us enough about your environment, for example which OS this is.
On Thu, 17 Mar 2005, Mauron Laurent (KETR 31) wrote:
Hi,
I am working at a major financial institution and we would like to embed R in
one of our fron
On Thu, 17 Mar 2005, [windows-1250] Alea }iberna wrote:
I am trying to move my work in R from Windows to Linux. However I am missing
some of the functionality I was used to under Windows. I tried running R
2.0.1 by typing R in the terminal and via Emacs/ESS. R Gui currently does not
work on my L
Hi everybody,
it's a technical question .
i have a matrix with 30 columns and 4 rows,
i start my program and i found this error:
"error in solve.default(sBB + Z[,,i] %*% Gamma %*% t(Z[,,i])):
system is computationally singular: reciprocal condition number =
7.6377e-018 "
is it R limit?
tha
Dear Sebastian Luque (and All R Users)
With the following code I managed to plot different characters and regression
lines for panels 2 ("Day of year 101") and >4 ("Days of year" 151, 157 and
172):
xyplot(log(no.larvae)~age.cls|factor(day),data=mortal,
layout=c(7,1),aspect=5/3,
xl
you mean something like this:
lapply(histList, function(x) cumsum(x$counts))
I hope it helps.
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/16/336899
Fax: +32/16/
Hi all,
here is my problem:
I have a list (called rms) that contains for each of its element a different
number of values.
Based on that list, I generate an histogram for each of its elements using:
histList <- lapply(rms,hist,breaks=seq(0,4,0.1),plot=FALSE)
that gives me a list of histogr
hello,
I have the following problem setting parameter 'frac' in the sigest
function of the kernlab package.
## executing the ?sigest example:
library(kernlab)
data(spam)
srange <- sigest(type~.,data = spam)
## works fine...
## setting 'frac' explicitly
## (in this case even to the default of .2
test
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Hi,
I am working at a major financial institution and we would like to embed R in
one of our front office application.
The application is written in C/C++ so I started by trying to compile the
examples in "tests/Embedding" of R 2.0.1.
I have modified "tests/Embedding/Makefile" according
http
Try.
median(rep(data$size, data$count))
thanks,
regards,
On Thu, 2005-03-17 at 14:42, Matt Mohebbi wrote:
> Hello,
>
> I have data of the following form:
>
> > data <- data.frame(type=c("c","d","e"), size=c(10,20,30), count=c(20,10,5))
> > data
> type size count
> 1c 1020
> 2
Dear Barry,
Thanks for your stimulating reply. As you see I have send a CC of this
reply to the R mailing list. The R mailing list will be the best place
to send your queries. You can subscribe here:
http://www.r-project.org/mail.html
I would think there is an interest in the provision of lands
Matt Mohebbi wrote:
Hello,
I have data of the following form:
data <- data.frame(type=c("c","d","e"), size=c(10,20,30), count=c(20,10,5))
data
type size count
1c 1020
2d 2010
3e 30 5
I would like to compute the quantiles of size given the counts. For
instance, in
Hello!
I am trying to move my work in R from Windows to Linux. However I am missing
some of the functionality I was used to under Windows. I tried running R
2.0.1 by typing R in the terminal and via Emacs/ESS. R Gui currently does
not work on my Linux. Currently one of my problems is:
Under Wi
72 matches
Mail list logo