Hi, how can I create a rainbow gradient in R? For example, let's say I have
a plot of y = x...and I want the plot to go from red -> orange -> yellow ->
green -> blue -> etc.
Right now, I know how to do something like go from red to blue, using the
plotrix library:
library(plotrix)
redToBlue <-
col
Dear Raja,
Give a look on merge() function.
Case you need more help, send us a short sample of your D.F1 and DF.sub.2
dataframes.
Hope this helps,
best wishes,
miltinho astronauta
brazil
On Wed, Sep 17, 2008 at 2:13 PM, Rajasekaramya <[EMAIL PROTECTED]>wrote:
>
> I have a dataframe D.F1
>
> >d
plot(1:20, col=rainbow(20))
On Wed, Sep 17, 2008 at 4:58 PM, Gillian Silver <[EMAIL PROTECTED]> wrote:
> Hi, how can I create a rainbow gradient in R? For example, let's say I have
> a plot of y = x...and I want the plot to go from red -> orange -> yellow ->
> green -> blue -> etc.
> Right now, I
Dear Gillian,
See ?rainbow and its example.
HTH,
Jorge
On Wed, Sep 17, 2008 at 4:58 PM, Gillian Silver <[EMAIL PROTECTED]>wrote:
> Hi, how can I create a rainbow gradient in R? For example, let's say I have
> a plot of y = x...and I want the plot to go from red -> orange -> yellow ->
> green
What would I do if I have something like:
x <- rnorm(1:1000)
y <- rnorm(1:1000)
z <- x + y
and I want the rainbow to increase with z? (i.e., red for lowest z...all the
way up to the last color in the rainbow for the highest z)
On Wed, Sep 17, 2008 at 2:05 PM, stephen sefick <[EMAIL PROTECTED]> w
On Sep 17, 2008, at 3:50 PM, Stacey Burrows wrote:
Dear R-users,
I have some very simple data where 1's represent events and zeroes
non-events, e.g.
temp <- rbind(c(0,1,0,0,1,1,1,0), c(0,0,0,1,0,0,0,0))
For each row in the matrix, I would like to replace a singelton
event by a 0. That is
Hi,
Is there an implementation of the G(rho,gamma) class of function
indexed weighted log-rank statistics in R? For example those mentioned
in the paper by Kosorok and Lin (1999): The Versatility of
Function-Indexed Weighted Log-Rank Statistics [JSTOR link :
http://www.jstor.org/pss/2669706]. I wi
Dear all,
I want to simulate a Strauss Hard Core process in 3D. I have found
that someone else tried to do the same and he recived this answer,
"If you need this immediately, I suggest you follow Brian Ripley's advice.
This probably involves downloading a source tar file of the R package
an
On Sep 17, 2008, at 5:25 PM, Ritwik Sinha wrote:
Hi,
Is there an implementation of the G(rho,gamma) class of function
indexed weighted log-rank statistics in R? For example those mentioned
in the paper by Kosorok and Lin (1999): The Versatility of
Function-Indexed Weighted Log-Rank Statistics
Hi Bo,
>> I can't seem to find the right set of commands to enable me to do perform
>> a
>> regression with cluster-adjusted standard-errors.
Frank Harrell's Design package has ?bootcov and ?robcov, which will both do
it.
Regards, Mark.
Bo Cowgill wrote:
>
> I can't seem to find the right se
Hi,
is there a Rdbi or other package to use firebird in R?
I am reviewing options for my Practice software and might have
to switch to a firebird based package so I would of course like
to be able to do some stats in R.
greetings, el
__
R-help@r-proj
On Wed, Sep 17, 2008 at 3:11 PM, Gillian Silver <[EMAIL PROTECTED]> wrote:
> What would I do if I have something like:
>
> x <- rnorm(1:1000)
> y <- rnorm(1:1000)
> z <- x + y
>
> and I want the rainbow to increase with z? (i.e., red for lowest z...all the
> way up to the last color in the rainbow
Others have answered the question that you asked (it is also a variation of Faq
7.21), but here is an answer to the question that you should have asked:
When working with datasets like this, it is better to create a list rather than
separate objects with names like dat1, dat2, etc.
For example:
Hello,
I am fairly new to R programming. I have a series of netcdf files that
I am able to open one at a time using open.ncdf. I want to write this
into an R script so that I can successively open each file by date in a
for-loop. Any suggestions?
Thanks
Brian Pettegrew
--
Brian Pettegre
On second thought, this is more likely to be what you're looking for...
library(rgl)
x <- rnorm(1000)
y <- rnorm(1000)
z <- x + y
plot3d(x, y, z, col = rainbow(1000, end = 5/6)[rank(z)], size = 3)
On Wed, Sep 17, 2008 at 4:06 PM, Kingsford Jones
<[EMAIL PROTECTED]> wrote:
> On Wed, Sep 17, 2008
On Sep 17, 2008, at 6:00 PM, Dr Eberhard W Lisse wrote:
Hi,
is there a Rdbi or other package to use firebird in R?
I am reviewing options for my Practice software and might have
to switch to a firebird based package so I would of course like
to be able to do some stats in R.
Per Prof Riple
On 18/09/2008, at 9:50 AM, <[EMAIL PROTECTED]> wrote:
Dear all,
I want to simulate a Strauss Hard Core process in 3D. I have found
that
someone else tried to do the same and he recived this answer,
"If you need this immediately, I suggest you follow Brian Ripley's
advice.
This probably
The example pointed to below is a good example of fortune(197).
It is possible to do using polygon (and is probably not as hard as you are
making it), but there is probably a better way to present your data. What
question are you trying to answer with this plot?
> -Original Message-
>
I want to create a dataset in R with spatial correlation (i.e. clustering)
built in for a linear regression analysis. Any tips on how to do this?
Thanks.
--
View this message in context:
http://www.nabble.com/Need-help-creating-spatial-correlation-for-MC-simulation-tp19542145p19542145.html
Sent
On Wed, Sep 17, 2008 at 3:58 PM, Gillian Silver <[EMAIL PROTECTED]> wrote:
> Hi, how can I create a rainbow gradient in R? For example, let's say I have
> a plot of y = x...and I want the plot to go from red -> orange -> yellow ->
> green -> blue -> etc.
Why would you want to? See
http://epub.wu-
On 17/09/2008 4:58 PM, Gillian Silver wrote:
Hi, how can I create a rainbow gradient in R? For example, let's say I have
a plot of y = x...and I want the plot to go from red -> orange -> yellow ->
green -> blue -> etc.
Right now, I know how to do something like go from red to blue, using the
plot
On 17-Sep-08 22:36:50, jjh21 wrote:
> I want to create a dataset in R with spatial correlation (i.e.
> clustering) built in for a linear regression analysis. Any tips
> on how to do this?
> Thanks.
The package 'spatstat' has functions for simulating several
different kinds of spatial process. Hopi
Dear Gang,
Your for loop is in error; try
for (ii in seq(length=nWin))
I hope this helps,
John
--
John Fox, Professor
Department of Sociology
McMaster University
Hamilton, Ontario, Canada
web: socserv.mcmaster.ca/jfox
> -Original Message-
> From: [EMAIL PRO
Dear Sam,
The "basis" matrix for your contrasts is not orthogonal, and so the tests
are almost surely not what you intended. Moreover, the "basis" matrix is not
even of rank 5, as you can see from the message produced by lm(),
"Coefficients: (1 not defined because of singularities)," and the missi
Hi,
I'm doing some coxph fits using the survival package. There are a large
number of potential predictors and so I was considering using stepAIC
for model selection. However, in the early stages I'm getting complaints
like the following:
Warning message:
In fitter(X, Y, strats, offset, init, co
Hi Ramya,
In this particular case, something like ?"complete.cases" should do the job.
With this function you can delete rows with one or more NA's.
Here is an example:
set.seed(123)
DF<-matrix(rnorm(100),ncol=10)
DF[1,2]<-NA
DF[1,3]<-NA
DF[4,10]<-NA
dim(DF)
[1] 10 10
DF.noNA <- DF[complete.cases
Hi,
I have a dataframe like the following:
xfact yfact zfact response
--- --- --- --
x1 y1 z1 r1
x1 y1 z2 r2
...
I want output that looks like:
___ zfac levels___
xfact yfact z1 z2 ... zn
---
Well, I don't see why you need the CTRL-R functionality when you can
just as rapidly and efficiently using SEARCH functionality in scripts
too (CTRL-F in most applications, CTRL-S in emacs etc).
BTW, I am quite familiar with Unix, Linux and Sun Solaris and what
CTRL-R does (yes, I used it fre
Dear Duncan and Vincent,
Thanks for your help. It took me some time to upgrade R because
atp-get install would not actually install the packages,
but I used
sudo aptitude install r-base
and that managed to upgrade the r-base package.
I'm also happy to say that RCurl as well as BiomaRt could now
Hi David,
Thanks, survdiff actually only has the G(rho) family, i.e. gamma is
set to 0. There is another package called surv2sample, that I found
only after I sent out the email, that contains what I am looking for.
Thanks,
Ritwik
On Wed, Sep 17, 2008 at 5:53 PM, David Winsemius <[EMAIL PROTECTE
The survdiff() function in the survival package does the G(rho) family
(ie, G(rho, gamma=0)).
-thomas
On Wed, 17 Sep 2008, Ritwik Sinha wrote:
Hi,
Is there an implementation of the G(rho,gamma) class of function
indexed weighted log-rank statistics in R? For example those mentione
Such a silly mistake! Thanks a lot, John!
Gang
On Wed, Sep 17, 2008 at 7:21 PM, John Fox <[EMAIL PROTECTED]> wrote:
> Dear Gang,
>
> Your for loop is in error; try
>
> for (ii in seq(length=nWin))
>
> I hope this helps,
> John
>
> --
> John Fox, Professor
> Department
Dear J.J.Harden
I think that on spatial stat you will find several ways of simulate spatial
pattern that (point or line) that may be what you are looking for. Case not,
please let me know and may be we can improve some solution.
Best wishes,
miltinho astronauta
brazil
On Wed, Sep 17, 2008 at
Hi, can someone please tell me how to convert a square matrix to a list in R?
i.e. I want to convert from:
a b c
a 1 1 1
b 2 2 2
c 3 3 3
to:
a a 1
a b 1
a c 1
b a 2
b
On Wed, Sep 17, 2008 at 8:52 PM, Pinder, Adrian
<[EMAIL PROTECTED]> wrote:
> Hi, can someone please tell me how to convert a square matrix to a list in R?
>
> i.e. I want to convert from:
>
>a b c
> a 1 1 1
> b 2 2 2
> c 3 3
Thanks to all who replied to this question. Jorge's script worked a treat.
Hi, can someone please tell me how to convert a square matrix to a list in R?
i.e. I want to convert from:
a b c
a 1 1 1
b 2 2 2
c 3 3 3
to:
a
Thanks to all who help out with this question.. Cut computation time
by a fourth! Victor Hernando Cervantes Botero's idea work great. As
well as Dan Davidson's
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEA
Thanks Duncan, I have also been wondering about this problem for a long time.
Regards,
Yihui
--
Yihui Xie <[EMAIL PROTECTED]>
Phone: +86-(0)10-82509086 Fax: +86-(0)10-82509086
Mobile: +86-15810805877
Homepage: http://www.yihui.name
School of Statistics, Room 1037, Mingde Main Building,
Renmin Univ
Hi Ramya,
Assuming that the problem is well defined (i.e. the values in col1 of the
data.frames are unique and every value in D.F.sub.2[,1] appears also in
D.F1[,1]) you can do the following:
ind <- match(D.F.sub.2[,1],D.F1[,1])
D.F1[ind,] <- D.F.sub.2
--- On Thu, 18/9/08, Rajasekaramya <[EMA
I am having trouble manipulating the simulated effects of a circle graph. I've
created a pseudo 3D plot using circle size as 3rd variable. The code I attached
has simulated data values for all 3 variable, and is plotting a graph showing
an interaction with all 3variables. I am trying to create
Hi, you may use list.files('dir-of-your-files', ...) to get the paths
of all the files, and use file.info() to get the date attribute, then
order them by date, and finally in a loop
for(i in paths-of-your-files){
open.ncdf(i, ...)
...
}
Regards,
Yihui
--
Yihui Xie <[EMAIL PROTECTED]>
Phone: +86-(
ODBC,
didn't think of that, thanks.
el
On 18 Sep 2008, at 00:31 , David Winsemius wrote:
On Sep 17, 2008, at 6:00 PM, Dr Eberhard W Lisse wrote:
Hi,
is there a Rdbi or other package to use firebird in R?
I am reviewing options for my Practice software and might have
to switch to a firebi
I don't quite understand your R code (I think your random numbers make
the graph very hard to read!), but I have also written an example for
the interaction effect:
## 400 bubbles to show the interaction of x and z
sq = seq(0, 10, length = 20)
x = rep(sq, 20)
z = rep(sq, each = 20)
y = c(outer(sq,
Hi
[EMAIL PROTECTED] napsal dne 17.09.2008 11:08:29:
> Greetings everyone,
>
> I'm trying to add a specific table or a specific number of rows (e.g.44)
to a
> table with no success.
>
> This is my basic table
> > head(dataA)
> yearplot spp prop.BDCA1DCA2DCA3DCA
Hi Hadley,
As for now, I have not yet delved deep enough into the new version to be
sure if I like it or not. It's just that I like the freedom to choose, and
the previous form was great. Any chance you may put it back as an optional
parameter?
Thanks,
Pedro
hadley wrote:
>
> On Wed, Sep 17, 200
The group would be happy to answer your question if you can show an example
data frame on what is there and what is required.
Â
Cheers,
Pratap
--- On Wed, 17/9/08, Rajasekaramya <[EMAIL PROTECTED]> wrote:
From: Rajasekaramya <[EMAIL PROTECTED]>
Subject: [R] inserting values for null
To: r-help@
101 - 146 of 146 matches
Mail list logo