I have a 43MB dataframe ( 5 variables) and I'm trying to summarize subsets
of the data.
I've RTFM ( not very clear) and looked at a variety of samples but cant seem
to figure out
how to make these functions work.
A sample of what I want to do would be this:
ids<-seq(1,50)
years<-c(rep(5,10),rep(
You do not say what OS you are using and the differences in graphics
operations can be substantial. Had this been on a Mac, the answer
would be to page backward through the plots with cmd- and
save them with cmd-s or File/Save As.. I suspect that similar
facilities exist on Windows. Perhap
If you are looping doing the assignment:
gdata34[1,m]<-gdata[m,4]
why would yo expect that gdata[1,4] would have the same value as
gdata[1,4]. Do you have your indices reversed?
You need to provide at least the data in 'gdata' so we have a reproducible
example.
On Sat, Apr 24, 2010 at 9:13 A
On 04/25/2010 05:04 AM, Kevin Turner wrote:
Hello,
I'm trying currently using barplot to summarize precipitation data. So far
I've compiled total annual snow and rain accumulation in a table
(attached). I've been successful at plotting it using the following code:
fig=barplot(t(Annual_Precip_
On 2010-04-24 21:30, Anthony Lopez wrote:
Hello R folks,
I am encountering a problem with the following scatterplot function from the
car package:
scatterplot(y~x|z)
where y and x are continuous (interval) random variables and z is a
categorical variable. When z is a categorical variable co
On Fri, Apr 23, 2010 at 12:56 PM, Jon Zadra wrote:
> I took a look at xYplot() but it is beyond over-complex, at least for my
> level, and the documentation isn't too clear.
>
> Is there a simple way to make functions like plotCI() and errbar() use the
> lattice reference rather than base graphics
On Sat, Apr 24, 2010 at 3:26 PM, Jun Shen wrote:
> Hi, David,
>
> Thanks. It is working perfectly now. But I still don't understand the
> argument "page", I couldn't find it in text() or par(). Also in the "page =
> function(n){..}" the argument "n" does not appear anywhere and it seems
> OK t
On Sat, Apr 24, 2010 at 7:43 PM, Felix Andrews wrote:
> On 25 April 2010 08:41, Erich Studerus wrote:
>> Hello
>>
>> After updating to R version 2.11.0, the xlim argument of the lattice
>> barchart function does no longer work as expected. For example, the
>> following code does not produce the s
I'm sure there are people willing to help you, but you
will have to be a little more forthcoming with information.
I don't know how many predict functions there are in the
2000-plus packages on CRAN, but there surely are quite a
few. Perhaps you could let us know what you're using
before you get t
Hello R folks,
I am encountering a problem with the following scatterplot function from the
car package:
> scatterplot(y~x|z)
where y and x are continuous (interval) random variables and z is a
categorical variable. When z is a categorical variable coded 1 or 2, I
(appropriately) get a scatterp
Hi:
Here are a few options. The key step, it seems to me, is to transform the
data so that
you have one 'factor' consisting of the variable names and another column
with
the values; this is what the melt() function in the reshape package does.
This idea
should work irrespectively of the number of
On 25 April 2010 08:41, Erich Studerus wrote:
> Hello
>
> After updating to R version 2.11.0, the xlim argument of the lattice
> barchart function does no longer work as expected. For example, the
> following code does not produce the same result in lattice lattice_0.18-3
> and lattice_0.18-5
>
>
> Many people seem to be reluctant to define functions,
> even thought I think it is a pretty small step from
> writing scripts to writing functions.
I'm not so sure - I find most students struggle to grasp that next
level of abstraction. Generalising from a specific task to a general
function is
On Apr 24, 2010, at 9:00 PM, David Winsemius wrote:
On Apr 24, 2010, at 6:26 PM, Jun Shen wrote:
Hi, David,
Thanks. It is working perfectly now. But I still don't understand
the argument "page", I couldn't find it in text() or par().
text and par are base graphics functions. page is an
==
y=c(9,9,17,11,7,8,15,5)
treat=c("A","C","B","C","D","A","B","D")
block=c(1,1,2,2,2,3,3,3)
q1.mod=aov(y~as.factor(treat)+as.factor(block))
q1.mod
summary(q1.mod)
par(ask=T)
plot(TukeyHSD(q1.mod))
On Apr 24, 2010, at 6:26 PM, Jun Shen wrote:
Hi, David,
Thanks. It is working perfectly now. But I still don't understand
the argument "page", I couldn't find it in text() or par().
text and par are base graphics functions. page is an argument to
lattice functions:
(Page 26 of Sarkar;
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of Peter Ehlers
> Sent: Saturday, April 24, 2010 3:51 PM
> To: hadley wickham
> Cc: r-help@r-project.org
> Subject: Re: [R] Intersection for two curves
>
> On 2010-04-24 13:50, hadl
On 2010-04-24 13:50, hadley wickham wrote:
On Sat, Apr 24, 2010 at 12:54 PM, Peter Ehlers wrote:
Well, this has seriously gotten off the original topic.
While Hadley makes some sense, it is nevertheless
sometimes the case (surely so for David, I would surmise)
that one is putting together a re
Hello
After updating to R version 2.11.0, the xlim argument of the lattice
barchart function does no longer work as expected. For example, the
following code does not produce the same result in lattice lattice_0.18-3
and lattice_0.18-5
barchart(t(matrix(1:3,1:3)),horizontal=F,box.width=1,xli
Hi, David,
Thanks. It is working perfectly now. But I still don't understand the
argument "page", I couldn't find it in text() or par(). Also in the "page =
function(n){..}" the argument "n" does not appear anywhere and it seems
OK to be replaced with any other letter. Can anyone explain it a
Hello,
I am new to R and am having difficulty formatting numerical output from a
regression analysis. My code iteratively performs linear regression on a
dataset while excluding certain data ranges.
My code:
rm(list = ls(all = TRUE))
sink("outfile")
dat <- read.table("testdat", sep="\t", header
On Apr 23, 2010, at 3:48 PM, Maxim wrote:
I have a very simple question, but I'm obviously not able to solve the
problem on my own.
I have a data.frame like
sample(c("A","B","C"),size=20,replace = T)->type
rnorm(20)->value
data.frame(ty=type,val=value)->test
There must be some built in fun
I wrote a followup to your old message which had no replies-- my situation is
near identical, and, I wonder if you found a solution. (Running "make check"
on R, failure of stats test.)
Thanks,
Stephen Carrier
__
R-help@r-project.org mailing list
htt
Identical Problem on Identical Platform. Only difference is R-2.11.0. The
trailing content of stats-Ex.Rout.fail is:
-
> trees <- window(treering, start=0)
> (fit <- StructTS(trees, type = "level"))
Call:
StructTS(x = trees, type = "level")
Variances:
levelepsilon
0.0003700 0.0
Hello,
I am trying to calculate predicted values derived from one dataset into a
hypothetical dataset. I tried this line of code:
graphdata$fmgpredvalues <- predict(Acs250.3.4, graphdata)
and received the following error message:
ERROR: ZXend[1], drop = FALSE] %*%lmeFit$beta
I h
On Apr 24, 2010, at 4:52 PM, Jun Shen wrote:
Hi,
I also want to show user's name at the lower-left corner. So I added
one more line to Deepayan's code but it didn't work. I am not sure
how to use the "page" argument here. Appreciate any comment.
lattice.options(default.args = list(page =
You can use fBasics package
sample(c("A","B","C"),size=20,replace = T) -> type
rnorm(20) -> value
data.frame(ty=type,val=value) -> test
require(fBasics)
nam <- rownames(basicStats(test$val))
result <- do.call("cbind", with(test, tapply(val, ty, basicStats)))
rownames(result) <- nam
result
Best
Hi,
I also want to show user's name at the lower-left corner. So I added one
more line to Deepayan's code but it didn't work. I am not sure how to use
the "page" argument here. Appreciate any comment.
lattice.options(default.args = list(page = function(n) {
panel.text(lab = sprintf("%s", date(
On Apr 24, 2010, at 3:53 PM, Albert Vilella wrote:
Hi,
I've got a csv file with scores like this:
40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,32,38,40,20,40,26,40,30,40,5,5,13,12,40,40,3,33,29,23,2,24,9,15,4,21,16,5,26,8,8,18
40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,32,4
Hi
I do not speak in English very well, I'm sorry.
I try good:
layout(matrix(1:4,ncol=2, byrow=T)) = par(mfrow=c(2, 2))
plot(1,1) <--- anddoes plot in the upper left corner
plot(2, 2) <--- upper right corner
BUT, I like plot( n, m) for example lower right corner, or lower left
corner, or again
Well it sounds like you won't lose any work, but you will lose
some time. But why not open another session of R for R-help questions?
Then you're never in any danger. I often have four or five instances of
R running for different projects.
Hadley
Well for one thing you turkey, OS X will no
I used it but for example:
> robots2[74]
[1] "\"Teoma\" or \"Ask Jeeves\" or \"Jeeves\""
It wasn't sorted.
Sebastian.
2010/4/14 Barry Rowlingson :
> On Wed, Apr 14, 2010 at 6:20 PM, Sebastian Kruk
> wrote:
>> I have a problem, In a few cases "robot-exclusion-useragent" have 2 or
>> more value
Hi,
I've got a csv file with scores like this:
40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,32,38,40,20,40,26,40,30,40,5,5,13,12,40,40,3,33,29,23,2,24,9,15,4,21,16,5,26,8,8,18
40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,40,32,40,40,30,40,40,37,34,40,36,13,40,13,40,5,40,8,29,5,15,34
On Sat, Apr 24, 2010 at 12:54 PM, Peter Ehlers wrote:
> Well, this has seriously gotten off the original topic.
>
> While Hadley makes some sense, it is nevertheless
> sometimes the case (surely so for David, I would surmise)
> that one is putting together a response to an R-help
> query when a ne
Define a function dejunkify which removes commas and parens and
converts cols 2 onwards to numeric. Assuming that the lines near the
end of the file all start with B use "B" as the comment character and
read in the file and then dejunkify it. Then read in the lines again
and extract out the lines
Hi,
I'm having trouble seeing the added value over functions defined by setGeneric
vis-a-vis
methods defined by inheritance and polymorphism. setGeneric offers a 'clean'
call to a generic function, ie. no need to call new(), so less typing to do for
the user. But such explicit calls can also be
Hi:
I need help with a dataframe. is a mix of dates and text.
I want to create a table either using latex function from hmisc or xtable. I
already know how to do this but the problem is getting the dataframe into R.
I don't have a reproducible example . If someone is interested in
helping with thi
Hello,
I'm trying currently using barplot to summarize precipitation data. So far
I've compiled total annual snow and rain accumulation in a table
(attached). I've been successful at plotting it using the following code:
fig=barplot(t(Annual_Precip_table), horiz=TRUE, space=0, col=c("grey70",
"
David Winsemius sent the following at 24/04/2010 18:24:
>> Now that I'm here, courtesy of my time slip, what I'd really love to see
>> in R 10.0.0, or even 2.12.0, is the choice to have output either in the
>> current plain text or to some simple formatting primitives that would
>> have default ta
Well, this has seriously gotten off the original topic.
While Hadley makes some sense, it is nevertheless
sometimes the case (surely so for David, I would surmise)
that one is putting together a response to an R-help
query when a new query prompts one to temporarily abandon
the first and formulat
Hi:
I need help with a dataframe(see pic attached). is a mix of dates and text.
I want to create a table either using latex function from hmisc or xtable. I
already know how to do this but the problem is getting the dataframe into R.
I don't have a reproducible example but I am hoping that the pic
On Apr 24, 2010, at 8:06 AM, chrish...@psyctc.org wrote:
Ah, Dr. Who's got nothing on me!
Beg pardon, I'm recuperating from an operation and clearly more than
usually disoriented. I meant 2.10.1 and 2.11.0 of course.
Now that I'm here, courtesy of my time slip, what I'd really love to
see
Hello there,
I am trying to run an ANOVA model using a non-Standard F ratio. Imagine that
the treatments (treatments 1 & 2) are applied to the row not to individual
samples. Thus the row is the experimental unit. Therefore my error term in
my ANOVA table should be the error associated with with ro
On Apr 24, 2010, at 10:09 AM, hadley wickham wrote:
Perhaps, true in some respects. I am still chiseling out work using
primitive editing tools. But it still takes several minutes to load
the
objects I am working on into memory and then several minutes each
to build
new models. The models s
If I understand it correctly
par(mfrow=c(2,2))
plot(x,y)
plot(y,z)
.
should work.
On Apr 24, 2010, at 8:11 AM, Jim Lemon wrote:
On 04/24/2010 02:52 AM, tamas barjak wrote:
Hi All!
I have 2 plain questions:
1.)
I know that very primitive question, but that to grant it, that the
drawi
Dear list,
just to put it in a simple way:
i read.csv from csv file to create a gdata
then, create array gdata34
however, when making a loop for assigning gdata34[1,m]<-gdata[m,4], this is
what happen
gdata[1,4] 's real value is 10354, however, the gdata34[1,4] turns to be 883
then i checke
Ah, Dr. Who's got nothing on me!
Beg pardon, I'm recuperating from an operation and clearly more than
usually disoriented. I meant 2.10.1 and 2.11.0 of course.
Now that I'm here, courtesy of my time slip, what I'd really love to see
in R 10.0.0, or even 2.12.0, is the choice to have output eithe
Am 24.04.2010 16:01, schrieb Marc Schwartz:
> If you really want the values on top of the bars, use text() instead
> of mtext(). You will also need to increase the max value of the y axis
> to make room for the labels using the ylim argument in barplot():
> costs <- c(1, 5, 10, 20, 50, 150)
>
> m
Hi, having used both the gee pacakge and the geepack package, i am unsure of
how to interpret the results.
Here are the results from the geeglm function from the geepack package
> gee2<-geeglm(data$erythema~data$product, data = data, id=subject,
> family=binomial, corstr="independence")
Warning
Jay, thanks a bunch. New package seems to work just fine and great
improvement in docs by the way:). I tried the same example, new version
deals with it smoothly. In terms of usefulness of my sample code -- sure i
am writing same stuff to disk many times with only one handle -- it was some
toy cod
Ah, you didn't provide a complete description of
your problem. gdata is a factor. You need to
read about converting factors to numeric, or
perhaps reconsider your method of creating or
importing gdata.
as.numeric(somefactor) does not extract the
printed value, it extracts the *order of the factor*
-- Forwarded message --
From: Dong GUO
Date: Sat, Apr 24, 2010 at 4:50 PM
Subject: Re: [R] assign value between different type: Double vs Integer
To: Sarah Goslee
Thanks, Sarah.
the loop is all right. this is what I just experimented.
and when trying to do as.numeric (ggg), and
On Sat, Apr 24, 2010 at 9:31 AM, Dong GUO wrote:
> Dear list,
>
> just to put it in a simple way:
>
> i read.csv from csv file to create a gdata
>
> then, create array gdata34
>
> however, when making a loop for assigning gdata34[1,m]<-gdata[m,4],
> this is what happen
So you assigned (m == 4)
g
Just wrote a small piece of code to do so. Thanks.
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
On Behalf Of Shubha Vishwanath Karanth
Sent: Saturday, April 24, 2010 6:28 PM
To: r-help@r-project.org; r-h...@stat.math.ethz.ch
Cc: gabor.csa...@
On Apr 24, 2010, at 8:59 AM, Shubha Vishwanath Karanth wrote:
> Hi,
>
>
>
> Let s be a dataframe.
>
>
>
>> s
>
> A B C
>
> 0 0 1
>
> 1 0 1
>
> 1 0 1
>
> 0 0 1
>
> 1 0 1
>
> 0 1 1
>
> 0 1 1
>
> 0 1 1
>
> 0 0 1
>
>
>
>> tab1=table(s[,c(1,2)])
>
>> tab1
>
>
> Perhaps, true in some respects. I am still chiseling out work using
> primitive editing tools. But it still takes several minutes to load the
> objects I am working on into memory and then several minutes each to build
> new models. The models still reside in memory, since I do not know any
> met
>> If clearing out your workspace destroys *any* work, then something is
>> seriously wrong with your workflow.
>>
>
> Yes, of course. Lets all post viruses to run on each others'
> machines. That will teach those users who don't run antivirus and
> backup software between each posting to r-help.
The reason why Hmisc is not available from CRAN can be seen on the
package check summaries. Particularly for Hmisc:
http://cran.r-project.org/web/checks/check_results_Hmisc.html
which fails everywehre now. The maintainer has been notified by
automated messages.
We do not ship binaries of pac
On Apr 24, 2010, at 5:44 AM, Sebastian Bergmann wrote:
> Hello!
>
> I started using R today to produce a bar chart that I can use in LaTeX.
>
> Here is what I have got so far:
>
> pdf("bugfix_costs.pdf")
> costs <- c(1, 5, 10, 20, 50, 150)
> barplot(costs,
> ylab="Relative cost
Hi,
Let s be a dataframe.
> s
A B C
0 0 1
1 0 1
1 0 1
0 0 1
1 0 1
0 1 1
0 1 1
0 1 1
0 0 1
> tab1=table(s[,c(1,2)])
> tab1
B
A 0 1
0 3 3
1 3 0
> tab2=table(s[,c(1,3)])
> tab2
C
A 1
0 6
1 3
The problem is I ne
Bootstrap? You could start here:
http://www.statmethods.net/advstats/bootstrapping.html
-Ista
On Sat, Apr 24, 2010 at 6:07 AM, pauls182 wrote:
>
>
> Hi,
>
> I'm currently trying to find/define a relationship between one dependent and
> several independant variables.
> The problem is that i canno
On Apr 24, 2010, at 9:05 AM, hadley wickham wrote:
rm(list=ls())
PLEASE, DON'T DO THAT. Or rather you can do it in your
workspace but
don't post it. It's not fair to a person who may not read your code
line by
line before pasting it into their workspace and having it wiped
out. Do y
On Sat, Apr 24, 2010 at 9:05 AM, hadley wickham wrote:
>>> rm(list=ls())
>>
>> PLEASE, DON'T DO THAT. Or rather you can do it in your workspace but
>> don't post it. It's not fair to a person who may not read your code line by
>> line before pasting it into their workspace and having it wiped
Dear list,
just to put it in a simple way:
i read.csv from csv file to create a gdata
then, create array gdata34
however, when making a loop for assigning gdata34[1,m]<-gdata[m,4],
this is what happen
gdata[1,4] 's real value is 10354, however, the gdata34[1,4] turns to be 883
then i checked
>> rm(list=ls())
>
> PLEASE, DON'T DO THAT. Or rather you can do it in your workspace but
> don't post it. It's not fair to a person who may not read your code line by
> line before pasting it into their workspace and having it wiped out. Do you
> expect us to completely clear out our workspace
Hi,
I wanted the DICE coefficient (similarity measure for binary variables)
to be calculated in R and found that the "igraph" package has the option
of "similarity.dice" to do this. But, for this command, the input object
should be an igraph object. But, I have a dataframe of columns
containing
On Apr 24, 2010, at 8:10 AM, Muhammad Rahiz wrote:
Thanks again David,
I've made the changes. The optimize() function works alright but it
does not give me the intersection. I suspect it must have to do with
the user-defined function which I am totally clueless and am
inexperienced with.
On 04/24/2010 05:48 AM, Maxim wrote:
Hi,
I have a very simple question, but I'm obviously not able to solve the
problem on my own.
I have a data.frame like
sample(c("A","B","C"),size=20,replace = T)->type
rnorm(20)->value
data.frame(ty=type,val=value)->test
There must be some built in f
Thanks again David,
I've made the changes. The optimize() function works alright but it does
not give me the intersection. I suspect it must have to do with the
user-defined function which I am totally clueless and am inexperienced
with. Mind showing the way.
Thanks again and thanks for your
On 04/24/2010 02:52 AM, tamas barjak wrote:
Hi All!
I have 2 plain questions:
1.)
I know that very primitive question, but that to grant it, that the drawing
on the screen divided up onto which part draw
for example:
layout(matrix(1:4,ncol=2, byrow=T))
plot(x, y, ...)<--- 1. screen
plot(y,
On 04/23/2010 10:51 PM, Ariane C. Böhm wrote:
Hi guys of the R-Help-Team!First of all - you do a great job!I've found a lot of your mails in the internet. So I thought it would be a
good idea to ask you a question about R.R is new to me, so sorry,
if the question is too simple :)I have a matrix.I
Zerdna,
Please note that the CRAN version 3.12 is about
to be replaced by a new cluster of packages now on R-Forge; we consider the
new bigmemory >= 4.0 to be "stable" and recommend you start using it
immediately. Please see http://www.bigmemory.org.
In your case, two comments:
(1) Your for() l
I am new to R and I suspect my problem is easily solved, but I haven't
been able to figure it out without using loops. I am trying to
implement Blair & Karniski's (1993) permutation test. I've included a
sample data frame below. This data frame represents the conditional
means (C1, C2) for 3
Thanks for all of the replies. For me at least, it turns out I had to manually
set permissions in the bitmap folder,
and the three folders (jpeg-8a, libpng, and libtiff). Works fine now.
Alan-
- Original Message -
From: Duncan Murdoch
Date: Friday, April 23, 2010 4:48 am
Subject: Re:
Hi,
I'm currently trying to find/define a relationship between one dependent and
several independant variables.
The problem is that i cannot use the normal multiple regression/correlation
in Spss because the data is not normal distributed.
i calculated the spearman roh and Kendalls tau Correlat
Hello!
I started using R today to produce a bar chart that I can use in LaTeX.
Here is what I have got so far:
pdf("bugfix_costs.pdf")
costs <- c(1, 5, 10, 20, 50, 150)
barplot(costs,
ylab="Relative cost of a bugfix",
names.arg=c("Requirements", "Design", "Code"
I am new to R and I suspect my problem is easily solved, but I haven't
been able to figure it out without using loops. I am trying to
implement Blair & Karniski's (1993) permutation test. I've included a
sample data frame below. This data frame represents the conditional
means (C1, C2) for 3
Clever solution. I use paste alot and didn't think to use it for this
problem. Thanks!
--
View this message in context:
http://r.789695.n4.nabble.com/Linux-System-Function-tp2063058p2063113.html
Sent from the R help mailing list archive at Nabble.com.
___
Thank you for the quick answer, but i was asking if some method could do
combinations where numbers of the same vector wont combine.
A little bit like 'expand.grid', but with the possibility to choose the
length for output combinations.
Cláudio
2010/4/23 Jorge Ivan Velez
> Hi Cláudio,
>
> Try t
79 matches
Mail list logo