Could someone please explain to me my mal-understanding of the
following, which I expected to give the same results without errors.
TIA.
-- Bert
> z <- list(x=1)
> z[[2]] <- 3
> z
$x
[1] 1
[[2]]
[1] 3
> list(x = 1)[[2]] <- 3
Error in list(x = 1)[[2]] <- 3 :
target of assignment expands to
> On Jan 20, 2016, at 12:26 PM, Bert Gunter wrote:
>
> Could someone please explain to me my mal-understanding of the
> following, which I expected to give the same results without errors.
>
> TIA.
>
> -- Bert
>
>> z <- list(x=1)
>> z[[2]] <- 3
>> z
> $x
> [1] 1
>
>
On 20/01/2016 2:21 PM, Bert Gunter wrote:
Thanks Marc.
Actually, I think the cognate construction for a vector (which is what
a list is also) is:
> vector("numeric",2)[2] <- 3
Error in vector("numeric", 2)[2] <- 3 :
target of assignment expands to non-language object
but this works:
>
Thanks Marc.
Actually, I think the cognate construction for a vector (which is what
a list is also) is:
> vector("numeric",2)[2] <- 3
Error in vector("numeric", 2)[2] <- 3 :
target of assignment expands to non-language object
but this works:
> "[<-"(vector("numeric",2),2,3)
[1] 0 3
I would
Note that the expression
x[1] <- 10
is equivalent not to
`[<-`(x, 1, value=10)
but to
x <- `[<-`(x, 1, value=10)
so there is no conflict between your two expressions.
Saying
c(1,2,3) <- `[<-`(c(1,2,3), 1, value=10)
is not allowed because there is no name to assign something to.
There
Thanks to both Bill and Duncan for their help. As I said, my
mal-understanding of the syntax.
Best,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
On Wed,
Subject: Re: [R] Simple permutation question
For your 2nd question (which also answers your first question) I use
the permn function in the combinat package, this function is nice that
in addition to generating all the permutations it will also,
optionally, run a function on each permutation for you:
t
On Wed, 25 Jun 2014 14:16:08 -0700 (PDT)
Jeff Newmiller jdnew...@dcn.davis.ca.us wrote:
The brokenness of your perm.broken function arises from the attempted
use of sapply to bind matrices together, which is not something
sapply does.
perm.fixed - function( x ) {
if ( length( x ) == 1 )
For your 2nd question (which also answers your first question) I use
the permn function in the combinat package, this function is nice that
in addition to generating all the permutations it will also,
optionally, run a function on each permutation for you:
t(simplify2array( permn( c(A,B,C) ) ))
So my company has hired a few young McKinsey guys from overseas for a
couple of weeks to help us with a production line optimization. They
probably charge what I make in a year, but that's OK because I just
never have the time to really dive into one particular time, and I have
to hand it to the
It is called sample(,replace=F), where the default argument is sampling
without replacement.
Try
x - c(A,B,C,D,E)
sample(x)
Brian
Brian S. Cade, PhD
U. S. Geological Survey
Fort Collins Science Center
2150 Centre Ave., Bldg. C
Fort Collins, CO 80526-8818
email: ca...@usgs.gov
I think Robert wants deterministic permutations. In the e1071
package -- load with library(e1071) -- there is a function
permutations():
Description:
Returns a matrix containing all permutations of the integers
'1:n' (one permutation per row).
Usage:
permutations(n)
Arguments:
n:
Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of Cade, Brian
Sent: Wednesday, June 25, 2014 3:39 PM
To: Robert Latest
Cc: r-help@r-project.org
Subject: Re: [R] Simple permutation question
It is called sample(,replace=F), where the default argument
and further...
See ?Recall for how to do recursion in R.
However, it is my understanding that recursion is not that efficient
in R. A chain of function environments must be created, and this does
not scale well. (Comments from real experts welcome here).
Cheers,
Bert
Bert Gunter
Genentech
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of David L Carlson
Sent: Wednesday, June 25, 2014 4:02 PM
To: Cade, Brian; Robert Latest
Cc: r-help@r-project.org
Subject: Re: [R] Simple permutation question
Assuming you want all
The brokenness of your perm.broken function arises from the attempted use
of sapply to bind matrices together, which is not something sapply does.
perm.fixed - function( x ) {
if ( length( x ) == 1 ) return( matrix( x, nrow=1 ) )
lst - lapply( seq_along( x )
, function( i ) {
sorry... editing on the fly... try:
perm.fixed - function( x ) {
if ( length( x ) == 1 ) return( matrix( x, nrow=1 ) )
lst - lapply( seq_along( x )
, function( i ) {
cbind( x[ i ], perm.fixed( x[ -i ] ) )
}
)
do.call( rbind,
Here're a couple alternatives if you want to use the index instead of
the variable name:
# Reproducible data frame
a1 - 1:15
a2 - letters[1:15]
a3 - LETTERS[1:15]
a4 - 15:1
a5 - letters[15:1]
df - data.frame(a1, a2, a3, a4, a5)
df
# a1 a2 a3 a4 a5
# 1 1 a A 15 o
# 2 2 b B 14 n
# 3
Hi all,
I'm trying to find out what is the equivalent in R for the following Stata
code:
Let's say I have the variables: a1, a2, a3, a4, a5
forvalues i = 1(1)5 {
summary a`i'
}
That is, I want to know how to loop through variables in R.
Thank you in advance,
Luana
[[alternative
On 03/28/2014 05:27 PM, Luana Marotta wrote:
Hi all,
I'm trying to find out what is the equivalent in R for the following Stata
code:
Let's say I have the variables: a1, a2, a3, a4, a5
forvalues i = 1(1)5 {
summary a`i'
}
That is, I want to know how to loop through variables in R.
Hi
Dear friends - following instructions via google I managed to have the
following eps accepted well in words - but I cannot get a decent
postscript print from Gswiew, latest edition. The ylab is printed only
in half, the par(mar seems inconsequential. I hope you will forgive this
simple
On Oct 14, 2013, at 8:52 AM, Troels Ring wrote:
Dear friends - following instructions via google I managed to have the
following eps accepted well in words - but I cannot get a decent postscript
print from Gswiew, latest edition. The ylab is printed only in half, the
par(mar seems
Hi,
Consider the small dataset below, I want to subset by two variables in
one line but it wont work...it works though if I subset separately. I have
to be missing something obvious that I did not realize before while using
subset..
fish - structure(list(IDWeek = c(27L, 28L, 29L, 30L, 31L, 32L,
shouldn't you just change b to x and winter to fish? :)
On Sun, Dec 2, 2012 at 12:21 PM, Felipe Carrillo
mazatlanmex...@yahoo.comwrote:
Hi,
Consider the small dataset below, I want to subset by two variables in
one line but it wont work...it works though if I subset separately. I have
to
On Dec 2, 2012, at 9:21 AM, Felipe Carrillo wrote:
Hi,
Consider the small dataset below, I want to subset by two variables in
one line but it wont work...it works though if I subset separately.
I have
to be missing something obvious that I did not realize before while
using subset..
On Sun, Dec 2, 2012 at 5:21 PM, Felipe Carrillo
mazatlanmex...@yahoo.com wrote:
Hi,
Consider the small dataset below, I want to subset by two variables in
one line but it wont work...it works though if I subset separately. I have
to be missing something obvious that I did not realize before
Hi, Felipe,
two typos? See below!
On Sun, 2 Dec 2012, Felipe Carrillo wrote:
Hi,
Consider the small dataset below, I want to subset by two variables in
one line but it wont work...it works though if I subset separately. I have
to be missing something obvious that I did not realize before
/rbdd_jsmp.aspx
From: R. Michael Weylandt michael.weyla...@gmail.com
To: Felipe Carrillo mazatlanmex...@yahoo.com
Cc: r-help@r-project.org r-help@r-project.org
Sent: Sunday, December 2, 2012 9:42 AM
Subject: Re: [R] simple subset question
On Sun, Dec 2, 2012 at 5:21 PM, Felipe Carrillo
mazatlanmex
://www.fws.gov/redbluff/rbdd_jsmp.aspx
From: arun smartpink...@yahoo.com
To: Felipe Carrillo mazatlanmex...@yahoo.com
Cc: R help r-help@r-project.org; R. Michael Weylandt
michael.weyla...@gmail.com
Sent: Sunday, December 2, 2012 10:29 AM
Subject: Re: [R] simple subset question
Hi,
I am getting
On Sun, Dec 2, 2012 at 6:46 PM, Felipe Carrillo
mazatlanmex...@yahoo.com wrote:
Works with the small dataset (2 years) but I get the error message with the
whole dataset (12 years of data). I am going to have
to check what's wrong with it...Thanks
Off the cuff guess: there's a NA in Total so
michael.weyla...@gmail.com
Cc: r-help@r-project.org r-help@r-project.org
Sent: Sunday, December 2, 2012 1:25 PM
Subject: Re: [R] simple subset question
Sorry, I was trying it to subset from a bigger dataset called 'winter' and
forgot to
change the variable names
when I asked the question
Cc: R help r-help@r-project.org
Sent: Sunday, December 2, 2012 11:00 AM
Subject: RE: [R] simple subset question
I am
still getting an error message
with :
x - subset(fish,Year==2012 Total==max(Total));x
I get:
[1] IDWeek Total Fry Smolt FryEq Year
0 rows (or 0-length row.names
: RE: [R] simple subset question
I am
still getting an error message
with :
x - subset(fish,Year==2012 Total==max(Total));x
I get:
[1] IDWeek Total FrySmolt FryEq Year
0 rows (or 0-length row.names)
The above is not an error message. It says that there
are no rows satisfying your
/redbluff/rbdd_jsmp.aspx
From: David Winsemius dwinsem...@comcast.net
To: Felipe Carrillo mazatlanmex...@yahoo.com
Cc: William Dunlap wdun...@tibco.com; arun smartpink...@yahoo.com; R help
r-help@r-project.org
Sent: Sunday, December 2, 2012 11:54 AM
Subject: Re: [R] simple subset question
-help@r-project.org r-help@r-project.org
Sent: Sunday, December 2, 2012 1:25 PM
Subject: Re: [R] simple subset question
Sorry, I was trying it to subset from a bigger dataset called 'winter' and
forgot to change the variable names
when I asked the question. David W suggestion works but the strange
...@tibco.com; arun smartpink...@yahoo.com
Cc: R help r-help@r-project.org
Sent: Sunday, December 2, 2012 2:34 PM
Subject: Re: [R] simple subset question
Using my whole dataset I get:
library(plyr)
ddply(winter,Year,summarise,maxTotal=max(Total))
fish - structure(list(Year = 2002:2012, maxTotal = c
mazatlanmex...@yahoo.com
Cc: William Dunlap wdun...@tibco.com; David Winsemius
dwinsem...@comcast.net; R help r-help@r-project.org
Sent: Sunday, December 2, 2012 1:18 PM
Subject: Re: [R] simple subset question
Hi,
From the ddply() output, you could get the whole row by:
fish1 - structure(list(Year
From: arun smartpink...@yahoo.com
To: Felipe Carrillo mazatlanmex...@yahoo.com
Cc: William Dunlap wdun...@tibco.com; David Winsemius
dwinsem...@comcast.net; R help r-help@r-project.org
Sent: Sunday, December 2, 2012 1:18 PM
Subject: Re: [R] simple subset question
Hi,
From
PM
Subject: RE: [R] simple subset question
As David W. guessed. The maximum is in year 2005 not 2012 so no row from
2012 matches the maximum.
subset(winter,Year==2012 Total==max(Total))
[1] IDWeek Total Fry Smolt FryEq Year
0 rows (or 0-length row.names)
winter[which(winter$Total==max
I am using the getQuote function in the Quantmod package to retrieve the %
change for a stock as follows:
getQuote(aapl,what=yahooQF(c(Change Percent (Real-time
Trade Time %Change (RT)
aapl 2012-10-11 03:41:00 N/A - -1.67%
How can I extract the numeric change % which is being
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf
Of Fuchs Ira
Sent: Thursday, October 11, 2012 12:58 PM
To: r-help@r-project.org
Subject: [R] simple parsing question?
I am using the getQuote function in the Quantmod package to retrieve
Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf
Of Fuchs Ira
Sent: Thursday, October 11, 2012 12:58 PM
To: r-help@r-project.org
Subject: [R] simple parsing question?
I am using the getQuote function in the Quantmod package to retrieve
; William Dunlap
Subject: Re: [R] simple parsing question?
HI,
Try this:
sprintf(%.2f,as.numeric(sub(^.* ([-+]?[[:digit:].]+)%$, \\1,
as.character(aapl[[2]]
#[1] -2.00
A.K.
- Original Message -
From: Fuchs Ira irafu...@gmail.com
To: r-help@r-project.org
Cc:
Sent
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf
Of Fuchs Ira
Sent: Thursday, October 11, 2012 12:58 PM
To: r-help@r-project.org
Subject: [R] simple parsing question?
I am using the getQuote function in the Quantmod package to retrieve
]
On Behalf
Of Fuchs Ira
Sent: Thursday, October 11, 2012 12:58 PM
To: r-help@r-project.org
Subject: [R] simple parsing question?
I am using the getQuote function in the Quantmod package to retrieve the %
change for
a stock as follows:
getQuote(aapl,what=yahooQF(c(Change Percent (Real-time
Dear friends - I hope you will forgive me another simple question,
illustrated by
ID - c(1,1,1,2,2,3,3,3)
PERIOD - c(1,2,3,2,3,1,2,3)
X - runif(8,0,10))
FF - data.frame(ID=ID,PERIOD=PERIOD,X=X)
I need to the fourth value of X as NA, and ID and PERIOD is updated to
1,1,1,2,2,2,3,3,3 and
On May 16, 2012, at 11:56 AM, Troels Ring wrote:
Dear friends - I hope you will forgive me another simple question,
illustrated by
ID - c(1,1,1,2,2,3,3,3)
PERIOD - c(1,2,3,2,3,1,2,3)
X - runif(8,0,10))
Extraneous paren removed:
FF - data.frame(ID=ID,PERIOD=PERIOD,X=X)
I need to the
Thanks a lot - beautiful
Troels
Den 16-05-2012 19:29, David Winsemius skrev:
On May 16, 2012, at 11:56 AM, Troels Ring wrote:
Dear friends - I hope you will forgive me another simple question,
illustrated by
ID - c(1,1,1,2,2,3,3,3)
PERIOD - c(1,2,3,2,3,1,2,3)
X - runif(8,0,10))
2 2 4.29322683
6 2 3 5.09269667
7 3 1 4.07936332
8 3 2 7.41808455
9 3 3 0.01558664
A.K.
- Original Message -
From: Troels Ring tr...@gvdnet.dk
To: r-help@r-project.org
Cc:
Sent: Wednesday, May 16, 2012 11:56 AM
Subject: [R] simple data.frame question
Hello,
I am trying to make a plot using the code below. The plot is divided into two
parts, using facet_grid. I would like the vertical axis (labelled 'place') to
be different for each location (=part). So in the upper part, only places 'n'
through 'z' are shown, while in the lower part, only
On 12/23/2011 08:26 AM, Albert-Jan Roskam wrote:
Hello,
I am trying to make a plot using the code below. The plot is divided into two
parts, using facet_grid. I would like the vertical axis (labelled 'place') to
be different for each location (=part). So in the upper part, only places 'n'
Sigh Please note that your df and M are undoubtedly different
objects by now:
Right. Not my most coherent day.
thanks
W
M - matrix(runif(5*20), nrow=20)
colnames(M) - c('a', 'b', 'c', 'd', 'e')
l1 - lm(e~., data=as.data.frame(M))
l1
Call:
lm(formula = e ~ ., data =
Use `lm` the way it is designed to be used, with a data argument:
l2 - lm(e~. , data=as.data.frame(M))
summary(l2)
Call:
lm(formula = e ~ ., data = as.data.frame(M))
And what is the regression being done in this case? How are the
independent variables used?
It looks like
In your code by supplying a vector M[,e] you are regressing e
against all the variables provided in the data argument, including e
itself -- this gives the very strange regression coefficients you
observe. R has no way to know that that's somehow related to the e
it sees in the data argument.
In
Duh! Silly me! But my confusion persits: What is the regression being
done? See below
On Sat, Dec 3, 2011 at 5:10 PM, R. Michael Weylandt
michael.weyla...@gmail.com wrote:
In your code by supplying a vector M[,e] you are regressing e
against all the variables provided in the data
On Dec 2, 2011, at 11:20 PM, Worik R wrote:
Duh! Silly me! But my confusion persits: What is the regression
being
done? See below
Sigh Please note that your df and M are undoubtedly different
objects by now:
M - matrix(runif(5*20), nrow=20)
colnames(M) - c('a', 'b', 'c',
I really would like to be able to read about this in a document but I
cannot find my way around the documentation properly
Given the code...
M - matrix(runif(5*20), nrow=20)
colnames(M) - c('a', 'b', 'c', 'd', 'e')
ind - c(1,2,3,4)
dep - 5
I can then do...
l2 - lm(M[,dep]~M[,ind]) ## Clearly
On Dec 1, 2011, at 10:50 PM, Worik R wrote:
I really would like to be able to read about this in a document but I
cannot find my way around the documentation properly
Given the code...
M - matrix(runif(5*20), nrow=20)
colnames(M) - c('a', 'b', 'c', 'd', 'e')
ind - c(1,2,3,4)
dep - 5
I can
Hi,
thanks a lot for pointing me at conditional plotting!
I have to confess that I'm still not really convinced whether this type of
philosophy holds true in each and every situation, especially when there
appears to be a common sense in literature (even if it is not optimal) to
depict such data
Hi,
please excuse the most likely very trivial question, but I'm having no idea
where to find related information:
I try to recapitulate very simple plotting behavior of Excel within R but
have no clue how to get where I want.
I have tab delimited data like
cell treatment value
line a treat1 4
Hi Maxim,
I notice no one has replied to you (on list at least) so I'll take a stab at
answering your question and giving some productive advice.
I believe the axis command will do what you want with a little tweaking: It
certainly lines things up for me.
x -
Hi David and Tom
I was having the same problem and was reading through your threads. I
finally tried:
summary(fit, rmean=TRUE)$table[5]
This produced the mean.
Hope this works for you as well.
Casey
--
View this message in context:
Well, that took a bit of detective work! Thanks. I am still not doing
something right here in my efforts to implement the easy way. Can you
point out my error?
library(survival)
library(ISwR)
dat.s - Surv(melanom$days,melanom$status==1)
fit - survfit(dat.s~1)
print(fit, print.rmean=TRUE)
On Jul 13, 2011, at 7:34 AM, Tom La Bone wrote:
Well, that took a bit of detective work!
It was a lot more work to do it my way than doing it the right
way, which would have been to read the help page more carefully.
Thanks. I am still not doing
something right here in my efforts to
No cigar. This is what I get and my session info. Any suggestions?
library(survival)
library(ISwR)
dat.s - Surv(melanom$days,melanom$status==1)
fit - survfit(dat.s~1)
print(fit, print.rmean=TRUE)
Call: survfit(formula = dat.s ~ 1)
records n.maxn.start events *rmean
On Jul 13, 2011, at 11:16 AM, Tom La Bone wrote:
No cigar. This is what I get and my session info. Any suggestions?
First think ... try this
sfit - summary(fit, rmean = individual)
sfit$table[5]
Hmmm. Second think. I suppose it's also possible that some of my
unsuccessful efforts last
Just an observation, since this email has no indication of what you're
trying to get at and I'm not inspired to dig back through the list:
On Wed, Jul 13, 2011 at 11:16 AM, Tom La Bone boo...@gforcecable.com wrote:
No cigar. This is what I get and my session info. Any suggestions?
I want to assign the value of rmean from a survfit object to a variable so
that it can be used in subsequent calculations, which is also what I
interpreted the original poster to want. I did not understand Dr. Therneau's
answer to the original poster, so I figured I would provide a simple example
On Jul 13, 2011, at 1:10 PM, Tom La Bone wrote:
I want to assign the value of rmean from a survfit object to a
variable so
that it can be used in subsequent calculations, which is also what I
interpreted the original poster to want. I did not understand Dr.
Therneau's
answer to the
Here is a worked example. Can you point out to me where in temp rmean is
stored? Thanks.
Tom
library(survival)
library(ISwR)
dat.s - Surv(melanom$days,melanom$status==1)
fit - survfit(dat.s~1)
plot(fit)
summary(fit)
Call: survfit(formula = dat.s ~ 1)
time n.risk n.event survival
On Jul 12, 2011, at 2:31 PM, Tom La Bone wrote:
Here is a worked example. Can you point out to me where in temp
rmean is
stored? Thanks.
It is not. You need to read the ?print.survfit page:
Value
x, with the invisible flag set to prevent printing. (The default for
all print functions
Thank you for the reply Dr. Winsemius. Can you take your answer a step
further and, in the context of the simple, reproducible example, illustrate
how it is done? I would appreciate it.
Tom
--
View this message in context:
On Jul 12, 2011, at 5:43 PM, Tom La Bone wrote:
Thank you for the reply Dr. Winsemius. Can you take your answer a step
further and, in the context of the simple, reproducible example,
illustrate
how it is done? I would appreciate it.
Of course. Would be happy to take a stab at it but
On Jul 12, 2011, at 5:43 PM, Tom La Bone wrote:
Thank you for the reply Dr. Winsemius. Can you take your answer a step
further and, in the context of the simple, reproducible example,
illustrate
how it is done? I would appreciate it.
Tom
The easy way is:
sfit - summary(fit)
Let's say I have the data frame 'dd' below. I'd like to select one
column from this data frame (say 'a') and keep its name in the
resulting data frame. That can be done as in #2. However, what if I
want to make my selection based on a vector of names (and again keep
those names in the resulting
dd[[ myname]]
Sent from my iPad
On May 21, 2011, at 7:37, Lars Bishop lars...@gmail.com wrote:
Let's say I have the data frame 'dd' below. I'd like to select one
column from this data frame (say 'a') and keep its name in the
resulting data frame. That can be done as in #2. However, what if I
Or
dd[,myname]
should work too.
If you are worried about getting multiple columns, you can just make myname a
vector of column names using c() before you use either Jim's list indexing or
the above matrix indexing syntax.
Are you looking for:
dd[, a, drop=FALSE]
On 21/05/2011 12:37, Lars Bishop wrote:
Let's say I have the data frame 'dd' below. I'd like to select one
column from this data frame (say 'a') and keep its name in the
resulting data frame. That can be done as in #2. However, what if I
want to make my
On May 21, 2011, at 7:37 AM, Lars Bishop wrote:
Let's say I have the data frame 'dd' below. I'd like to select one
column from this data frame (say 'a') and keep its name in the
resulting data frame. That can be done as in #2. However, what if I
want to make my selection based on a vector of
Hi Mrs Ms R,
A simple maths question that I am trying to resolve with R: I need to
calculate the SE from a pvalue and it's beta... How to do this...?
Thank you very much and best regards!
Georg Ehret, Geneva, Switzerland.
[[alternative HTML version deleted
Georg Ehret georgehret at gmail.com writes:
Hi Mrs Ms R,
A simple maths question that I am trying to resolve with R: I need to
calculate the SE from a pvalue and it's beta... How to do this...?
Thank you very much and best regards!
Georg Ehret, Geneva, Switzerland.
Without more
--- begin inclusion--
Hi,
When I run the survfit function, I want to get the restricted mean
value and the standard error also. I found out using the print
function to do so, as shown below,
The questions is, is there any way to extract these values from the
print command?
- end
Hi,
When I run the survfit function, I want to get the restricted mean
value and the standard error also. I found out using the print
function to do so, as shown below,
print(km.fit,print.rmean=TRUE)
Call: survfit(formula = Surv(diff, status) ~ 1, type = kaplan-meier)
records
-Mensaje original-
De: Peter Ehlers [mailto:ehl...@ucalgary.ca]
Enviado el: jueves, 31 de marzo de 2011 18:09
Para: Rubén Roa
CC: r-help@r-project.org
Asunto: Re: [R] Simple lattice question
On 2011-03-31 06:58, Rubén Roa wrote:
Thanks Peters!
Just a few minor glitches now
On 2011-03-31 23:28, Rubén Roa wrote:
-Mensaje original-
De: Peter Ehlers [mailto:ehl...@ucalgary.ca]
Enviado el: jueves, 31 de marzo de 2011 18:09
Para: Rubén Roa
CC: r-help@r-project.org
Asunto: Re: [R] Simple lattice question
On 2011-03-31 06:58, Rubén Roa wrote:
Thanks Peters!
Just
DeaR ComRades,
require(lattice)
data - data.frame(SP=sort(rep(as.factor(c('A','B','C','D','E')),12)),
x=rpois(60,10),
y=rep(c(rep(0,4),rep(10,4),rep(20,4)),5),
z=rep(1:4,15))
On 2011-03-31 03:39, Rubén Roa wrote:
DeaR ComRades,
require(lattice)
data- data.frame(SP=sort(rep(as.factor(c('A','B','C','D','E')),12)),
x=rpois(60,10),
y=rep(c(rep(0,4),rep(10,4),rep(20,4)),5),
z=rep(1:4,15))
-Mensaje original-
De: Peter Ehlers [mailto:ehl...@ucalgary.ca]
Enviado el: jueves, 31 de marzo de 2011 15:41
Para: Rubén Roa
CC: r-help@r-project.org
Asunto: Re: [R] Simple lattice question
On 2011-03-31 03:39, Rubén Roa wrote:
DeaR ComRades,
require(lattice)
data
: Re: [R] Simple lattice question
On 2011-03-31 03:39, Rubén Roa wrote:
DeaR ComRades,
require(lattice)
data-
data.frame(SP=sort(rep(as.factor(c('A','B','C','D','E')),12)),
x=rpois(60,10),
y=rep(c(rep(0,4),rep(10,4),rep(20,4)),5
On Mar 31, 2011, at 8:41 AM, Peter Ehlers wrote:
On 2011-03-31 03:39, Rubén Roa wrote:
DeaR ComRades,
require(lattice)
data- data.frame(SP=sort(rep(as.factor(c('A','B','C','D','E')),12)),
x=rpois(60,10),
y=rep(c(rep(0,4),rep(10,4),rep(20,4)),5),
Hi everyone,
I have just got different samples from a dataframe (independent and
exclusive, there aren't common elements among them). I want to create a
variable that indicate the sampling selection of the elements in the
original dataframe (for example, 0 = no selected, 1= sample 1, 2=sample
On Mar 26, 2011, at 7:05 PM, Sebastián Daza wrote:
Hi everyone,
I have just got different samples from a dataframe (independent and
exclusive, there aren't common elements among them). I want to
create a variable that indicate the sampling selection of the
elements in the original
Posting some sample data would help, but I think something like this
is what you want
data[data$school=='Cornell University',]
For example
CO2[CO2$Type=='Quebec',]
Tom
2011/3/26 Sebastián Daza sebastian.d...@gmail.com:
Hi everyone,
I have just got different samples from a dataframe
Hi everyone,
Sorry for the newbie question but whenever I enter the following code into r
it gives me an unexpected string constant in
boxplot(Abs~Conc,ylab='Absorbency',xlab'Ethanol(%)' error. I have tried
everything to eliminate it and have searched these forums to no avail, can
anyone tell
On Jan 31, 2011, at 9:39 PM, MarquisDM wrote:
boxplot(Abs~Conc,ylab='Absorbency',xlab'Ethanol(%)')
missing =..^.
David Winsemius, MD
West Hartford, CT
__
R-help@r-project.org mailing list
Hi:
Put an equals sign between xlab and '
Dennis
On Mon, Jan 31, 2011 at 6:39 PM, MarquisDM mszentec...@gmail.com wrote:
Hi everyone,
Sorry for the newbie question but whenever I enter the following code into
r
it gives me an unexpected string constant in
to add to Michael's response:
http://www.statmethods.net/advgraphs/parameters.html
On Mon, Dec 13, 2010 at 2:23 AM, Michael Bedward
michael.bedw...@gmail.com wrote:
Hello Erin,
Try this...
plot(x, y, type=b, pch=16)
Michael
On 13 December 2010 18:11, Erin Hodgess
Dear R People:
When I plot using type=b, I have circles and lines, which is as it should be.
Is there a way to have filled in circles using the type argument,
please? Or do I need to call the points function also, please?
Thanks,
Erin
--
Erin Hodgess
Associate Professor
Department of
Hello Erin,
Try this...
plot(x, y, type=b, pch=16)
Michael
On 13 December 2010 18:11, Erin Hodgess erinm.hodg...@gmail.com wrote:
Dear R People:
When I plot using type=b, I have circles and lines, which is as it should
be.
Is there a way to have filled in circles using the type
Sorry, missed the two variable thing. Go with the lm solution then,
and you can tweak the plot yourself (the confidence intervals are
easily obtained via predict(lm.object, interval=prediction) ). The
function qq.plot uses robust regression, but in your case normal
regression will do.
Regarding
1 - 100 of 164 matches
Mail list logo