On 14/09/2007, at 3:41 PM, zhijie zhang wrote:
> Dear Rusers,
> I'd like to take the cases of cancer of the larynx in chorley
> (spatstat) to
> explain my question.
> I want to join the points of cancer of the larynx with the disused
> industrial incinerator to generate lines, and then calcu
Thanks, this works great! --Eric
D L McArthur wrote:
>
> Eric R juno.com> writes:
>>... I want to export the coefficients to a spreadsheet
>
> names(w)
> write.csv (w$coefficients, file=...)
>
> -- D L McArthur, UCLA Sch of Medicine, dmca ucla.edu
>
> _
Dear Rusers,
I'd like to take the cases of cancer of the larynx in chorley(spatstat) to
explain my question.
I want to join the points of cancer of the larynx with the disused
industrial incinerator to generate lines, and then calculate the angles of
these line comparing the horizontal line?
I may be miles off base, but could this be treated as a random-effects model,
with the regression predictors as random effects grouped by week? And if so,
could each set form a single lme() model, allowing you to compare the models
via AIC's for 'quality' and anova for significance of the differ
On 13/09/2007 6:26 PM, Zheng Lu wrote:
> Dear all:
>
> when I add legend into the upper right concer of the plot region, it
> always has a square region in which the text is, how to get rid of that
> square region, I just want pure text.
Use bty="n" in the call to legend.
> For the log-scale o
Bricklemyer, Ross S wrote:
> I am attempting to write a routine where I can run PAM (partition around
> mediods) on a dataset containing multiple soil cores and PCA spectral data
> from several depths per core. I want to run PAM on each individual core, so
> I need to group the data by core to
Eric R juno.com> writes:
>... I want to export the coefficients to a spreadsheet
names(w)
write.csv (w$coefficients, file=...)
-- D L McArthur, UCLA Sch of Medicine, dmca ucla.edu
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/
I am attempting to write a routine where I can run PAM (partition around
mediods) on a dataset containing multiple soil cores and PCA spectral data from
several depths per core. I want to run PAM on each individual core, so I need
to group the data by core to run the analysis. Below is an exam
Dear all:
when I add legend into the upper right concer of the plot region, it
always has a square region in which the text is, how to get rid of that
square region, I just want pure text.
For the log-scale on y axis, they appear as 1e-02, 1e+00 and 1e+02, how
to change to 0.01, 1, 100.
how t
VTLT1999 wrote:
> Hello All,
>
> I am trying to subset a matrix using subset() and it works fine when I use
> matrix notation, but doesn't work when I use established column names.
> Sample code is below:
>
> library(mvtnorm)
> library(sm)
> library(ltm)
> library(irtoys)
>
> k<- 100
> set.seed(27
On 9/13/07, Sebastian Weber <[EMAIL PROTECTED]> wrote:
> Dear list,
>
> I'm trying to produce a plot via xyplot with minimal sourounding white
> space. However, I cannot find the options in xyplot, ps.options or
> wherever which prevents lattice from drawing quite some white space
> around my plot.
Hello All,
I am trying to subset a matrix using subset() and it works fine when I use
matrix notation, but doesn't work when I use established column names.
Sample code is below:
library(mvtnorm)
library(sm)
library(ltm)
library(irtoys)
k<- 100
set.seed(271828)
t <-
rmvnorm(n=k,mean=c(-1,0,1),
Hello,
After I use the lm() function to perform a multiple linear regression, and
then use the step function to eliminate variables that predict the weakest,
I need to export the final equation to a spreadsheet or a text file. Below
is some sample code. In the end I want to export the coefficien
On Thu, 13 Sep 2007, Leeds, Mark (IED) wrote:
> you're right Duncan. My bad. That was kind of dopey because R squared is
> a statistic in itself. They aren't nested models because
> the two predictors are different and there are no other predictors. I'm
> trying to see whether the model B predi
The second argument for aggregate is supposed to be a list, so try
(notice the missing comma before "1:8"):
test <- aggregate(lf1.turbot[,c(11, 12, 17:217)], lf1.turbot[1:8],sum)
On 9/13/07, Tobin, Jared <[EMAIL PROTECTED]> wrote:
> Hello r-help,
>
> I am trying to collapse or aggregate 'some' o
Thank you very much! Teachers. one more curiosity is if there is a
similar good way to this thing in S-PLUS? I am thinking to compare
these two softwares on several functions. I appreciate.
Lu
Quoting Katharine Mullen <[EMAIL PROTECTED]>:
> see ?plotmath
>
> you want to use "mu" for micro, a
On 9/13/07, Andrew Smith <[EMAIL PROTECTED]> wrote:
> I would like to make what seems like a simple addition to a display
> constructed from a call to levelplot -- I want to add a text label
> (which will, in general, depend on the object being plotted, and so
> cannot be hardcoded) to the origin,
OOPS!! When I wrote "use readline()" below, I meant
use readLInes()
Sorry! For more information see ?readLines
Ted.
On 13-Sep-07 20:32:37, Ted Harding wrote:
> On 13-Sep-07 20:06:35, Maura E Monville wrote:
>> I have 316 files. Each file represents a patient's breathing
>> track (respiratory
On 13-Sep-07 20:06:35, Maura E Monville wrote:
> I have 316 files. Each file represents a patient's breathing
> track (respiratory signal recorded for a variable number of
> cycles).
> All files have the same are made up of a header followed by
> a variable number of records.
> Each record contains
On Thu, Sep 13, 2007 at 03:06:35PM -0500, Maura E Monville wrote:
> I have 316 files. Each file represents a patient's breathing track
> (respiratory signal recorded for a variable number of cycles). All files
> have the same are made up of a header followed by a variable number of
> records.
You
Mark,
Estimates of R values can be compared using Fishers r to z transform. Perhaps
this will
do what you wish to do.
John
John Sorkin M.D., Ph.D.
Chief, Biostatistics and Informatics
Baltimore VA Medical Center GRECC,
University of Maryland School of Medicine Claude D. Pepper OAIC,
University of
Hello r-help,
I am trying to collapse or aggregate 'some' of a data frame. A very
simplified version of my data frame looks like:
> tester
trip set num sex lfs1 lfs2
1 313 15 5 M23
2 313 15 3 F12
3 313 17 1 M01
4 313 17 2 F11
5 313 17
I have 316 files. Each file represents a patient's breathing track
(respiratory signal recorded for a variable number of cycles). All files
have the same are made up of a header followed by a variable number of
records.
Each record contains 7 comma separated fields.
The patient ID is recorder in th
Dear list,
I'm trying to produce a plot via xyplot with minimal sourounding white
space. However, I cannot find the options in xyplot, ps.options or
wherever which prevents lattice from drawing quite some white space
around my plot. However, this is quite a problem for me as I want to
produce an i
Look at ?plotmath, could you use a greek mu for the micro part?
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Zheng Lu
> Sent:
On 9/13/2007 2:47 PM, Zheng Lu wrote:
> Dear all:
>
> Is there any one could tell me how I can represent Micro-molar as an
> unit of concentration when I plot with R(S-plus), I don't want write
> 'uM' from keyboard, I am thinking to write it like in word, in word,
> people insert symbol for 'u'
see ?plotmath
you want to use "mu" for micro, as in
plot(1:10, ylab = expression(paste(mu, "M")))
On Thu, 13 Sep 2007, Zheng Lu wrote:
> Dear all:
>
> Is there any one could tell me how I can represent Micro-molar as an
> unit of concentration when I plot with R(S-plus), I don't want write
> 'uM
Ravi Varadhan wrote:
>
> Finding sufficiently accurate rational approximations to a real
> number, can be done using fractions() in MASS, which uses
> continued fractions.
>
In a slight off-topic digression, I recently learned that
any irrational number that can be nicely approximated by
rational
Is the data paired? i.e. do you have an A and a B from week 1, then the
same for each following week?
If so, then you could probably do a simple sign test, within each week
see if rsquared B > rsquared A. under the null hypothesis that A and B
are equivalent this should be a binomial with paramet
nuyaying said the following on 9/13/2007 9:50 AM:
>
> I have a data set with 3 variables V1, V2, V3. If there are 2 data points
> have the same values on both V1 and V2, I want to delete one of them which
> has smaller V3 value.i.e., in the data below, I want to delete
> the first observa
Here a way of doing it:
> x <- cbind(V1=sample(1:3,20,TRUE), V2=sample(1:3,20,TRUE), V3=sample(20))
> x
V1 V2 V3
[1,] 2 2 1
[2,] 1 2 6
[3,] 3 2 10
[4,] 3 1 11
[5,] 3 2 5
[6,] 3 2 7
[7,] 2 1 19
[8,] 3 3 13
[9,] 1 3 2
[10,] 3 3 20
[11,] 3 3 18
[12,] 2 1 4
How about (assuming the data is in the data frame my.df):
> my.df2 <- my.df[order(my.df$V3, decreasing=TRUE),]
> my.df3 <- my.df2[ !duplicated( my.df2[,c('V1','V2')] ), ]
If order of the rows matters then we will need to add a couple of steps
to reorder. You did not say what to do if 3 or more p
Dear all:
Is there any one could tell me how I can represent Micro-molar as an
unit of concentration when I plot with R(S-plus), I don't want write
'uM' from keyboard, I am thinking to write it like in word, in word,
people insert symbol for 'u' for uM. Am I clear? Thank you very much
for your
you're right Duncan. My bad. That was kind of dopey because R squared is
a statistic in itself. They aren't nested models because
the two predictors are different and there are no other predictors. I'm
trying to see whether the model B predictor is "better" than the
Model A predictor. I guess h
Alfredo Alessandrini wrote:
> Hi,
>
> If I have this values:
>
> 21
> 23
> 14
> 58
> 26
>
>
> How can I sum the values by a progression like this:
>
> (21)
> (21 + 23)
> (21 + 23 + 14)
> (21 + 23 + 14 + 58)
> (21 + 23 + 14 + 58 + 26)
> (21 + 23 + 14 + 58 + 26)
>
> I've try with the functio
Is this what you want:
> x
[1] 21 23 14 58 26
> cumsum(x)
[1] 21 44 58 116 142
On 9/13/07, Alfredo Alessandrini <[EMAIL PROTECTED]> wrote:
> Hi,
>
> If I have this values:
>
> 21
> 23
> 14
> 58
> 26
>
>
> How can I sum the values by a progression like this:
>
> (21)
> (21 + 23)
> (21 + 2
On 9/13/2007 2:18 PM, Leeds, Mark (IED) wrote:
> I estimate two competing simple regression models, A and B where the LHS
> is the same in both cases but the predictor is different (
> I handle the intercept issue based on other postings I have seen ). I
> estimate the two models on a weekly basis
Hi,
If I have this values:
21
23
14
58
26
How can I sum the values by a progression like this:
(21)
(21 + 23)
(21 + 23 + 14)
(21 + 23 + 14 + 58)
(21 + 23 + 14 + 58 + 26)
(21 + 23 + 14 + 58 + 26)
I've try with the function "loop"
Best Wishes,
Alfredo
[[alternative HTML v
nuyaying wrote:
> I have a data set with 3 variables V1, V2, V3. If there are 2 data points
> have the same values on both V1 and V2, I want to delete one of them which
> has smaller V3 value.i.e., in the data below, I want to delete
> the first observation. How can I do that ?Thanks in
I estimate two competing simple regression models, A and B where the LHS
is the same in both cases but the predictor is different (
I handle the intercept issue based on other postings I have seen ). I
estimate the two models on a weekly basis over 24 weeks.
So, I end up with 24 RSquaredAs and 24
I have a data set with 3 variables V1, V2, V3. If there are 2 data points
have the same values on both V1 and V2, I want to delete one of them which
has smaller V3 value.i.e., in the data below, I want to delete
the first observation. How can I do that ?Thanks in advance!
V1 V
Alle giovedì 13 settembre 2007, Stefano Calza ha scritto:
>
> see "fractions" in library MASS
>
Yeah!
> 1/3
[1] 0.333
> fractions(0.333)
[1] 1/3
Great! Thanks! (grazie :) )
Mauro
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailm
I would like to make what seems like a simple addition to a display
constructed from a call to levelplot -- I want to add a text label
(which will, in general, depend on the object being plotted, and so
cannot be hardcoded) to the origin, which has special significance in
my problem. The x and y a
Birgit Lemcke wrote:
> Hello!
>
> I am using R 2.5.1 on a Apple Power Book G4 with Mac OS X 10.4.10 and
> I am still R beginner.
>
> I try to calculate a t.test() using this code:
>
> TTest75<-t.test(Fem75, Mal75, alternative= "two.sided", paired= TRUE)
>
> This works properly, but I have t
I should have remembered MASS::fractions(). This has a slightly different
aim, giving continued fraction approximations to any real number, where my
function just tries to handle numbers that really are close to fractions
with small denominators.
For example, unfrac() won't report a fraction
On Thu, 13 Sep 2007, Abu Naser wrote:
Hello all R user,
I am very new with r I have been wondering whether anyone could help me.
I have a 23000 row and 273 colums. What I want to do is to calculate unit
vector for every
3 colums along the row. Could you please advise me how to do that using R
Has anyone had any luck using the Windows ROracle package binary from
http://stat.bell-labs.com/RS-DBI/index.html? It's version 0.5-7 and
I've tried it with DBI version 0.1-10 (found on the site) as well as the
newest 0.2-3. With both versions I get the following error:
> require(ROracle)
Loading
Finding sufficiently accurate rational approximations to a real number, can
be done using fractions() in MASS, which uses continued fractions.
"Sufficient" accuracy can be specified using the number of cycles and
maximum denominator size options (note that max.denom is the final term in
the continu
I don't know why windows is so slow/jumpy doing it your way. One
alternative is to use the tkrplot library. This does redraw the plot
every time, but it is fast enough that it goes pretty smooth. Here is
an example that you can start with to see if it does what you want:
library(tkrplot)
y <-
Hello!
I am using R 2.5.1 on a Apple Power Book G4 with Mac OS X 10.4.10 and
I am still R beginner.
I try to calculate a t.test() using this code:
TTest75<-t.test(Fem75, Mal75, alternative= "two.sided", paired= TRUE)
This works properly, but I have two variables with a lot of missing
Original Message
Subject: [R] how to obtain the CPU time of my program
From: gang xu <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
Date: 13.09.2007 17:16
> Dear R users and experts,
>
> I am current running a program (a series of commands) in R. such as:
>
> A <- as.matrix(read.table
Here's how to use it:
f <- function() {
<>
}
system.time( f() )
It is not required to define a function, but i think it is easier.
Gabor
On Thu, Sep 13, 2007 at 04:16:45PM +0100, gang xu wrote:
> Dear R users and experts,
>
> I am current running a program (a series of commands) in R. such
On Thu, 13 Sep 2007, Mauro Arnoldi wrote:
> Hi everybody!
> I'm new to this list and also to the R program.
>
> I'd like to know if there is a function able to convert results into
> Fractional form like my scientific calculator have. For example:
>
>> 1/3
> [1] 0.333
>
>> function_that_return
Hello
I am trying to get the estimated value of logit(p), along with its
standard error/conf interval from a logistic regression model (for the
overall sample, and for individual treatment levels), where p is the
proportion of "successes". I am having difficulty in finding how to
tell R to give thi
in addition to Charles' suggestion which is more advanced, I found the link
below very helpful.
http://www.feferraz.net/en/shaded.html
good luck
AA.
- Original Message -
From: "Charles Annis, P.E." <[EMAIL PROTECTED]>
To: "'gallon li'" <[EMAIL PROTECTED]>; "'r-help'"
<[EMAIL PROTECTED]>
Dear R users and experts,
I am current running a program (a series of commands) in R. such as:
A <- as.matrix(read.table("C:/LP.txt"));
a=which(memb==q); b=a; B=as.matrix(A[a,b])
LS=sum(B)/2;
TL=sum(A)/2
i<-c(1:NN);
D=sum(A[a,i]);
how can i obtain the CPU time used for these commands ?
I h
Try:
library(MASS)
?fractions
On 9/13/07, Mauro Arnoldi <[EMAIL PROTECTED]> wrote:
> Hi everybody!
> I'm new to this list and also to the R program.
>
> I'd like to know if there is a function able to convert results into
> Fractional form like my scientific calculator have. For example:
>
> > 1
Mauro Arnoldi wrote:
> Hi everybody!
> I'm new to this list and also to the R program.
>
> I'd like to know if there is a function able to convert results into
> Fractional form like my scientific calculator have. For example:
>
>> 1/3
> [1] 0.333
>
>> function_that_return_a_fraction_from
A Lenzo wrote:
> Hello R gurus,
>
> Until recently, I used the following commands to update R:
>
> options(CRAN = "http://cran.stat.ucla.edu";)
> install.packages(CRAN.packages()[,1])
>
> But now I am told that install.packages is deprecated and that I should use
> available.packages
No, it t
Testing if I can mail to the list! None of my emails seem to be getting through.
Apologies.
Wayne Jones
Statistical Consultant
Shell Global Solutions (UK)
Shell Technology Centre Thornton, P.O. Box 1, Cheste
CRAN.packages() is deprecated.
On 13/09/2007, A Lenzo <[EMAIL PROTECTED]> wrote:
>
> Hello R gurus,
>
> Until recently, I used the following commands to update R:
>
> options(CRAN = "http://cran.stat.ucla.edu";)
> install.packages(CRAN.packages()[,1])
>
> But now I am told that install.packages is
look at ?fractions
> fractions(.3)
[1] 1/3
On Thu, 13 Sep 2007, Mauro Arnoldi wrote:
> Hi everybody!
> I'm new to this list and also to the R program.
>
> I'd like to know if there is a function able to convert results into
> Fractional form like my scientific calculator have. For example:
>
Hi there,
Rather than cross validating or bootstrapping to prune a single tree you could
use random forest instead. Look at the overview in
http://www.stat.berkeley.edu/~breiman/RandomForests/cc_home.htm
THere is a package in R for doing this called library(randomForest). I have
found it to
Welcome (benvenuto),
see "fractions" in library MASS
es:
> fractions(1/2)
[1] 1/2
Ciao
Stefano
On Thu, Sep 13, 2007 at 04:54:01PM +0200, Mauro Arnoldi wrote:
Hi everybody!
I'm new to this list and also to the R program.
I'd like to know if there is a function able to convert results into
On 9/13/07, John McHenry <[EMAIL PROTECTED]> wrote:
> Dear WizaRds,
>
> This is mostly a statistics question, but I'm figuring that R is the right
> solution (even before I start!)
>
>
Also have a look at these tutorials (in the journal Statistics in
Medicine, needs subscription)
http://dx.doi.o
Hello R gurus,
Until recently, I used the following commands to update R:
options(CRAN = "http://cran.stat.ucla.edu";)
install.packages(CRAN.packages()[,1])
But now I am told that install.packages is deprecated and that I should use
available.packages
Can anyone tell me what the corresponding c
Hello all,
I've just switched to running R 2.5.1 on a Mac 0S X 10.4.1 platform. I
can't seem to find how to run simultaneous R sessions. Didn't see anything
in the archives on this or under the R file menu.
Thanks!
David
__
R-help@r-project.org maili
Hello all,
I've just switched to running R 2.5.1 on a Mac 0S X 10.4.1 platform. I
can't seem to find how to run simultaneous R sessions. Didn't see anything
in the archives on this or under the R file menu.
Thanks!
David
__
R-help@r-project.org maili
Hello all R user,
I am very new with r I have been wondering whether anyone could help me.
I have a 23000 row and 273 colums. What I want to do is to calculate unit
vector for every
3 colums along the row. Could you please advise me how to do that using R?
with regards,
Abu
__
Hi everybody!
I'm new to this list and also to the R program.
I'd like to know if there is a function able to convert results into
Fractional form like my scientific calculator have. For example:
> 1/3
[1] 0.333
> function_that_return_a_fraction_from_numbers(0.333)
[1] 1/3
Thanks
Maur
Hi!
Olga K. Kamneva wrote:
> Hello, All!
>
> I have function which is written in C, the function uses other functions
> also builded bu me. Now I need to use the function to build R function.
> My questions are:
> 1. How can I include libraries (for example, iomanip, sstream, tcl.h)?
> 2. Should
Dear Ralph.
You can use the kruskal function of the library agricolae.
greetings.
Felipe
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of Ralph Scherer
Sent: Thursday, September 13, 2007 5:44 AM
To: r-help@r-project.org
Subject: [R] which test for seven group
"Olga K. Kamneva" <[EMAIL PROTECTED]> writes:
> Hello, All!
>
> I have function which is written in C, the function uses other functions
> also builded bu me. Now I need to use the function to build R function.
> My questions are:
> 1. How can I include libraries (for example, iomanip, sstream, tc
Thanks very much for replying -- just one final question: does this hold
when the outcome is continuous (and not discrete) e.g instead of the
outcome being multinomial we have a continuous outcome like residuals?
Thanks again
Fiona
> Fiona Callaghan asked about using the bootstrap instead of
> c
You did read the "Writing R Extensions" manual before posting, did you?
Le 13 sept. à 01:05, Olga K. Kamneva a écrit :
> Hello, All!
>
> I have function which is written in C, the function uses other
> functions
> also builded bu me. Now I need to use the function to build R
> function.
> My
Thank you for bringing your thread to my attention. The discussion therein
pretty much encapsulated what I was trying to find out.
-- TMK --
212-460-5430home
917-656-5351cell
>From: "Muenchen, Robert A (Bob)" <[EMAIL PROTECTED]>
>To: <[EMAIL PROTECTED]>
>CC: "Talbot Katz" <[EMAIL PR
hello!
My Problem is, that I want to compare seven groups, which have the
discrete values from 0 to 3. These are damageclasses of plants. 0 is
best and 3 is worst. Every group has 4 replications with 2 plants. The
two plants were together in a cage with animals. I think the problem is
that the
While it's true that polygon() is the function you need, perhaps it would be
helpful to see an example of how to use polygon().
Go here: http://addictedtor.free.fr/graphiques/thumbs.php
Put the mouse over the thumbnail plots to see larger pictures and look for
something useful. You will find it
On Wed, 2007-09-12 at 21:43 +0200, John Lande wrote:
> I need to increase the width of the border in a barplot, i checked both
> barplot, and barplot2, but cant find how to do it. how can I do?
If you are referring to the borders of the bars themselves, you can
adjust par("lwd") prior to calling b
Armstrong, Whit wrote:
> dts <- c("2004-8-1","2004-10-1","2001-9-1")
> strptime(dts,"%Y-%m-%d")
> julian(strptime(dts,"%Y-%m-%d"))
>
>
>
Why do people insist on missing the obvious?
> x <- c("2004-8-1","2004-10-1","2001-9-1")
> as.Date(x) - as.Date("1960-1-1")
Time differences in days
[1] 1628
dts <- c("2004-8-1","2004-10-1","2001-9-1")
strptime(dts,"%Y-%m-%d")
julian(strptime(dts,"%Y-%m-%d"))
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of zhijie zhang
> Sent: Thursday, September 13, 2007 8:19 AM
> To: [EMAIL PROTECTED]
> Subject: [R]
Take a look at the "chron" package...
> as.chron("2004-8-1",format=c(dates="y-m-d")) -
> as.chron("1960-1-1",format=c(dates="y-m-d"))
Time in days:
[1] 16284
On 9/13/07, zhijie zhang <[EMAIL PROTECTED]> wrote:
>
> Dear Rusers,
> I have some data in .csv file like "2004-8-1" and "2004-10-1",
Hi,
I have a large plot that I would like to display in a graphics device with
scroll bars. I therefore decided to use the windows function like so...
mag<- length(tick)
windows(height=mag/8, width=10, rescale="fixed")
However, when I use the scroll bars the device (i guess) is re-drawing the
pl
Dear Rusers,
I have some data in .csv file like "2004-8-1" and "2004-10-1", and i need
to convert them into days from the origin (January 1, 1960).
I have tried the function date.mmdd(), but cannot get it. Anybody can
show me how to handle the date data?
Thanks very much!
My dataset like:
We use JRI as par of a R web service infrastructure, where we have
Java classes around specific R functions (lm, randomForest, nnet etc)
as well as classes that call arbitrary R code
You can look at the code at http://cicc-grid.svn.sourceforge.net/
viewvc/cicc-grid/cicc-grid/rws/trunk/src/net
?polygon
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of gallon li
Sent: 13 September 2007 11:52
To: r-help
Subject: [R] how to plot shaded area under a curve?
say, I am plotting
x=seq(0,5,len=100)
y=-(x-5)^2
plot(x,y)
how can I put some color or ver
On 13/09/2007 5:47 AM, T.Lok wrote:
> Yesterday I spend the whole day struggling on how to get
> the maximum value of "y" for every unique value of "x"
> from the dataframe "test". In the R Book (Crawley, 2007)
> an example of this can be found on page 121. I tried to do
> it this way, but I fa
try this:
> x=seq(0,5,len=100)
> y=-(x-5)^2
>
> plot(x,y)
> polygon(c(x,x[length(x)]), c(y, y[1]), col='red')
On 9/13/07, gallon li <[EMAIL PROTECTED]> wrote:
> say, I am plotting
>
> x=seq(0,5,len=100)
> y=-(x-5)^2
>
> plot(x,y)
>
> how can I put some color or verticle lines below the plotted c
Dear All,
there are some news on the ade4 (Analysis of Environmental Data :
Exploratory and Euclidean method) website:
- Information on the updates of the package are available at
http://pbil.univ-lyon1.fr/ADE-4/changelog.php. This page is created
automatically using the cvs repository.
- The
At 10:47 13/09/2007, T.Lok wrote:
>Yesterday I spend the whole day struggling on how to get the maximum
>value of "y" for every unique value of "x" from the dataframe
>"test". In the R Book (Crawley, 2007) an example of this can be
>found on page 121. I tried to do it this way, but I failed.
>
>
?polygon
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] Behalf Of gallon li
Sent: 13 September 2007 11:52
To: r-help
Subject: [R] how to plot shaded area under a curve?
say, I am plotting
x=seq(0,5,len=100)
y=-(x-5)^2
plot(x,y)
how can I put some color or verti
say, I am plotting
x=seq(0,5,len=100)
y=-(x-5)^2
plot(x,y)
how can I put some color or verticle lines below the plotted curve?
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-h
Is this what you want:
> n <- 10
> m <- 4
> x <- replicate(n, paste(letters[sample(1:26,m)], collapse=''))
> x
[1] "zmld" "tlme" "fonb" "aqwn" "onxl" "rpfx" "sler" "cvom" "ilme" "nbge"
> x.sort <- sapply(x, function(.str){
+ paste(sort(strsplit(.str, '')[[1]]), collapse='')
+ })
> x.sort
zm
Try this:
> a <- read.table(textConnection("x y z
+ 1 A 1 yes
+ 2 A 2 yes
+ 3 B 1 no
+ 4 B 1 yes
+ 5 C 2 no
+ 6 C 3 no
+ 7 D 1 no"), header=TRUE)
> do.call('rbind', by(a, a$x, function(.sub){
+ .sub[which.max(.sub$y),]
+ }))
x y z
A A 2 yes
B B 1 no
C C 3 no
D D 1 no
On 9/13/07,
Hi All,
I am trying to rearrange alphabetically each element in a character vector.
ex: say the first element in the vector is "cba", and my goal is to turn it
into "abc". The suggested function to use is sort(). But it turns out that
sort doesn't work at the level of element. So I am wondering t
livia wrote:
> Hi, I would like to plot a histogram with the following codes, and I would
> like to make the tick intervals smaller. I tried to add "lab=c(1,1,12)", but
> nothing changes.
>
>
> par(mfrow=c(1,1),font=1, cex=0.8)
> hist (data1, seq(-0.01,0.3,0.01),freq = FALSE,
> main="Figure1.",xl
?tapply
temp.data<-data[as.character(data$time %in% c("02:00","03:00","04:00"),]
# one quick and dirty method is to create a subset the data , not sure what
format your time data is so converted to character strings.
then something like:
tapply(temp.data$V1, factor(temp.data$time), mean)
W
Yesterday I spend the whole day struggling on how to get
the maximum value of "y" for every unique value of "x"
from the dataframe "test". In the R Book (Crawley, 2007)
an example of this can be found on page 121. I tried to do
it this way, but I failed.
In the end, I figured out how to get it
Hello,
as an R beginner I have a question concerning the following data set:
nr date timeV1 V2 V3 V4 V5 V6
...
2828 26/08/05 20:00 60 38 55 58 53 56
2829 26/08/05 21:00 58 34 54 49 45 53
2830 26/08/05 22:00 56 35 52 51 46 47
2831 26/08/05 23:00 56 35 50 45
I made the observation that it is easier to call java from R by using rJava.
This is very much analogous to calling C or fortran from R, but your mileage
can vary.
Vaibhav Gathibandhe wrote:
>
> Hi all,
>
> I am writing R code and I want to interface with JAVA i.e. I want to call
> R
> from J
1 - 100 of 111 matches
Mail list logo