On Sat, 3 May 2008, Andrew Robinson wrote:
You're running out of RAM. Your options are
1) run code on a machine with more RAM
2) try the model on fewer observations
3) try a simpler model.
4) Use a more efficient function -- arima() in stats, for example.
Andrew
On Fri, May 02, 2008 at
?aggregate
> aggregate(df$score, list(df$var1, df$var2, df$id), mean, na.rm=TRUE)
Group.1 Group.2 Group.3 x
1 1 1 1 0.1053576980
2 2 1 1 0.1514888520
3 3 1 1 0.1270477403
4 4 1 1 -0.0193129404
5
Hi,
When I start Xemacs version 21.5.28 (in Unix), using the init.el:
(setq bell-volume 0)
(setq sound-alist nil)
(setq grep-find-use-xargs nil)
(require 'ess-site)
I get the following error:
(1) (initialization/error) An error has occurred while loading
$home/.xemacs/init.el:
Cannot
Dear Colleagues,
Apologies for a long email to ask what I feel may be a very simple
question; I figure it's better to overspecify my situation.
I was asked a question, recently, by a colleague in my department
about pre-aggregating variables, i.e., computing the mean of defined s
#Install library rgl
#here is the is the function:
rgl.plot3d<-function(z, x, y, cols="red",axes=T,new=T)
{xr<-range(x)
x01<-(x-xr[1])/(xr[2]-xr[1])
yr<-range(y)
y01<-(y-yr[1])/(yr[2]-yr[1])
zr<-range(z)
z01<-(z-zr[1])/(zr[2]-zr[1])
if(new) rgl.clear()
if(axes)
{xlab<-pretty(x)
yl
Thank you Christos and Jim:
That is precisely what I was after.
On Sat, 3 May 2008 00:01:58 -0400, "Christos Hatzis"
<[EMAIL PROTECTED]> said:
> Try %in%
>
> subset(dat, treatment %in% vec)
>
> > -Original Message-
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED] On Behalf
Justin,
try
subset(dat, treatment %in% vec)
I guess thats what you want.
On Fri, May 2, 2008 at 8:40 PM, <[EMAIL PROTECTED]> wrote:
> Dear list:
>
> I have a problem using the subset function:
>
> dat<- data.frame(treatment=c("A", "B", "A", "C", "C", "D", "A", "D",
> "C", "D"), response=rnorm(
Try %in%
subset(dat, treatment %in% vec)
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of
> [EMAIL PROTECTED]
> Sent: Friday, May 02, 2008 11:41 PM
> To: r-help@r-project.org
> Subject: [R] help with subset
>
> Dear list:
>
> I have a problem us
Dear list:
I have a problem using the subset function:
dat<- data.frame(treatment=c("A", "B", "A", "C", "C", "D", "A", "D",
"C", "D"), response=rnorm(10))
I am interested in treatments "A", "B" and "D"
vec<- c("A", "B", "D")
But I can only obtain what I want with:
subset(dat, treatment=="A" | t
If x is a zoo object note that zoo (and therefore dyn) allows the more compact
form lag(x, -(1:2)) so if we write:
mod.eq <- x ~ lag(x, -(1:2))
then mod.eq[[3]][[3]] is the vector -(1:2) or if you like you can define
Lag <- function(x, k) lag(x, -k) in which case you can write it:
mod.eq <- x ~
Steve,
I think you can use:
write.table(x, file = "/Users/Desktop/Data.txt", sep = "", append=T,
row.names = F, col.names = F)
I used that for the data
PERSHRUB DISTX AGE RODENTSP
166 2100 501
290 914 201
375 1676 341
475 24
Hi Mark,
Try using ggobi via Rggobi. ggobi is aimed at higher dimension
multivariate data but it does a very useful service in 3-D projections,
do a manually controlled tour ... I've used this to tweak PCA results
and find fine structure,
Richard
Mark Kimpel wrote:
I would like to create a
try:
write.table(x, file="/Users/Desktop/Data.txt", row.names= FALSE, col.names=
FALSE, sep="", append=TRUE)
this should do it. If you don't want to append, just turn that opion off.
Stropharia wrote:
>
> Dear R users,
>
> I've had no joy finding a solution to this online or in any of my R
Dear R users,
I've had no joy finding a solution to this online or in any of my R books.
Many thanks in advance for any help you can give.
I'm seeking to output a data frame (or matrix - it doesn't matter which for
my purposes) to a .txt file, but omit any row or column names. The data
frame tha
On Sun, Apr 27, 2008 at 10:10 AM, David Winsemius
<[EMAIL PROTECTED]> wrote:
> "Nelson Castillo" <[EMAIL PROTECTED]> wrote in
> news:[EMAIL PROTECTED]:
(cut)
> > That is, from:
> >
> >> x
> > weight var1 var2
> > 1 1AB
> > 2 1AB
> > 3 2AB
> > 4
I would like to create a 3d scatterplot that is interactive in the sense
that I can spin it on its axes to better visualize some PCA results I have.
What are the options in R? I've looked at RGL and perhaps it will suffice
but it wasn't apparent from the documentation I found.
Any demo scripts ava
I have been trying to create code to calculate the power for an adaptive design
with a survival endpoint according to the method of Schafer and Muller
('Modification of the sample size and the schedule of interim analyses in
survival trials based on interim inspections,' Stats in Med, 2001). Th
Since we're on the topic of book reviews, I just received Phil Spector's
new R book called "Data Manipulation with R" and it is also quite a
nice book. I haven't gone through it all and I won't give a detailed
review but I have gotten a lot out of the first 100 pages that I have
read.
Note t
Hi David,
Putting a print statement around your spplot command solves your
problem. This behaviour is common for trellis graphics plot methods
(such as spplot). This is the command including print:
print(spplot(meuse, c("ffreq"),
sp.layout=list(l2,l3,l4,l5),col.regions="black",pch=c(1,2,3),
On 5/2/08, Ronaldo Reis Junior <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I user barplot2 to make a plot bar with errors bars. In old times I needed to
> use a sequence of segments commands to make this.
>
> Now I try to make the same but using lattice. Is possible to use barplot2 in
> barchart funct
On 5/2/08, Michael Kubovy <[EMAIL PROTECTED]> wrote:
> I too have been studying the book and it is indeed outstanding.
>
> For my purposes the only topic missing is the straightforward drawing of
> error bars and bands, for which I've been using Hmisc::xYplot (where error
> bands seem to be broken
Try this:
newx <- with(x, cbind(stack(x, select = grep("spec", names(x))), lat, lon))
newx[newx$values > 0, -1]
On 5/2/08, Christian Hof <[EMAIL PROTECTED]> wrote:
>
> Dear all,
> how can I, with R, transform a presence-absence (0/1) matrix of species
> occurrences into a presence-only table (3
On 02/05/2008 4:24 PM, Dan Tenenbaum wrote:
Hi,
After updating to R 2.7, my .Rprofile executes twice on startup. I
confirmed this by putting in the following line:
print("starting .Rprofile...")
When I start R, I see:
[1] "starting .Rprofile..."
[1] "starting .Rprofile..."
This seems like
Hi Christian,
Here's a way using the reshape package:
> dfr
site lat lon spec1 spec2 spec3 spec4
1 site1 10 11 1 0 1 0
2 site2 20 21 1 1 1 0
3 site3 30 31 0 1 1 1
> library(reshape)
> dfr <- melt(dfr[, -1], id=1:2, variable_name='species')
Christian,
You need to use reshape to convert to the 'long' format.
Check the help page ?reshape for details.
>dat <- read.table('clipboard', header=TRUE)
>dat
site lat lon spec1 spec2 spec3 spec4
1 site1 10 11 1 0 1 0
2 site2 20 21 1 1 1 0
3 site3 30 31
Hi,
I have data that is on a log base 2 scale. It goes from negative factors of
2 to positive ones. I am using barplot. However, I don't want the data
centered at 0 - I want the min of the yaxis to be just below the lowest
value in the data. The plots are kind of deceptive switching between
posi
Dear all,
how can I, with R, transform a presence-absence (0/1) matrix of species
occurrences into a presence-only table (3 columns) with the names of the
species (1st column), the lat information of the sites (2nd column) and
the lon information of the sites (3rd column), as given in the below
You need seet the FUN argument:
X <- with( FDP0D, ave( IAC, list( Key), FUN = mean))
On 5/1/08, Chip Barnaby <[EMAIL PROTECTED]> wrote:
>
> Henrique, thanks for the response. As a new
> user, I was unaware of with() and ave(), those are both very helpful.
>
> However, I don't think your method i
Andrew,
Thank you for your reply. In fact, I had a way of unrolling the table
but I think yours look much nicer - much readable to me. Below is what
I did, but I was afraid I would scare my students away from R!
> approval <- factor(c("Approve", "Disapprove"),
+levels = c("Di
>> -Original Message-
>> From: [EMAIL PROTECTED]
>> [mailto:[EMAIL PROTECTED] On Behalf Of Irene Mantzouni
>> Sent: Friday, May 02, 2008 7:52 AM
>> To: [EMAIL PROTECTED]
>> Subject: [R] points size in plots
>>
>> Dear list,
>>
>>
>>
>> I would like to produce a plot of variables where the s
On Sat, May 03, 2008 at 06:43:22AM +1000, Andrew Robinson wrote:
> On Fri, May 02, 2008 at 03:06:31PM -0500, Giovanni Petris wrote:
> >
> > Hello,
> >
> > I posted a question yesterday but I got no replies, so I'll try to
> > reformulate it in a more concise way.
> >
> > I have the following da
On Fri, May 02, 2008 at 03:06:31PM -0500, Giovanni Petris wrote:
>
> Hello,
>
> I posted a question yesterday but I got no replies, so I'll try to
> reformulate it in a more concise way.
>
> I have the following data, summarizing approval ratings on two
> different surveys for a random sample o
Dear Rodrigo,
The model.matrix() function extracts the model matrix from the object
mod.duncan.hub. To see the contents of the model matrix, just print X
(i.e., enter X at the R command prompt). When you do this, you'll see
that the first column of X is the constant regressor, containing 1's.
The
You're running out of RAM. Your options are
1) run code on a machine with more RAM
2) try the model on fewer observations
3) try a simpler model.
Andrew
On Fri, May 02, 2008 at 12:37:15PM -0700, zerfetzen wrote:
>
> Hi,
> I am trying out a generalized least squares method of forecasting that
Try this:
y <- data.frame(a=sample(30, 20), b=sample(30, 20), c=sample(30,20))
x <- diag(1, length(names(y))
cors <- combn(names(y), 2,
FUN = function(x)cor.test(y[,x[1]], y[,x[2]])$p.value)
x[lower.tri(x)] <- cors
x[upper.tri(x)] <- cors
On 5/2/08, Sang Chul Choi <[EMAIL PROTECTED]
Hi,
After updating to R 2.7, my .Rprofile executes twice on startup. I
confirmed this by putting in the following line:
print("starting .Rprofile...")
When I start R, I see:
[1] "starting .Rprofile..."
[1] "starting .Rprofile..."
This seems like the obverse of the following FAQ:
http://cra
Sorry.
I received a very exciting email from Springer and placed my order and
felt compelled to advertise it. Didn't see any previous postings about
it. Hope no offence taken!
Best wishes, and well done with book. Looking forward to receiving it...
Mark
2008/5/2 Deepayan Sarkar <[EMAIL PROTECTE
Hello:
I am using plot() in rpart, making a decision tree plot. I use plot()
first, then text() followed, but I think due to the figure vs. text
size, the bottom of the text always gets cut off. I can only "see" the
text of the bottom of the tree if I make the font size REALLY small.
I thi
Hi,
I am trying out a generalized least squares method of forecasting that
corrects for autocorrelation. I downloaded daily stock data from Yahoo
Finance, and am trying to predict Close (n=7903). I have learned to use
date functions to extract indicator variables for Monday - Friday (and
Friday
Thank you, Dieter, very much for your answer.
I'd rather avoid using mosaic. I think that I need to read more about
"vcd" manual you mentioned. One quick question? Is it possible to
color each cells with all different colors with "mosaicplot"? I have
used "mosaic" function to do coloring ea
Hello,
I posted a question yesterday but I got no replies, so I'll try to
reformulate it in a more concise way.
I have the following data, summarizing approval ratings on two
different surveys for a random sample of 1600 individuals:
> ## Example: Ratings of prime minister (Agresti, Table 12.1
Hello:
I am using plot() in rpart, making a decision tree plot. I use plot() first,
then text() followed, but I think due to the figure vs. text size, the bottom
of the text always gets cut off. I can only see the text of the bottom of the
tree if I make the font size REALLY small.
I th
Martin,
I can't thank you enough for taking the time to help and providing the
detailed examples of how to get started. Now I know exactly how to
proceed.
Thanks again,
Roger
-Original Message-
From: Martin Morgan [mailto:[EMAIL PROTECTED]
Sent: Friday, May 02, 2008 12:02 PM
To: Bos,
Hi,
Is there a simple way to do correlation coefficient tests with
"cor.test" like I would do with "cor" function? I have a data frame
where each column is a list.
y <- data.frame(a=sample(30, 20), b=sample(30, 20), c=sample(30,20))
cor(y)
==
On 5/2/2008 2:52 PM, Alex Joyner wrote:
Duncan,
Thank you for your response. I actually am using colClasses, but the
first column is a character column, and the rest are numeric. Is there
any way to specify that all columns are numeric except for the first
one? I couldn't find this in the do
Hello R-listers! My first post to the list is a very simple one for
those who use the software continuosly. I am trying to understand the
fixed-x resampling and random-x-resampling method proposed by Fox
about Bootstrapping. The doubt that I have is on the side of the model
run in one of the functi
you could do it using apply like the first two replies mentioned or you could
just use the index way
for example: (assuming your matrix name is ym and the values are greater
than 25 and less than 50 and the column is column 3).. if you mean "any
column" use the first two replies.
> ym<-array(runi
I came across this little problem in the xYplot function recently and I found
it very poorly documented. The legend (keys) in the xYplot is very
confusing, especially if you want to change the data labels you have in the
data frame column names... say for example you want something with a
subscrip
profr 0.1
profr provides an alternative data structure and display for profiling
data. It still uses Rprof() to collect the data, but outputs a
data.frame which should be easier to manipulate. It also implements a
novel visualisation which allows you to see the lengt
On Fri, May 2, 2008 at 1:35 PM, Kerpel, John <[EMAIL PROTECTED]> wrote:
> Hi folks!
>
>
>
> How do I extract lags from a formula? An example:
>
>
>
> mod.eq<-formula(x~lag(x,-1)+lag(x,-2))
>
> > mod.eq
>
> x ~ lag(x, -1) + lag(x, -2)
>
> > mod.eq[1]
>
> "~"()
>
> > mod.eq[2]
>
> x()
>
> >
Try:
> tmp <- rep( list( 0:1 ), 5 )
> out <- do.call(expand.grid, tmp)
Then change the 5 to whatever you want.
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111
> -Original Message-
> From: [EMAIL PRO
Hi folks!
How do I extract lags from a formula? An example:
mod.eq<-formula(x~lag(x,-1)+lag(x,-2))
> mod.eq
x ~ lag(x, -1) + lag(x, -2)
> mod.eq[1]
"~"()
> mod.eq[2]
x()
> mod.eq[3]
lag(x, -1) + lag(x, -2)()
I'm trying to extract the lags into a vector that would be simply [1,2
Hi Alex,
Perhaps
http://www.nabble.com/How-to-read-HUGE-data-sets--td15729830.html#a15746400can
helps.
HTH,
Jorge
On Fri, May 2, 2008 at 2:13 PM, ajoyner <[EMAIL PROTECTED]> wrote:
>
> Hello,
> I'm attempting to load a ~110 MB text file with ~500,000 rows and 200
> columns using read.table .
On 5/2/2008 2:13 PM, ajoyner wrote:
Hello,
I'm attempting to load a ~110 MB text file with ~500,000 rows and 200
columns using read.table . R hangs and seems to give up. Can anyone tell me
an efficient way to load a file of this size?
It will help a lot if you specify the column types (using th
?do.call
On Fri, 2 May 2008, Simon Parker wrote:
Hello.
I'm trying to do this (not necessarily 0:1) :
expand.grid ( 0:1, 0:1, 0:1, 0:1, 0:1)
etc..etc.
but I want to have control over how many 0:1 are included.
Any ideas please ?
Thankyou.
Simon Parker
Imperial College
-
Hi!
I am using geeglm (in geepack) and I need to use weights. There is in R a
function that calculates the weights like in SAS PROC GENMOD . Any help would
be sincerely appreciated.
Thanks
Salomé
__
R-help@r-project.org mailing list
https://
Hello,
I'm attempting to load a ~110 MB text file with ~500,000 rows and 200
columns using read.table . R hangs and seems to give up. Can anyone tell me
an efficient way to load a file of this size?
Thank you!
Alex
--
View this message in context:
http://www.nabble.com/Loading-large-files-in-R-t
Hello.
I'm trying to do this (not necessarily 0:1) :
expand.grid ( 0:1, 0:1, 0:1, 0:1, 0:1)
etc..etc.
but I want to have control over how many 0:1 are included.
Any ideas please ?
Thankyou.
Simon Parker
Imperial College
-
A Smarter Email.
Hello R-listers! My first post to the list is a very simple one for those
who use the software continuosly. I am trying to understand the fixed-x
resampling and random-x-resampling method proposed by Fox about
Bootstrapping. The doubt that I have is on the side of the model run in one
of the functi
Hello. I am looking for a multiple comparisons test to follow up a
repeated mesures ANOVA i have conducted. Im not an expert in
statistics or in R but i have managed to produce this:
"START"
fit5.lme<-lme(logfaa~segment,random=~+1|fish)
anova(fit5.lme)
numDF denDF F-value p-v
Sang Chul Choi biology.rutgers.edu> writes:
> I want to have a horizontal line on a mosaic plot with "vcd" package.
> This would give me an idea where is 0.5 proportion in a cell. Using
> "mosaicplot" function of "graphics" package, I can draw a line using
> "abline." But, with "mosaic" fun
Dear all,
I am trying to estimate partial residuals for the multiple regression lm
model:
a.lm=lm(y~x1+x2)
I use the function
residuals(a.lm, type="partial")
However, the results are much different when I use the "manual" method
to get partial residuals for x2 (or for x1):
See the footer of this message. We have no idea what OS, what version of
R, what type of help
That message does not appear in the R sources. Is it verbatim in English
from R?
On Fri, 2 May 2008, Michael Gerisch wrote:
hi,
since lately i receive an error message when prompting ?help
?symbols
--
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 Irene Mantzouni
> Sent: Friday, May 02, 2008 7:52 AM
> To: [EMAIL PROTEC
Is this what you are trying to do?
> tt <- matrix( 5:10, ncol=2 )
> df <- as.data.frame.table(tt)
> df2 <- df[ rep( 1:nrow(df), df$Freq ), ]
And is that elegant enough?
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111
> -
I want to use spplot inside a loop to itteratively produce png files.
for (i in 1:5){
png(file=paste("myPlot",i,".png",sep=""),bg="white",height=500,width=500)
library(lattice)
trellis.par.set(sp.theme()) # sets bpy.colors() ramp
data(meuse)
coordinates(meuse) <- ~x+y
l2 = list("Spat
Hi,
I want to have a horizontal line on a mosaic plot with "vcd" package.
This would give me an idea where is 0.5 proportion in a cell. Using
"mosaicplot" function of "graphics" package, I can draw a line using
"abline." But, with "mosaic" function of "vcd" package, I have tried
to use "a
Thank you very much!
Sang Chul
On May 2, 2008, at 12:06 PM, Dieter Menne wrote:
Sang Chul Choi biology.rutgers.edu> writes:
I like mosaic function of "vcd" package. I have played around it. I
have found out that mosaic plot data table is 2-dimension does not
stretch when you enlarge a mosai
Try this also:
noquote(with(x, tapply(VALUE, list(ITEM, STEP), paste)))
On Fri, May 2, 2008 at 1:05 PM, Matt <[EMAIL PROTECTED]> wrote:
> Hi, I have a question about reformatting data. It looks like it should
> be simple, but I've been working at it for awhile now and it's about
> time I ask for
On Fri, May 2, 2008 at 11:05 AM, Matt <[EMAIL PROTECTED]> wrote:
> Hi, I have a question about reformatting data. It looks like it should
> be simple, but I've been working at it for awhile now and it's about
> time I ask for help.
>
> My data look like this:
>
> ITEM VALUE STEP
> item1 A
hi,
since lately i receive an error message when prompting ?help:
"help will not be available. path not found". It is not possible to get help
for any command. I don`t know why but it seems that i need to tell R the
right path for the helpfiles. How can i do that?
thanks a lot
cheers
michael
_
Hi, I have a question about reformatting data. It looks like it should
be simple, but I've been working at it for awhile now and it's about
time I ask for help.
My data look like this:
ITEM VALUE STEP
item1 A first
item2 C first
item2 D second
item1 A second
it
Sang Chul Choi biology.rutgers.edu> writes:
> I like mosaic function of "vcd" package. I have played around it. I
> have found out that mosaic plot data table is 2-dimension does not
> stretch when you enlarge a mosaic plot. It is okay when data table is
> 3 or more dimension. The first one
On Fri, 2 May 2008, Sang Chul Choi wrote:
> Hi,
>
> I like mosaic function of "vcd" package. I have played around it. I
> have found out that mosaic plot data table is 2-dimension does not
> stretch when you enlarge a mosaic plot. It is okay when data table is
> 3 or more dimension. The first one
This depends entirely one what the version in vcd allows you to do. Since I
don't use it, I have no idea. Read the docs there, or perhaps someone else
familiar with it can help.
-- Bert
-Original Message-
From: Sang Chul Choi [mailto:[EMAIL PROTECTED]
Sent: Friday, May 02, 2008 8:06 AM
Hi Roger --
"Bos, Roger" <[EMAIL PROTECTED]> writes:
> I would like to learn how to parse a mixed text/xml document I
> downloaded from the sec.gov website (see example below). I would like
I'm not sure of a more robust way to extract the XML, but from
inspection I wrote
> ftp <- "ftp://anonym
Hi Irene,
Assuming you have already calculated the standard errors, something
like the following will work:
library(ggplot2)
qplot(x, y, data=mydataframe, size = se)
Hadley
On Fri, May 2, 2008 at 8:52 AM, Irene Mantzouni <[EMAIL PROTECTED]> wrote:
> Dear list,
>
>
>
> I would like to produce a
Hi David,
Try this:
# Data set
set.seed(123)
Category=as.factor(rep(1:15,each=10))
Value1 = rnorm(150)
Value2= rnorm(150)
yourdata=data.frame(Category,Value1,Value2)
# Global function
TTEST=function(mydata){
# Internal function
tt=function(x,y) t.test(x,y)$p.value
# p-values
for(i in 1:length(
esmail bonakdarian <[EMAIL PROTECTED]> wrote:
> Yes, I have been reading the list, the amount of messages per day
> is simply amazing, I can hardly keep up. Do most of you read this
> on the web or get it as digest? I am getting them as individual
> e-mails (thank god for filters) ... :-)
I used
Hi,
I like mosaic function of "vcd" package. I have played around it. I
have found out that mosaic plot data table is 2-dimension does not
stretch when you enlarge a mosaic plot. It is okay when data table is
3 or more dimension. The first one is of 3-dimension table case, and
the second
I would like to learn how to parse a mixed text/xml document I
downloaded from the sec.gov website (see example below). I would like
to parse this to get the value for each xml tag and then access it
within R, but I don't know much about xml so I don't even know where to
start debugging the errors
Dear All,
I am trying to get ICC (Intra class correlation
coefficient) for a questionnaire. The questionnaire
has about 25 questions and was administered to 50
subjects on two occasions. I want to calculate the
reproducibility of the questionnaire administered to
the same group of subjects on two o
Thank you, Bert!
I have a question one more. I have found out that "mosaic" function of
"vcd" package is more interesting since I want to color different cells.
The question is how to make x axis label to be vertical not
horizontal. I tried "las" or some other options in "par" but I could
Try:
foo <- function(data, ...)
{
res <- unlist(lapply(split(data, data$Category),
function(.x)t.test(.x$Value1, .x$Value2)$p.value))
test <- merge(data, as.data.frame(res), by.x="Category", by.y = 0)
return(test)
}
x <- data.frame(Category = rep(1:15, each = 10), Value1 = rnorm(150), Val
dear R-help:
one of my students is struggling to test an ordered alternative
hypothesis on a set of groups (e.g., mu_a <= mu_b <= mu_c).
There has been some literature on this topic -- a lot of
this goes back to Bartholomew (1961); Gaines and Rice
(see refs below) are the ones who've popular
I am writing a simple R program to execute a t-test repeatedly on data
contained in a data frame. My data looks like this:
Category Value1 Value2
1 .5 .8
1 .3
The help says
A data frame is split by row into data frames subsetted by the
values of one or more factors, and function 'FUN' is applied to
each subset in turn.
You attempting to apply median() to a data frame -- it does no work,
unlike mean()
On Fri, 2 May 2008, vito muggeo w
dear all,
Could anyone explain me the behaviour of median() within by()?
(I am running R.2.7.0)
thanks,
vito
> H<-cbind(rep(0:1,l=20),matrix(rnorm(20*2),20,2))
> by(H[,-1],H[,1],mean)
INDICES: 0
V1 V2
-0.2101069 0.2954377
-
Dear list,
I would like to produce a plot of variables where the size of the points
will be indicative of their standard errors.
How is that possible?
Thank you!
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing li
On
R version 2.7.0 (2008-04-22)
i386-apple-darwin8.10.1
locale:
C/C/en_US/C/C/C
attached base packages:
[1] splines grid grDevices datasets graphics stats
utils methods base
other attached packages:
[1] Design_2.1-1 survival_2.34-1 Hmisc_3.4-3
languageR_0.92
Giovanni Petris uark.edu> writes:
> > ## Example: Ratings of prime minister (Agresti, Table 12.1, p.494)
> > rating <- matrix(c(794, 86, 150, 570), 2, 2)
> > dimnames(rating) <- list(First = c("approve", "disapprove"),
> + Second = c("approve", "disapprove"))
> > rating
>
Hi,
I am using the stdFit function (fGarch package) to get estimates for a
fitted location, scale, and degrees of freedom of a dataset. I have no
errors with the code however the estimates are not identical to the
estimates I am getting when using SAS and MatLab (both give me the same
estimates).
Hi,
I user barplot2 to make a plot bar with errors bars. In old times I needed to
use a sequence of segments commands to make this.
Now I try to make the same but using lattice. Is possible to use barplot2 in
barchart function?
If not, what is the simplest way to put errors bar in barchart? I
Have a look at the zoo package which has three vignettes and R News 4/1.
On Fri, May 2, 2008 at 12:27 AM, Roslina Zakaria <[EMAIL PROTECTED]> wrote:
> Hi R-expert,
> If I have this daily rainfall data, how do call a particular day?
> Year,Month,Day,Amount
> 1900,12,22,1.3
> 1900,12,23,0
> 1900,12,
It appears that you have a problem in your data. Here is just the
rbind in the call:
> rbind(rep(length(female_improvement$gender),2),freq(female_improvement$reason)[[1]])
Info entered is all relevant Room for improvement Room for Improvement
[1,] 20
Hi,
I am having trouble plotting a series of dendrograms using lattice and grid
code as found in Paul Murrells book R Graphics.
This is the error message I recieve:
Error in downViewport.vpPath(vpPathDirect(name), strict, recording =
recording) :
Viewport 'plot1.panel.1.1.off.vp' was not fo
> Hi, I have a problem regarding matrix handeling. I am working with
> a serie of matrixes containing several columns. Now I would like to
> delete those rows of the matrixes,that in one of the columns contain
> values less than 50 or greater than 1000.
Try this:
m <- matrix(runif(150, 0, 1050
Michael Kubovy wrote:
I too have been studying the book and it is indeed outstanding.
For my purposes the only topic missing is the straightforward drawing
of error bars and bands, for which I've been using Hmisc::xYplot
(where error bands seem to be broken for R) or gplots::barplot2.
If t
Hi,
Im having trouble creating the following graph. Here is my code:
library(plotrix)
library(prettyR)
female_improvement
<-read.table("C://project/graphs/gender/breakdown/gender-improvement/female-improvement.csv",
sep=",", header=TRUE)
barp(rbind(rep(length(female_improvement$gender),2),freq(f
I too have been studying the book and it is indeed outstanding.
For my purposes the only topic missing is the straightforward drawing
of error bars and bands, for which I've been using Hmisc::xYplot
(where error bands seem to be broken for R) or gplots::barplot2.
_
1 - 100 of 113 matches
Mail list logo