Hi
I am using the latex() command from the Hmisc package to export table
to latex. For formating of the values, I use the format() function. But
I don't manage to get the format of the values right: I don't want
scientific notation, but if I say scientific=FALSE, I get many digits
after the d
assuming your data is called dat, you can use:
tapply(dat$sc, INDEX=list(p=dat$p, aa=dat$aa), var)
see ?tapply and ?var
I hope this helps
Francisco
Aimin Yan wrote:
> I have data like this
>
> aap sc
> met p1 34
> met p1 56
> met p2 45
> met p2 33
> ser p1 34
> ser p1 56
>
I have data like this
aap sc
met p1 34
met p1 56
met p2 45
met p2 33
ser p1 34
ser p1 56
ser p2 45
ser p2 33
...
I want to estimate the following variances for:
sc in p1 for met
sc in p2 for met
sc between p1 and p2 for met
sc for met
sc in p1 for ser
sc in p2 for ser
sc be
Thanks, everyone, for the help!
Bill:
This looks like a really great general solution, but unfortunately I
get an error when I call sumUp:
Error in "[.data.frame"(dat, , key_list, drop = FALSE) :
invalid subscript type
I'm running 2.2.1 because that's the latest I can get on
ubuntu...cou
This issue has come up before:
RSiteSearch("nkpartitions")
will find references for you on CRAN.
You might also try
http://ranau.cs.ui.ac.id/book/AlgDesignManual/BOOK/BOOK4/NODE153.HTM
for some background, or google on "set partitions".
Bottom line: it ain't trivial.
Cheers,
Bert Gunter
Gen
Here is an elementary way of doing it:
> dat
url time somethingirrelevant visits
1 www.foo.com 1:00 xxx100
2 www.foo.com 1:00 yyy 50
3 www.foo.com 2:00 xyz 25
4 www.bar.com 1:00 xxx200
5 www.bar.com 1:00
Hi!
Suppose I have m objects. I need to find out what are all possible ways
I can group those m objects into r groups. Moreover, I need to create a
matrix that contains what those arrangements are. I've created code for
when r=2 but I've come to a halt when trying to generalize it into r groups
> x
url time somethingirrelevant visits
1 www.foo.com 1:00 xxx100
2 www.foo.com 1:00 yyy 50
3 www.foo.com 2:00 xyz 25
4 www.bar.com 1:00 xxx200
5 www.bar.com 1:00 zzz200
6 www.foo.com 2:00
On Tue, 2006-12-12 at 15:34 -0800, George Nachman wrote:
> I have a data frame that looks like this:
>
> url time somethingirrelevant visits
> www.foo.com 1:00 xxx 100
> www.foo.com 1:00 yyy 50
> www.foo.com 2:00 xyz 25
> www.bar.com 1:00 xxx
You could look at the reshape package, using sum as the aggregate function.
HTH,
Simon.
George Nachman wrote:
> I have a data frame that looks like this:
>
> url time somethingirrelevant visits
> www.foo.com 1:00 xxx 100
> www.foo.com 1:00 yyy 50
> www.foo
I have a data frame that looks like this:
url time somethingirrelevant visits
www.foo.com 1:00 xxx 100
www.foo.com 1:00 yyy 50
www.foo.com 2:00 xyz 25
www.bar.com 1:00 xxx 200
www.bar.com 1:00 zzz 200
www.foo.c
I found a half decent solution to this, output the plots then combine
them with the image files in a latex document (using some messy
shellscripting).
Sweave would be more suitable, but this worked fine.
cheers,
Jared
__
R-help@stat.math.ethz.ch mai
On 12/12/06, Alex Brown <[EMAIL PROTECTED]> wrote:
> I think I've found the problem, and a sort of fix, for this issue.
>
> It appears in the panel.barchart function
>
> each of the clauses in the function has a set of lines roughly like:
>
> groups <- as.numeric(groupSub(groups, ...))
Hi all,
I am trying to use the BIOENV function in the Vegan package and am
wondering if there is a way to perform the function with missing
values. Is there a way to pass use="pairwise.complete.obs" to the cor
function? Or is this the wrong way to approach it?
Thanks
Wade
_
...ifelse, a function of three **vector** arguments
Yes !!
I misunderstood the functioning of ifelse.
Thanks
Jacques.
Peter Dalgaard wrote:
> [EMAIL PROTECTED] wrote:
>> What is puzzling me is that rnorm(1) is only evaluated *twice*, one
>> time for each branch, with only 2 different rando
I think you can find your answer if you study this part of the
documentation for ifelse:
Details:
If yes or no are too short, their elements are recycled. yes will be
evaluated if and only if any element of test is true, and analogously
for no.
Also, consider this call:
ifelse(1:12 > 5, 1:3,
[EMAIL PROTECTED] wrote:
> What is puzzling me is that rnorm(1) is only evaluated *twice*, one time
> for each branch, with only 2 different random deviates, instead of
> giving ten different random deviates. y1 has indeed 10 values but with
> only 2 different ones.
>
I find it more puzzling
> But you got only two (eventually one) distinct values, right? Look at
> the code for 'ifelse': yes and no are only called once each, then
> recycled to desired length.
>
> I guess you want something like
>
> x <- rnorm(10)
> y <- rnorm(10)
> z <- rnorm(10)
> y1 <- ifelse(x > 0, y, z)
>
Thanks
Göran Broström wrote:
> I just caught a segfault:
>
>
>> courses("Ingrid")
>>
>
> *** caught segfault ***
> address 0x99b279c, cause 'memory not mapped'
>
> Traceback:
> 1: structure(y, class = oldClass(x), row.names = attr(x, "row.names"))
> 2: `[.data.frame`(gudata, -(1:5))
> 3: gudat
On 12/12/06, Leeds, Mark (IED) <[EMAIL PROTECTED]> wrote:
> ifelse is vectorized but there is no way you could know what's
> happening with that command
> because you have rnorm(1) for both conditions. I think you mean to have
> something different in one of them ?
>
> Whewn I run your code in my
What is puzzling me is that rnorm(1) is only evaluated *twice*, one time
for each branch, with only 2 different random deviates, instead of
giving ten different random deviates. y1 has indeed 10 values but with
only 2 different ones.
I would like to have rnorm be evaluated for each row and colle
On Dec 12, 2006, at 12:58 PM, Paul Murrell wrote:
>
> Maybe Barry Rowlingson's imagemap is all you need?
> http://www.maths.lancs.ac.uk/Software/Imagemap/
Thank you for that suggestion. Unfortunately the plots can involve
hundreds of thousands of points, and our initial tests with imagemap
i
You can indeed compile and run R directly through the unix layer in Mac
OS (or at least you could about 2 years ago, which was the last time I
tried).
Regards,
Matt Wiener
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Doran, Harold
Sent: Tuesday, Dece
ifelse is vectorized but there is no way you could know what's
happening with that command
because you have rnorm(1) for both conditions. I think you mean to have
something different in one of them ?
Whewn I run your code in my R session, I get 10 values for y1, so there
isn't anything wrong exce
Dear R-helpers,
How come that in the following code the rnorm() function is evaluated
only once for each branch of the 'ifelse' ?
x <- rnorm(10)
y1 <- ifelse(x > 0, rnorm(1) , rnorm(1))
What is the right way to make it called/evaluated for each row, apart
from a 'for' loop ?
Thanks,
Jacques.
I just caught a segfault:
> courses("Ingrid")
*** caught segfault ***
address 0x99b279c, cause 'memory not mapped'
Traceback:
1: structure(y, class = oldClass(x), row.names = attr(x, "row.names"))
2: `[.data.frame`(gudata, -(1:5))
3: gudata[-(1:5)]
4: names(gudata[-(1:5)])
5: inherits(x, "
Dear R-helpers,
How come that in the following code the rnorm() function is evaluated only once
for each branch of the 'ifelse' ?
x <- rnorm(10)
y1 <- ifelse(x > 0, rnorm(1) , rnorm(1))
What is the right way to make it called/evaluated for each row, apart from a
'for' loop ?
Thanks,
Jacqu
Hi
Jon Stearley wrote:
> i have a function like this:
> # show a plot and run a script when the user clicks on a plot,
> # where the script arguments correspond to the user-selected point.
> blah <- function(x, y) {
> plot(y~x)
> n <- identify(x=x, y=y)
> com <- system(command=p
On Tue, 12 Dec 2006, [EMAIL PROTECTED] wrote:
> I have a case-control study that I'm analysing using the conditional
> logistic regression function clogit from the survival package.
>
> I would like to calculate the AICc of the models I fit using clogit.
>
> I have a variety of scripts that can ca
BTW, Mac OS sits on the Darwin unix system. So, you have all the
benefits of Mac and can access unix via the terminal (Steve Jobs is
brilliant). Things like emacs are waiting for you to use on the Mac. I
haven't explored whether one can install R on the Mac and use it via the
unix interface (or whe
Hi - I don't want to ignite any holy wars, but for 10 years until last
year I used Linux, I occasionally use a Windows machine at home, and
last year switched to Mac OS. Of all the GUIs for R out there, the mac
is the best by far IMHO. And R on my macbook is faster than on a
pentium 4 3.2GHz
Hi Tariq
Some discussion of this topic a while ago on the R-devel newsgroup;
bottom line is that there is no consensus and a certain amount of
resistance to make R conform to the implementation of other languages
(and not exploit R's unique strengths).
https://stat.ethz.ch/pipermail/r-devel/2006-
Hi all!
Changing boundary conditions (bc) from "periodic" to "symmetric" in wd (discrete
wavelet transform function) results in increasing of number of wavelet
coefficients. I have a set of 1024 points (i.e. 10 resolution levels), so
instead of 1023 (like in "periodic" case) wavelet coefficients I
If you really want to overlap the graphs, then look at the subplot
function in the TeachingDemos package (you would first need to create a
blank graph with no or minimal margins, then use subplot to place your
graphs within the blank graph).
You may also want to look at the lattice package for doi
Dear R users!
Several languages like C# or VB allow one to create properties; typically
these are under 'get', 'set' tags. My question is this really, what are
similar or comparable strategies in R, and what might be preferred? I have a
couple of situations where I want a certain computation to be
David Lindelöf wrote:
> Dear useRs,
>
> How does one include graphics created with Xfig with LaTeX fonts into
> Sweave?
>
> If I create a graphic with Xfig with some Computer Modern fonts, I
> choose to export it as combined PDF and LaTeX. So I get two files, one
> foo.pdf with the drawings witho
Dear R users!
Several languages like C# or VB allow one to create properties; typically
these are under 'get', 'set' tags. My question is this really, what are
similar or comparable strategies in R, and what might be preferred? I have a
couple of situations where I want a certain computation to be
I think I've found the problem, and a sort of fix, for this issue.
It appears in the panel.barchart function
each of the clauses in the function has a set of lines roughly like:
groups <- as.numeric(groupSub(groups, ...))
vals <- sort(unique(groups))
nvals
I have a case-control study that I'm analysing using the conditional
logistic regression function clogit from the survival package.
I would like to calculate the AICc of the models I fit using clogit.
I have a variety of scripts that can calculate AICc for models with a
logLik method, but clogit
Warning: Something of a personal rant, clearly reflecting my own hangups,
and having nothing to do with my company or anyone else! A good reason for
most to stop reading now
While you will find respondents on this list on the whole quite gracious in
their willingness to help newbies learn R, t
You want to change the settings of the margins (mar not oma). Try
mar=c(2.1, 4.1, 2.1, 0) as a starting point.
On Tue, 12 Dec 2006, Carmen Meier wrote:
> Is there a possibility to minimize the interspace between the graphs or
> better is it possible to overlap the graphs a little bit?
>
> exampl
See ?Memory and the FAQs as the posting guide suggests to do before
posting questions.
Uwe Ligges
Aimin Yan wrote:
> How to deal with this question?
>
> Aimin
>
>
> > plot(p1982)
> Error: cannot allocate vector of size 3640 Kb
> In addition: Warning messages:
> 1: Reached total allocation of
On Tue, 12 Dec 2006, Bent Nielsen wrote:
> I would like to produce simple black and white postscript figures for
> publishing. A black/white or grayscale or CMYK colormodel can be used, but
> not
> RGB colours.
>
> Can I produce postscript graphs in R that satisfy this?
Unfortunately not direc
I think what i want is code in C or Java. But thanks though.
On 12/11/06, Charles C. Berry <[EMAIL PROTECTED]> wrote:
> On Mon, 11 Dec 2006, Weiwei Shi wrote:
>
> > Hi, there:
> >
> > for some reason, I need to look at t.test at coding level. Can anyone
> > here suggest a place to start with?
>
>
If your goal is to put 1 or more plots on top of a map (or other plot),
then the subplot function in the TeachingDemos package may be of help.
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111
-Original Message-
From: [E
Is there a possibility to minimize the interspace between the graphs or
better is it possible to overlap the graphs a little bit?
example from ?lm:
ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14)
trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69)
group <- gl(2,10,20, labels=
hi!
I would like to produce simple black and white postscript figures for
publishing. A black/white or grayscale or CMYK colormodel can be used, but
not
RGB colours.
Can I produce postscript graphs in R that satisfy this?
Following an earlier advice on the help-list I have tried using Pho
The grid package does xsplines which can approximate bezier and other
splines, see grid.xspline and xsplineGrob.
Hope this helps,
--
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
[EMAIL PROTECTED]
(801) 408-8111
-Original Message-
From: [EMAIL PROTECT
Zhuanshi
Thanks for that! I've never seen that website before and it looks really
useful!
I think those functions look a lot more straight forward than any of the others
I've seen today in my searching.
I'll let you know if I get it sorted!
Jenny
>
>Hi Jenny,
>
>Maybe the following links wi
Aimin Yan wrote:
> I have a data set like this.
> I want to do glm, but I get this error:
>
> Error in model.matrix.default(mt, mf, contrasts) :
> cannot allocate vector of length 932889958
>
> I am wondering if my data set is too large or I did something wrong.
>
> Is there some limitatio
>Hi!
>> I'm new here. Want to ask two possibly quite basic questions:
>>
>> 1. How can I clear all objects in one stroke?
>how about
>rm(ls())
try
rm(list=ls())
Bjorn
> 2. How can I perform a regression with independent variables specified by
> an object?
Äh, no spontaneous idea.
Greetings
How to deal with this question?
Aimin
> plot(p1982)
Error: cannot allocate vector of size 3640 Kb
In addition: Warning messages:
1: Reached total allocation of 494Mb: see help(memory.size)
2: Reached total allocation of 494Mb: see help(memory.size)
3: Reached total allocation of 494Mb: see help
I have a data set like this.
I want to do glm, but I get this error:
Error in model.matrix.default(mt, mf, contrasts) :
cannot allocate vector of length 932889958
I am wondering if my data set is too large or I did something wrong.
Is there some limitation for data size for R?
thanks,
Hallo,
for the first question:
mtext(expression(beta[max]),side=1,line=2)
and:
?plotmath
demo(plotmath)
for the second.
Hope it helped,
Scionforbai
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read th
R works very well with the Mac operating system, in my experience.
Packages with simple C should be easy; I have several packages of my
own that use Fortran, just one or two subroutines each, and I have no
difficulty building them.
I'm no expert, but as I understand it, Apple has done some thin
mtext(expression(beta[max]), side=1, line=2)
is it what you want?
b
On Dec 12, 2006, at 10:59 AM, javier garcia-pintado wrote:
> Hi,
> I'm trying to use expression() to write a text to a graphic in the
> margin.
>
> Using:
>
> mtext(expression(beta),side=1,line=2)
>
> writes a perfect beta gr
Hi,
I'm trying to use expression() to write a text to a graphic in the margin.
Using:
mtext(expression(beta),side=1,line=2)
writes a perfect beta greek character, but I need to add a subindex
"max", and I'm trying:
mtext(paste(expression(beta),"max"),side=1,line=2)
simply writes "beta max" in
Hi Jenny,
Maybe the following links will be useful for you. Both of thoes are
used in meteorological and climate research community. But u can used
the codes to create the data values that you need.
g2fsh : Interpolates a scalar quantity from a Gaussian grid to a fixed grid.
http://www.ncl.ucar
Excuses I have a mistake in previous mail
Type stats:::t.test.defaultThe formal way is to use getAnywhere(t.test)
Justin BEM
Elève Ingénieur Statisticien Economiste
BP 294 Yaoundé.
Tél (00237)9597295.
- Message d'origine
De : justin bem <[EMAIL PROTECTED]>
À : Weiwei Shi <[EMAIL PR
Hi!
> I'm new here. Want to ask two possibly quite basic questions:
>
> 1. How can I clear all objects in one stroke?
how about
rm(ls())
> 2. How can I perform a regression with independent variables specified by
> an object?
Äh, no spontaneous idea.
Greetings,
Sebastian
>
> Thanks,
Hi all,
I'm new here. Want to ask two possibly quite basic questions:
1. How can I clear all objects in one stroke?
2. How can I perform a regression with independent variables specified by
an object?
Thanks,
Tim
__
R-help@stat.math.ethz.ch mai
Try this
>stats.t.test.default
Best wishes.
Justin BEM
Elève Ingénieur Statisticien Economiste
BP 294 Yaoundé.
Tél (00237)9597295.
- Message d'origine
De : Weiwei Shi <[EMAIL PROTECTED]>
À : [EMAIL PROTECTED]
Cc : r-help
Envoyé le : Mardi, 12 Décembre 2006, 1h05mn 46s
Objet : [R
Thanks Roger,
I shall have a further look at expand.grid() and the fields package and see
what
I can do!
Jenny
>
>Jenny:
>
>If you have two matrices, and know the grid values of the x and y sequences,
you can use expand.grid() and some trial and error to make a data frame with
longitude, lat
Hi everybody,
I've recently write my first R package and when I run :
R CMD check myPackage
I got the following message :
* Installing *source* package 'myPackage' ...
** R
** save image
Error in exists(x, envir, mode, inherits) :
invalid first argument
Error: unable to load R code in pac
Hi Rita,
This is the option you are looking for:
Command-Line Name: -exportselection
Database Name: exportSelection
Database Class: ExportSelection
Specifies whether or not a selection in the widget should also be
the
X selection. The value may have any of the forms accepted by
Tcl_Ge
Rita,
give the exportselection=FALSE argument to tklistbox.
(If i'm not mistaken.)
G.
On Tue, Dec 12, 2006 at 11:55:58AM -, Rita Sousa wrote:
> Hi everyone,
>
> I have different listboxes in the same toplevel window.
> The problem is, if I select (by left clicking) one of those listbox
>
Hi everyone,
I have different listboxes in the same toplevel window.
The problem is, if I select (by left clicking) one of those listbox
elements, the current selection in the other listboxes is cleared!
Anybody knows how I can prevent this?
Thanks,
--
I have made a logistic model for the probability a child will be immunized.
Here is the model:
M3 <- lmer(immun ~ kid2p + order23 + order46 + order7p + indNoSpa + indSpa +
momWork + rural + pcInd81 + (1|mom), family=binomial(link="logit"))
'mom' designates a child's family, where all the families
Dear useRs,
How does one include graphics created with Xfig with LaTeX fonts into
Sweave?
If I create a graphic with Xfig with some Computer Modern fonts, I
choose to export it as combined PDF and LaTeX. So I get two files, one
foo.pdf with the drawings without the text and foo.pdftex with some
L
Dear R-help community,
I have looked on the R search site and archives but cannot find mention of a
way
of interpolating a gaussian distribution of data to a standard 2.5 degree grid.
I have two global dataset and I need to correlate - unfortunately one is a 2.5
degree grid dim[longitude=144,
t.d. kaplan wrote:
> hi,
>
> how can i set multiple x-axis labels on a plot? in effect, i want
> to set 2 x-axis labels and values on the tick marks. is it possible
> to have one running on the bottom (as is the default) and another
> running across the top of a plot?
Yes, for plotting axes se
Perhaps you are looking for ?persp.
Uwe Ligges
Divya Alice Varkey wrote:
> Hi,
>
>
>
> I have been trying to make a surface plot using R - I came across
> functions like plot.surface, surface but I could not use these functions
> as they seem to be in FOO package which I cannot load. I also w
72 matches
Mail list logo