-Original Message-
From: Petr Pikal [mailto:[EMAIL PROTECTED]
Sent: 03 September 2003 13:57
To: [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Subject: Re: [R] plotting a distribution curves
Hallo
On 1 Sep 2003 at 16:25, Rajarshi Guha wrote:
Hi,
is there a way to plot
Eugene,
R allows indexing with logical vectors, so your example would look
like
hist(X[(Y=A) (Y=B)])
See the manual An Introduction to R for details.
HTH
Thomas
-Original Message-
From: Eugene Salinas [mailto:[EMAIL PROTECTED]
Sent: 27 August 2003 09:49
To: [EMAIL PROTECTED]
As ?residuals.glm reveals, it's got an argument type:
type: the type of residuals which should be returned. The
alternatives are: `deviance' (default), `pearson',
`working', `response', and `partial'.
You calculated response residuals, R gives deviance residuals
by
Simon,
You might want to have a look at these two articles in R News
(http://CRAN.R-project.org/doc/Rnews/):
Paul Murrell. The grid graphics package. R News, 2(2):14-19, June 2002.
Deepayan Sarkar. Lattice. R News, 2(2):19-23, June 2002.
HTH
Thomas
-Original Message-
From: Roger
Dear Aedin,
Similar questions have been asked quite often on this list.
See FAQ 7.25, the manual An Introduction to R, and the online
help, especially ?merge, ?sort, ?order, and ?data.frame.
HTH
Thomas
-Original Message-
From: Culhane, Aedin [mailto:[EMAIL PROTECTED]
Sent: 15
Dear Fred,
If x1 and x2 are *not* normally distributed, you can use
independent component analysis (ICA) which is based on the
idea that x will be more normal than either x1 and x2
following the central limit theorem. See package(fastICA)
by JL Marchini, C Heaton, and BD Ripley for details.
HTH
Dear Jens,
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 13 August 2003 10:01
To: [EMAIL PROTECTED]
Subject: [R] placing labels in polygon center ?
Dear all,
is there any function to calculate the center of a polygon mass in R?
Actually I need to
Dear Paul,
Use order() to get the indices of the ordered rows.
See ?order
blah - data.frame(X = rep(3:1, each=4), Y = rep(c(2,1,2,1), 3), Z = rep(2:1, 6))
blah
X Y Z
1 3 2 2
2 3 1 1
3 3 2 2
4 3 1 1
5 2 2 2
6 2 1 1
7 2 2 2
8 2 1 1
9 1 2 2
10 1 1 1
11 1 2 2
12 1 1 1
blah -
Dear Tobias,
The trick is Programming on the Language, see e.g. the R Language Manual.
Construct the expression you want, and have it explicitly parsed and evaluated.
toy - function(b=.95){
toyframe - eval(parse(text=paste(data.frame(lion, b, = c(1, 2)), sep=)))
return(toyframe)
z}
toy()
July 2003 15:46
To: Hotz, T.
Subject: RE: [R] Confidence Band for empirical distribution function
On 22 Jul 2003 at 11:37, Hotz, T. wrote:
Dear Leif,
If you look at the definition of ks.test, you'll find the lines
pkstwo - function(x, tol = 1e-06) {
if (is.numeric(x
Dear Salvatore,
Assuming that you mean convolution when you write
additive linkage, the answer is that there is no general
answer. It will depend heavily on the joint distribution
of the two random variables.
Just to give a simple example, let X~f, Y~g, and
P(X=0.4)=P(Y=0.4)=1. Then, X and Y
Dear Leif,
If you look at the definition of ks.test, you'll find the lines
pkstwo - function(x, tol = 1e-06) {
if (is.numeric(x))
x - as.vector(x)
else stop(Argument x must be numeric)
p - rep(0, length(x))
p[is.na(x)] - NA
IND - which(!is.na(x) (x 0))
if
Dear Luis,
You might want to have a look at
Bill Venables. Programmer's niche. R News, 2(2):24-26, June 2002
which you can find at http://cran.r-project.org/doc/Rnews/
or look into the manual R Language Definition, chapter
Computing on the language.
Assuming that in your case the variable to be
Dear Andrew,
Assuming your variables are called V1 to V4, and are vectors,
I'd use something like
plot(V1,V2,xlim=range(V1,V3),ylim=range(V2,V4),type=n)
segments(V1,V2,V3,V4)
HTH
Thomas
---
Thomas Hotz
Research Associate in Medical Statistics
University of Leicester
United Kingdom
Dear Vincent,
You can't clear a title only. The idea is to plot without one, like
plot(...,main=,sub=,xlab=,ylab=)
and add the title by hand (as you mentioned).
Moreover, AFAIK you can't clear one plot in a multiple figure environment,
since you can only clear the graphics device (not the
Dear Michael,
There was an email thread midst June 2003 on a related issue.
The suggestions made there will certainly help you
Have a look for thread Programcode and data in the same textfile
(just type it into the R Site Search, and the thread will come up).
I recall that read.table() has an
my.list-list(a=1,b=2)
length(my.list)
[1] 2
my.list$c-3
my.list[[length(my.list)+1]]-4
my.list
$a
[1] 1
$b
[1] 2
$c
[1] 3
[[4]]
[1] 4
HTH
Thomas
---
Thomas Hotz
Research Associate in Medical Statistics
University of Leicester
United Kingdom
Department of Epidemiology and Public Health
-Original Message-
From: Prof Brian Ripley [mailto:[EMAIL PROTECTED]
Sent: 23 June 2003 22:35
To: Paul, David A
Cc: [EMAIL PROTECTED]
Subject: Re: [R] ?plot problem
On Mon, 23 Jun 2003, Paul, David A wrote:
R1.7.0, Win2k:
When I use plot( ) on a groupedData object,
If you are talking about a running median smooth à la Tukey,
smooth() in library(eda) might be of help.
Best wishes
Thomas
-Original Message-
From: Henrique Patrício Sant'Anna Branco
[mailto:[EMAIL PROTECTED]
Sent: 23 June 2003 23:53
To: [EMAIL PROTECTED]
Subject: [R] Smooth of
Dear all,
Please take my apologies if that has already been asked
- at least I couldn't find it in the archives.
When trying to specify a layout within library lattice,
i.e. using xyplot, I get an error when the prepanel
function tries to subscript the automatically generated
x.limits. This
Dear Vincent
I'd like to know if there is a function already implemented
to count the
number of occurence of a given values in a vector
Does
my.matrix-cbind(c(0,1,NA),c(NA,1,NA))
count.NA-function(the.matrix){
result-t(apply(the.matrix,1,function(x,n){
m-sum(is.na(x))
c(m,m/n)
Dear Tobias,
I would like to study the dynamics of
functions using R (instead of mathematica e.g.),
i.e. the behavior of points under iteration
of a function.
So I tried (in vain) writing a function
myfunction - function(f,n,x){...}
in order to compute f^{n}(x), f^{n}(x) being
the
I have time series and need to draw simple and partial
correlograms with associated Q-statistics (the same as in
EViews). Can I do it in R? Thanks
library(ts) contains functions acf and pacf which come with
corresponding plot methods. See their help pages for details.
I don't know anything
I have a question about using the layout command within a
function. I've
written function that uses layout to create a figure from 2
plots. This
works fine to create a figure. When I use par(mfrow =
c(2,2)) to create multiple
plots, it seems that the layout command resets the mfrow
24 matches
Mail list logo