Hi,
Could anyone give suggestions how to plot a scatter plot with 1 standard
deviation for each point. To make it clearer, here is a simple example: the
scatterplot is plot(X, Y), but I want to add 1 standard deviation according
to the value of Z for each Y.
X Y Z
1 3.51.1
.
FD wrote:
> Hi,
>
> Could anyone give suggestions how to plot a scatter plot with 1 standard
> deviation for each point. To make it clearer, here is a simple example: the
> scatterplot is plot(X, Y), but I want to add 1 standard deviation according
> to the value of Z for each Y.
>
> X Y
Dear R gurus,
I'm trying to visualize a matrix 256 x 920 using image(), but i find
the display too slow (~ 1 minute –– admittedly, my iBook G4 isn't
very fast). The aim is not to get a good resolution image, but rather
have a quick look at the matrix. I couldn't find a way to plot a
smalle
I'm not aware of any existing function that does what you want, but you
could easily write a function to sample from x, y, z, and then pass the
sampled values to image. e.g.,
sam <- function(sx,sy,x,y,z){
xind<-seq(1,length(x),by=sx)
yind<-seq(1,length(y),by=sy)
samplex<-x[xind]
sampley<-y
Take a looks at the 'hexbin' package on BioConductor. It may give you
want you want.
On 10/21/07, baptiste Auguié <[EMAIL PROTECTED]> wrote:
> Dear R gurus,
>
> I'm trying to visualize a matrix 256 x 920 using image(), but i find
> the display too slow (~ 1 minute –– admittedly, my iBook G4 isn't
Here is one way of doing it:
> a=c(100,200,150,120,140,180)
>
> b=c(200,300,420,130)
>
> suba=c(1,2,3,4,5,6)
>
>
> subb=c(1,3,5,6)
>
> pairs <- match(suba, subb, nomatch=0)
> # create matrix of matching pairs
> cbind(a[pairs != 0], b[pairs])
[,1] [,2]
[1,] 100 200
[2,] 150 300
[3,] 140
Try this:
A <- data.frame(subject = suba, a)
B <- data.frame(subject = subb, b)
merge(A, B, all = TRUE)[-1]
Omit all = TRUE if you only want matches, i.e. no rows with NAs, and
omit [-1] if you want an extra column giving the subject.
On 10/21/07, gallon li <[EMAIL PROTECTED]> wrote:
> I have tw
Hi all,
How do you count the number of objects in a matrix? Sorry if it's too basic a
question.
Thanks,
__
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://s
Under FreeBSD 6.2 I installed R 2.6.0.
Trying to load e.g. vignette("zoo") R calls acroread automagically.
I instead would like to use the lighter kde built-in pdf reader kGhostView-
Is this possible?
Vittorio
__
R-help@r-project.org mailing list
ht
On 10/21/07, [EMAIL PROTECTED]
<[EMAIL PROTECTED]> wrote:
> Under FreeBSD 6.2 I installed R 2.6.0.
> Trying to load e.g. vignette("zoo") R calls acroread automagically.
> I instead would like to use the lighter kde built-in pdf reader kGhostView-
> Is this possible?
Yes. If you set an environm
I have created a if loop as follows:
name = "e"
if (name == "v")
{
u = 0
}
else u = 1
however i am getting error : Error: unexpected 'else' in "else"
definitely I can write in : ifelse() form, however I want to write in this
way. Can anyone tell me where is my error?
thanks in advance
Hi Jim,
thanks a lot. It works, however - my other problem is that I need to
transpose the original table before reading it into the list because the
data come from Excel and it can't handle 7000 columns. I could read it
in R transpose end write into a new tab delim file and then read it back
On 21/10/2007, stat stat <[EMAIL PROTECTED]> wrote:
> I have created a if loop as follows:
>
> name = "e"
> if (name == "v")
> {
>u = 0
> }
> else u = 1
>
> however i am getting error : Error: unexpected 'else' in "else"
There are 3 issues here:
1. Do you appreciate the difference between i
I think you just want length()
Does this work for you?
aa <- matrix(1:25, nrow=5)
length(aa)
--- Muri Soares <[EMAIL PROTECTED]> wrote:
> Hi all,
> How do you count the number of objects in a matrix?
> Sorry if it's too basic a question.
>
> Thanks,
>
>
>
>
Dear Mark,
Thanks for this. Can you please explain me what is the difference between
ifelse and if?
generally if there is more than one syntax within the 'if' I use 'if' loop
otherwise I use 'ifelse' loop. Is it the only difference between them?
Mark Wardle <[EMAIL PROTECTED]> wrote: On 21/10/
On 21 October 2007 at 09:39, Douglas Bates wrote:
| On 10/21/07, [EMAIL PROTECTED]
| <[EMAIL PROTECTED]> wrote:
| > Under FreeBSD 6.2 I installed R 2.6.0.
| > Trying to load e.g. vignette("zoo") R calls acroread automagically.
| > I instead would like to use the lighter kde built-in pdf reader
Hello,
I am new to R and I am trying to figure out how to print text output from an
operation like table() to a pdf file. Is there a simple command to do this, or
do you need to work with connections at a rudimentary level?
Thanks you,
Jesse
[[alternative HTML version deleted]]
___
Thanks, Jim. That's exactly what I want.
FD
On 10/21/07, Jim Lemon <[EMAIL PROTECTED]> wrote:
>
> FD wrote:
> > Hi,
> >
> > Could anyone give suggestions how to plot a scatter plot with 1 standard
> > deviation for each point. To make it clearer, here is a simple example:
> the
> > scatterplot is
> Could anyone give suggestions how to plot a scatter plot with 1 standard
> deviation for each point. To make it clearer, here is a simple example: the
> scatterplot is plot(X, Y), but I want to add 1 standard deviation according
> to the value of Z for each Y.
You can do this with ggplot2 with t
Look at the xtable package and latex in the Hmisc package.
On 10/21/07, Jesse D Lecy <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I am new to R and I am trying to figure out how to print text output from an
> operation like table() to a pdf file. Is there a simple command to do this,
> or do you nee
What is it that you want to do? The 'scan' statement give you a list
of length 7000 with 19 entries each. Do you want to create a matrix
that has 7000 rows by 19 columns? If so, then you just have to take
the output of the 'scan' and do:
x.matrix <- do.call('rbind', x) # gives 7000 x 19 matrix
Gabor Grothendieck gmail.com> writes:
>
> Look at the xtable package and latex in the Hmisc package.
>
> On 10/21/07, Jesse D Lecy maxwell.syr.edu> wrote:
..
> > I am new to R and I am trying to figure out how to print text output from an
operation like table() to a pdf file.
> Is there a sim
Thanks, it works nicely. In the meantime, I came across a similar
approach taken in the documentation of ggplot2, using a small sample
of the diamonds data.
Thanks all again,
baptiste
On 21 Oct 2007, at 12:25, Katharine Mullen wrote:
> I'm not aware of any existing function that does what y
Hi to all,
Hi have a dificult installing the Rstem package from Duncan Lang (
http://www.omegahat.org/Rstem/).
I use 2.6.0 R version, and 0.2-3 from the "tm" package. I can't get a
correct instalation of this packages and I tryed some ways to pass this
problem but with no sucess.
Anyone can help
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Filipe Almeida wrote:
> Hi to all,
>
> Hi have a dificult installing the Rstem package from Duncan Lang (
> http://www.omegahat.org/Rstem/).
> I use 2.6.0 R version, and 0.2-3 from the "tm" package. I can't get a
It is helpful to tell us that you a
You are using WIndows (unstated). There is a binary available, and using
1) Packages | Select repositories & select Omegahat
2) Packages | Install packages & select Rstem
works for me.
On Sun, 21 Oct 2007, Filipe Almeida wrote:
Hi to all,
Hi have a dificult installing the Rstem packag
No.
Think of "if" only as a means to control program flow.
Use ifelse to use conditional logic on each item of a vector
Best wishes,
Mark
On 21/10/2007, stat stat <[EMAIL PROTECTED]> wrote:
> Dear Mark,
>
> Thanks for this. Can you please explain me what is the difference between
> ifelse and
The data I have is tab delimited file with 7000 lines of 19 values each
(representing 7000 permutations on 19 variables). I want to get it into
the ROCR package which expects the data to be in lists - single list of
19 values for each permutation, e.g. list of 7000 lists of 19 values each.
I ho
That is what I thought and that is the format that the 'scan' approach
should provide. I was just confused when you said that you were going
to have to transpose it, write it and then read it back in for some
reason. I understand that Excel can not handle 7000 columns, but was
wondering where tha
ggplot2
===
ggplot2 is a plotting system for R, based on the grammar of graphics,
which tries to take the good parts of base and lattice graphics and
avoid bad parts. It takes care of many of the fiddly details
that make plotting a hassle (like drawing legends) as w
Hi,
How do one avoid rownames when xtable is used to make tables for Latex.
<<>>=
MSe <- 0.12
MSa <- 0.15
MSap <- 0.13
MSp <- 0.14
k <- 5
n <- 4
r <- 30
EV <- 5.15*sqrt(MSe)
AV <- 5.15*sqrt((MSa - MSap)/(n *k))
Iap <- 5.15 * sqrt((MSap-MSe)/r)
GRR <- sqrt((EV)^2 + (AV)^2 + (Iap)^2)
PV <- 5
See ?print.xtable, e.g.
print(x, include.rownames = FALSE)
On 10/21/07, Klaus Friis Østergaard <[EMAIL PROTECTED]> wrote:
> Hi,
>
> How do one avoid rownames when xtable is used to make tables for Latex.
>
> <<>>=
> MSe <- 0.12
> MSa <- 0.15
> MSap <- 0.13
> MSp <- 0.14
>
> k <- 5
> n <- 4
> r <-
2007/10/22, Gabor Grothendieck <[EMAIL PROTECTED]>:
>
> See ?print.xtable, e.g.
>
> print(x, include.rownames = FALSE)
>
> Thanks
--
Klaus F. Østergaard,
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.et
The latest version of R did not make it in the recently released
Ubuntu Gutsy Gibbon. As the title says, packages for version 2.6.0 of
R are currently making their way to the CRAN mirrors. From the head
of the README file:
=
R packages for Ubuntu on i386 are available. The plans are to s
Hi all,
I will be teaching a graduate-level course on R at CU Boulder next
semester. I have a teaching idea that might also help improve the R
wiki page... I wanted to know what you all thought of it and wanted to
solicit some advice about doing it.
During the latter part of the course, students
This is test reply.
Please ignore my email
--
石井一夫
日本Rubyの会
[EMAIL PROTECTED]
http://officeparis.org/blog/
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posti
The goal is to smooth a scatterplot using the LOESS locally weighted
regression program and a gam. There are 156 points. Thus x can have the
value 1, or 2, etc., up to a maximum of x = 156. The y values are random,
with a Poisson distribution, or the next thing to it.
After reading in the data,
If you look at the example for predict.gam, it should be clear that
the data frame has a column(s) for the value(s) you want to predict
for:
> newd <- data.frame(x0=(0:30)/30,x1=(0:30)/30,x2=(0:30)/30,x3=(0:30)/30)
> pred <- predict.gam(b,newd)
> head(newd)
x0 x1 x2
May I inquire about how to obtain the coefficients from a loess fit of
multiple covariates? I have tried terms and coef, but it does not provide
me with the coefficients to identify the terms of the entire regression
equation.
Many thanks
Paul
--
Paul R. Hutson, Pharm.D.
I'd like to fit an ARMA(1,1) model to some data (Federal Reserve Bank
interest rates) that looks like:
...
30JUN2006, 5.05
03JUL2006, 5.25
04JUL2006, N < here!
05JUL2006, 5.25
...
One problem is that holidays have that "N" for their data. As a test, I
tried fitting ARMA(1
I think you need to see how things work before making any decision on
this. While the principle seems OK, in a optimistic sort of way, you
may be a little disappointed by the outcome. Some will likely be
superb, useful, well written and accessible. Others, I suspect, will
fall short of this idea
Dear all,
I have a mixed model of the form:
y[it]=a+b*z[i]+ai+(c+c[i])*x[it] ("i" refers to group and "t" to observation in
group).
zi are group-specific variables available only for a number of groups
and "ai", "ci" denote the random effects on the intercept and slope
respectively.
Is the
Bill, very interesting comment. However, do you believe that by posting
these tutorials on a wiki they could, even if initially faulty, be improved
by the community over time?
Ricardo
On 10/22/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> I think you need to see how things work before m
Hello R Gurus:
I would like to take a character string and split at the $ sign.
I thought that strsplit would do it, but here are the results:
> vv
[1] "whine$ts1"
> vv
[1] "whine$ts1"
> strsplit(vv,"$")
[[1]]
[1] "whine$ts1"
Does anyone have any suggestions, please?
Thanks,
Edna Bell
__
loess() is a 'local' fitting procedure, which means that it fits a
different regression at each prediction point. (In principle, for there
are computational short cuts: see ?loess.control.) Since each fit is only
used for a single prediction, its coeffiicients are not of interest and
not made
Try
strsplit(vv,"$",fixed=TRUE)
--- Edna Bell <[EMAIL PROTECTED]> wrote:
> Hello R Gurus:
>
> I would like to take a character string and split at
> the $ sign.
>
> I thought that strsplit would do it, but here are
> the results:
>
> > vv
> [1] "whine$ts1"
> > vv
> [1] "whine$ts1"
> > strspli
On Mon, 22 Oct 2007, Edna Bell wrote:
> Hello R Gurus:
>
> I would like to take a character string and split at the $ sign.
>
> I thought that strsplit would do it, but here are the results:
>
>> vv
> [1] "whine$ts1"
>> vv
> [1] "whine$ts1"
>> strsplit(vv,"$")
> [[1]]
> [1] "whine$ts1"
>
>
> Does
47 matches
Mail list logo