On Thu, 5 Oct 2006, Christos Hatzis wrote:
> Jue,
>
> On a second look, it appears that wilcox.test does report the
> offset-adjusted statistic U, as also mentioned in the help page.
>
> wilcox.test returns W=6 (instead of 12 as your example showed, unless
> "wilcox_test" is a different function)
Hi there,
I really couldn't find out how to plot histogram with point/line instead of
rectangle for each bin? Any help please? Thanks!
Best,
-Cao
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the
Dear list members,
I have been doing robust regressions in R, using the MASS package for
rlm and robustbase for logistic regressions. I must be doing something
wrong, because my output does not include r-squares (or adjusted r-squares),
or, in the case of glmrob, -2log likelihoods. Does any
In looking at this once more I realize that I did not really answer
the question which was how to get the getFunNames function that
you defined to run in another funciton. Use do.call with match.call
to replicate the calling sequence:
myfun <- function(x) {
do.call(getFunNames, list(match
Hi
This is a final call for abstracts; the deadline for submitting
abstracts is October 15 2006.
Please forward and circulate to other interested parties.
[apologies for any cross-posting]
DSC 2007, a conference on systems and environments for statistical
computing, will take place in Auckland,
"Jenny Stadt" <[EMAIL PROTECTED]> asked:
>
> I am struggling in a bivariate Weibull distribution although I
> searched R-Site-Help and found suggestion with Copula. Seems the
> maximum likelihood estimate is beyond what I can understand.
>
> My case is: given two known marginal distribution (both
Dear list,
Please, how can I get all the levels of the same factor to have the same color
and different color for each factor?
Script:
library(MASS)
plot(mca(farms, abbrev = TRUE), rows=F)
Thanks in advance,
--
Jose Claudio Faria
Brasil/Bahia/Ilheus/UESC/DCET
Estatística Experimental/Prof. Ad
lm(dep ~ as.factor(WKDY)
but if you want WKDYs as character you can make the appropriate changes
in your dataset
> days<-c("mon","tue","wed","thu","fri","sat","sun")
> for(i in 1:7)
+ D$WKDY[D$WKDY==i]<-days[[i]]
suppossing that D is your dataframe
HTH
Spencer Jones wrote:
>All,
>
>I am tr
Use the command ess-set-style and set it to BSD.
See the documentation in ESS, starting with
C-h f ess-set-style
It is described in the documentation for ESS,
either .../doc/html/ess.html
or .../doc/info/ess.info
Search for "indent"
If you have followup questions on this topic, please use t
hi, there:
I have a question on use of arules package:
suppose i have a classification problem with class id = 1 or 0.
i put predictors and class ids together and tranform all of them into
binary thus i got a binary matrix. When I build the rules from it, I
subset the rules to 2 by defining rhs
Thanks Gabor,
I realized I could also use this code
xyplot(x ~ x | g, data = data.frame(x = 1:12, g = gl(3,4)), groups=g,
panel = function(..., groups, subscripts) {
panel.xyplot(...)
panel.text(x=2, y=4, labels=groups[subscripts])
})
Which is essentially a rewrite of one of the exam
I should have mentioned is that the way it works is that
it uses the name of the list component, if any, otherwise
it uses the name of the function if its given as a name
and otherwise it uses the function itself or possibly the
name of the list.
>
> On 10/5/06, Gabor Grothendieck <[EMAIL PROTECTE
I should have mentioned is that the way it works is that
it uses the name of the list component, if any, otherwise
it uses the name of the function if its given as a number
and otherwise it uses the function itself or possibly the
name of the list.
On 10/5/06, Gabor Grothendieck <[EMAIL PROTECTED]
On Thu, 2006-10-05 at 15:44 -0700, Kaom Te wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hello,
>
> I'm a novice user trying to figure out how to retain NA aggregate
> values. For example, given a data frame with data for 3 of the 4
> possible factor colors("orange" is omitted from
Probably the best you can hope for is to cover
most cases. This one uses match.call and handles
a number of cases and perhaps if you spend more time
on it might be able to add some cases where it fails
such as the second L below:
f <- function(x) {
if (!is.list(x)) x <- list(x)
if
Please let's not waste any time trying to figure out how to add
block comments to R. In any guise they are highly error prone.
Although its precursors (PL/I and Pascal) had block comments and did not
have end-of-line comments, the programming language Ada was explicitly
designed to have end-of-lin
If you include a conditioning factor (here it is the variable
"groups") you will get more than one panel. To get loess curves for
the two groups, the easiest way is to use the type argument:
> xyplot(y ~ time, groups=group,data=df,type=c("p","smooth"))
On 05/10/06, Osman Al-Radi <[EMAIL PROTECTE
We have a solaris/sparc machine that has been running an old version
of R-devel: Version 2.2.0 Under development (unstable) (2005-06-04
r34577)
which was built as m64 from sources. Attempting to upgrade to 2.4.0
the configure step
goes ok, but I'm getting early on from make:
> gcc -m64 -L/o
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello,
I'm a novice user trying to figure out how to retain NA aggregate
values. For example, given a data frame with data for 3 of the 4
possible factor colors("orange" is omitted from the data frame), I want
to calculate the average height by color,
Greetings, friends in the R community,
this is an OT question about statistics. Given four time series of
events, what possibilities do I have to test for synchronicity?
e.g.
times <- data.frame(year= c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10),
event.1=c(1, 0, 0, 1, 2, 4, 1, 0, 0, 0)
On Thu, 2006-10-05 at 16:57 -0400, AgusSusanto wrote:
> I obtained error messages when I run these commands in UNIX, but I
> obtained correct result when I run these command in WINDOWS. Can
> somebody point out the problem and give the solution. Thanks.
Not without Fall.dat I suspect. please re
Hi,
I have a 2 tab-identation in my emacs-ess and I would like to make it 8. Can
somebody help me with this ?
thanks
Johan
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://
Are you sure Fall.dat is identical on both platforms, and that dt is also?
Did you intend to ignore the cases where dt$V2 equals zero?
Try, for example,
table(which(dt[,2] == 0)) ## also ==1, ==2, ==3
unique( dt[which(dt[,2] == 0),5]## also ==1, ==2, ==3
unique( dt$V5 )
adding na
Hello,
Thanks for your answer, however, the resulting graph has two panels with a
loess curve per subject. I need a single panel with a loess curve per
group..
Osman
On 10/5/06, Sundar Dorai-Raj <[EMAIL PROTECTED]> wrote:
>
>
>
> Osman Al-Radi said the following on 10/5/2006 3:43 PM:
> > Hi,
> >
Jue,
On a second look, it appears that wilcox.test does report the
offset-adjusted statistic U, as also mentioned in the help page.
wilcox.test returns W=6 (instead of 12 as your example showed, unless
"wilcox_test" is a different function).
> wilcox.test( 1:5 ~ c(1,1,0,0,0) )$statistic # or wi
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Duncan Murdoch wrote:
> On 10/5/2006 4:10 PM, Lothar Botelho-Machado wrote:
>> -BEGIN PGP SIGNED MESSAGE-
>> Hash: SHA1
>>
>> Hello,
>>
>>
>> I have a simple question on the text() method in plots, e.g.:
>>
>> text(3,4,adj=1,cex=1.0, expression
On Thu, 2006-10-05 at 22:41 +0200, Søren Højsgaard wrote:
> I've defined the function
>
> getFunNames <- function(FUN){
> if (!is.list(FUN))
> fun.names <- paste(deparse(substitute(FUN)), collapse = " ")
> else
> fun.names <- unlist(lapply(substitute(FUN)[-1], function(a) paste(a)))
On 10/5/2006 4:52 PM, Bill Wyatt wrote:
> Hi,
>
> Included is an R.script that came from a much large date set being
> read in to R from a .txt file. Why is it that the first line codes with
> an error, but the second line works fine?
I get syntax errors on both, due to the missing comma at
On 10/5/06, Osman Al-Radi <[EMAIL PROTECTED]> wrote:
> Hi,
>
> for the data below:
> time<-c(rep(1:10,5))
> y<-time+rnorm(50,5,2)
> subject<-c(rep('a',10),rep('b',10),rep('c',10),rep('d',10),rep('e',10))
> group<-c(rep('A',30),rep('B',20))
> df<-data.frame(subject,group,time,y)
>
> I'd like to prod
On 10/5/2006 4:41 PM, Søren Højsgaard wrote:
> I've defined the function
>
> getFunNames <- function(FUN){
> if (!is.list(FUN))
> fun.names <- paste(deparse(substitute(FUN)), collapse = " ")
> else
> fun.names <- unlist(lapply(substitute(FUN)[-1], function(a) paste(a)))
> fun.names
I obtained error messages when I run these commands in UNIX, but I
obtained correct result when I run these command in WINDOWS. Can
somebody point out the problem and give the solution. Thanks.
> dt<-read.table(file="Fall.dat")
> dim(dt)
[1] 19415
> table(dt$V2)
0 1 2 3
220 989 6
Osman Al-Radi said the following on 10/5/2006 3:43 PM:
> Hi,
>
> for the data below:
> time<-c(rep(1:10,5))
> y<-time+rnorm(50,5,2)
> subject<-c(rep('a',10),rep('b',10),rep('c',10),rep('d',10),rep('e',10))
> group<-c(rep('A',30),rep('B',20))
> df<-data.frame(subject,group,time,y)
>
> I'd like t
Hi,
Included is an R.script that came from a much large date set being
read in to R from a .txt file. Why is it that the first line codes with
an error, but the second line works fine? Is there some line length
limit in R? This happens at random places all through my data. Any help
would be
I obtained error messages when I run these commands in UNIX, but I
obtained correct result when I run these command in WINDOWS. Can
somebody point out the problem and give the solution. Thanks.
> dt<-read.table(file="Fall.dat")
> dim(dt)
[1] 19415
> table(dt$V2)
0 1 2 3
220 989 6
On Thu, 2006-10-05 at 22:10 +0200, Lothar Botelho-Machado wrote:
> Hello,
>
>
> I have a simple question on the text() method in plots, e.g.:
>
> text(3,4,adj=1,cex=1.0, expression(alpha == beta))
>
> I know there exists a lot more like frac(), etc which could be used for
> expression. But a he
On 10/5/2006 4:10 PM, Lothar Botelho-Machado wrote:
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
>
> Hello,
>
>
> I have a simple question on the text() method in plots, e.g.:
>
> text(3,4,adj=1,cex=1.0, expression(alpha == beta))
>
> I know there exists a lot more like frac(), etc which
Hi,
for the data below:
time<-c(rep(1:10,5))
y<-time+rnorm(50,5,2)
subject<-c(rep('a',10),rep('b',10),rep('c',10),rep('d',10),rep('e',10))
group<-c(rep('A',30),rep('B',20))
df<-data.frame(subject,group,time,y)
I'd like to produce a plot with a single pannel with two loess curves one
for each grou
Probably because of the offset:
U = W - n*(n+1)/2
In your example, W=12 (=3+4+5) as reported by wilcox.test. The offset is 6
(=3*4/2) and therefore U=6.
I am not certain as I haven't installed the exactRankTests package, but it
seems that wilcox.exact reports U instead of W.
-Christos Hatzis
I've defined the function
getFunNames <- function(FUN){
if (!is.list(FUN))
fun.names <- paste(deparse(substitute(FUN)), collapse = " ")
else
fun.names <- unlist(lapply(substitute(FUN)[-1], function(a) paste(a)))
fun.names
}
which gives what I want :
> getFunNames(mean)
[1] "mean"
Jens Scheidtmann <[EMAIL PROTECTED]> wrote:
> Indispensable is having a good editing cycle. I.e. compile the latex,
> jump to the position where you are editing the file in the preview,
> double click somewhere in the preview, move to that position in your
> editor (or at least near that positio
Is this what you want ?
> A1<-matrix(c(1,0,0,0,0,0,0,0,0),3)
> A2<-matrix(c(1,0,0,0,1,0,0,0,0),3)
> A3<-matrix(c(1,0,0,0,1,0,0,1,0),3)
> X <- matrix(1:24,8)
> XX<-list()
> for(i in 1:3){
+ XX[[i]]<-X%*%A[[i]]
+ }
> XX
[[1]]
[,1] [,2] [,3]
[1,]100
[2,]200
[3,]
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Hello,
I have a simple question on the text() method in plots, e.g.:
text(3,4,adj=1,cex=1.0, expression(alpha == beta))
I know there exists a lot more like frac(), etc which could be used for
expression. But a help(frac) doesn't return any results
Dear R-users,
I try to plot multiple plots of hexbin in the same page. However, par
does not work when hexbin is used. Neither do xlim and ylim. Any ideas?
Thanks,
Sue
[[alternative HTML version deleted]]
__
R-help@stat.math.ethz.ch mailing
For those of you who are littler fans, you'll be pleased to know that
we've already decommissioned version 0.0.6 in light of the new and
improved 0.0.7 (actually 0.0.6 was broken because of a missing file).
You can get it from the links below.
Jeff
--
http://biostat.mc.vanderbilt.edu/JeffreyHo
Anupam Tyagi <[EMAIL PROTECTED]> writes:
[...]
> What is the best format to save R graphics for inclusion into a
> LaTeX documents?
When using pdflatex use pdf for graphics as reference format. Using
ps2pdf or some such may have some problems when it comes to alpha
channels and transparency.
[.
Dear R users,
The package proptest (http://www.davidkraus.net/proptest/) has been
recently released to CRAN.
The package provides functions for testing the proportional hazards
assumption in the Cox model for right censored survival data. Two types of
tests for identifying nonproportional covaria
I seem to have omitted g
library(lattice)
xyplot(x ~ x | g, data = data.frame(x = 1:12, g = gl(3,4)), panel =
function(...) {
panel.xyplot(...)
panel.text(x=2, y=4, labels=which.packet())
})
On 10/5/06, Gabor Grothendieck <[EMAIL PROTECTED]> wrote:
> This requires R 2.4.0. Its the
Hi,
does anybody know how to predict a multivariate AR within R?
If I just estimate a multi AR-object and plug it into predict I get an
error from the aperm - just works for univariates.
thx
alex
__
R-help@stat.math.ethz.ch mailing list
https://stat.e
Does anyone know why wilcox.exact gives W-statistic 6 instead of 12 as
indicated below.
12 is the rank sum of group 0 of x, which is the linear statistic computed by
wilcox_test.
y<-c(1,2,3,4,5)
x<-c(1,1,0,0,0)
(a) wilcox.exact
wilcox.exact(y~x)
Exact Wilcoxon rank sum test
data: y by x
W
+1 for Python style comments.
"""
your comments here
and some more
...
and some related info
"""
jab
--
John Bollinger, CFA, CMT
www.BollingerBands.com
If you advance far enough, you arrive at the beginning.
__
R-help@stat.math.ethz.ch mailing li
Afshartous, David wrote:
> Hi Harold,
>
> Thanks for your response.
> I'll check out p.224 in P&B, thanks.
>
> The null hypothesis is that there is no difference between say
> A=[time=3, drug=I]
> and B=[time=3, drug=P], or mu_A = mu_B. If the study is a crossover
> design, i.e.,
> each patie
All,
I am trying to include a day of week variable (1-7) in in a regression
model. I would like to have the day of week treated as a categorical
variable rather than a number
the code looks like
lm( dep ~ WKDY)
I know this is a basic question, but help would be appreciated
thanks
spencer
Dear All,
I'm thinking of visualizing the original binary data from
affymetrix. Would you recommend any package? Not necessarily limited
to R packages. Thanks!
Best,
-Cao
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listin
I thought of a few more possibilities.
If options 1, 2 and 3 correspond to longfun, longfun2 and longfun3
then:
4. We could arrange it so that the variables are stored outside of
longfun and then longfun, f1 and f2 reference them symmetrically.
a <- b <- d <- 1
longfun4 <- function() {
out <-
Hi Harold,
Thanks for your response.
I'll check out p.224 in P&B, thanks.
The null hypothesis is that there is no difference between say
A=[time=3, drug=I]
and B=[time=3, drug=P], or mu_A = mu_B. If the study is a crossover
design, i.e.,
each patient receives drug=I and drug=P, I assume that
There are two places that I find the current way it works to be
less than ideal although its not that bad either:
1 .when one wants to define strings that have quotes then
one must be careful to use double quoted strings to contain
single quotes and single quoted strings to contain double quotes
o
Hello,
I built 4 mixed models using different data sets and standardized variables
as predictors.
In all the models each of the fixed effects has an associated random effect
(same predictor).
What I find is that fixed effects with larger (absolute) standardized
parameter estimates have also a hi
> "Duncan" == Duncan Murdoch <[EMAIL PROTECTED]>
> on Thu, 05 Oct 2006 11:13:03 -0400 writes:
Duncan> On 10/5/2006 10:57 AM, Martin Maechler wrote:
>>
>> <##
>> ...
>> ##>
>>
>> but I'm not yet fond of the general idea.
>> Martin
Duncan> Is
I repost this in order for more responses. Thanks!
From: Jenny Stadt
Sent: 2006-10-04 16:49:33
To: r-help@stat.math.ethz.ch
CC:
Subject: [R] Bivariate Weibull distribution -- Copula
Hi All,
I am struggling in a bivariate Weibull distribution although I searched
R-Site-Help and found sug
A function I've been using for a while returned a surprising [to me,
given the data] error recently:
Error in plot.window(xlim, ylim, log, asp, ...) :
Logarithmic axis must have positive limits
After some digging I realized what was going on:
x <- c(10460.97, 10808.67, 29499.98, 1, 35818
Hi David:
In looking at your original post it is a bit difficult to ascertain
exactly what your null hypothesis was. That is, you want to assess
whether there is a treatment effect at time 3, but compared to what. I
think your second post clears this up. You should refer to pages 224-
225 of Pinhi
Jeffrey:
Please... May I repeat what Peter Dalgaard already said: consult a local
statistician. The structure of your study is sufficiently complicated that
your stat 101 training is inadequate. Get professional help, which this list
is not set up to provide (though it often does, through the good
list,
i am using lmer to fit multilevel models and trying to use anova to compare the
models. however, whenever i run the anova, the AIC, BIC and loglik are
different from the original model output- as below. can someone help me out
with why this is happening? (i'm hoping the output assocait
Seth Falcon wrote:
>
> My wtf feature request is to add a multiline string delimiter ala
> Python like """.
>
Anything that makes R more like Python syntax gets a +1 from me. How
about getting rid of curly brackets for blocks and using indenting in R?
Time to attack gram.y with a sledgeha
This requires R 2.4.0. Its the same as my earlier example except
the labels= arg has been changed to labels=which.packet().
xyplot(x ~ x | g, data = data.frame(x = 1:12), panel = function(...) {
panel.xyplot(...)
panel.text(x=2, y=4, labels=which.packet())
})
On 10/5/06, Ritwik
On 10/5/2006 10:57 AM, Martin Maechler wrote:
>
> <##
> ...
> ##>
>
> but I'm not yet fond of the general idea.
> Martin
Is that just because you don't need it, or that you see something
objectionable in it?
Duncan Murdoch
__
R-help@st
Hi Spencer,
Thanks for your reply.
I don't think this answers my question.
If I understand correctly, your model simply removes the intercept and
thus the intercept in fm1 is the same as the first time factor in
fm1a ... but am I confused as to why the other coefficient estimates are
now differe
> "PD" == Peter Dalgaard <[EMAIL PROTECTED]>
> on 05 Oct 2006 16:12:50 +0200 writes:
PD> Seth Falcon <[EMAIL PROTECTED]> writes:
>> Uwe Ligges <[EMAIL PROTECTED]> writes:
>> > Use an editor that comments out a whole block which is what I do all
the
>> > time, e.g. use
> Still gives you problems with nested comments. *IF* we want to go down
> that route, we should have directional symbols like
>
> <<<
> dsaldfysdfk
> >>>
What about heredocs? (http://en.wikipedia.org/wiki/Heredoc)
Hadley
__
R-help@stat.math.ethz.ch ma
Hi,
On a related note, if I wanted to add different texts to different
panels, should I stick to using trellis.focus() for each text in each
panel? I cannot figure out a way to do it using a panel function.
Ritwik.
On 9/29/06, Deepayan Sarkar <[EMAIL PROTECTED]> wrote:
> On 9/29/06, Gabor Grothe
Harold and list,
I've changed a few things since the last time so I'm really starting
from scratch.
I start with
bbmale <- read.csv("c:\\eabl\\2004\\feathers\\male_feathers2.csv",
header=TRUE)
box <-factor(box)
chick <- factor(chick)
Here's a sample of the data
box,chick,julian,cltchsz,mrtot
On 10/5/2006 9:41 AM, David Kaplan wrote:
> Greetings,
>
> I've attempted to change the font size directly in Rconsole as well as
> through the GUI preferences. Neither seems to take even when I save the
> preference changes. When I make the change through the gui preference,
> and click "app
Dear all,
I have 2 matrices, one is a 8x3 matrix, called X; the other matrix is a 3x3
indicator matrix with the diagonal element as 0 or 1. when a variable is
included in the model, the corresponding diagonal element is 1, otherwise, it
is 0. Let A be a set of matrices that contain the possibl
Seth Falcon <[EMAIL PROTECTED]> writes:
> Uwe Ligges <[EMAIL PROTECTED]> writes:
> > Use an editor that comments out a whole block which is what I do all the
> > time, e.g. use Tinn-R, Emacs or WinEdt, to mention just a few of
> > them.
>
> This, of course, works. The if(FALSE) approach does no
Without 'msc39', I can't say for sure, but I doubt if it's
anything to worry about. It looks like 'nlm' tests values for theta and
len that produce either NA or Inf in computing 'loglikcs'. Since you
got an answer, it does not look to me like it's anything worth worrying
about; just ma
Sorry, folks. Thanks for the help, but none of the suggestions
worked quite as I wanted :-/
So I wrote the code. It seems to work:
gera_particao <- function(x, n) {
y <- sort(x)
icut <- as.integer(seq(1, length(x)+1, length = n + 1))
icut <- icut[c(-(n+1))]
ycut <- y[icut]
for (i in 1:
dear sir
iam algerian student iam 30 years old i finished my postgraduate in applied
economic and statistics .i prepare my doctorat about effect of kyoto protocol
on our economic.
i need the document and the articals and the adress of doctor in this domain
in
your university
i shal
David Barron wrote:
> You might also want to look at the function quantcut in the gtools
> package (part of the gregmisc bundle).
Also, cut2 in Hmisc will do this and will label the intervals compactly.
Frank
>
>
>
> On 05/10/06, Alberto Monteiro <[EMAIL PROTECTED]> wrote:
>> Is there any fun
Uwe Ligges <[EMAIL PROTECTED]> writes:
> Use an editor that comments out a whole block which is what I do all the
> time, e.g. use Tinn-R, Emacs or WinEdt, to mention just a few of
> them.
This, of course, works. The if(FALSE) approach does not because it
requires the "comment" to be syntactical
Greetings,
I've attempted to change the font size directly in Rconsole as well as
through the GUI preferences. Neither seems to take even when I save the
preference changes. When I make the change through the gui preference,
and click "apply" the change is made, but when I save it, close, and
It's not really possible to help without knowing what errors you received and
maybe some reproducible code. I think I remember this, though. From what I
recall, there was no distinction between box and chick, so you cannot estimate
both variance components.
> -Original Message-
> From:
On 2006-10-5 9:20, Barry Rowlingson wrote:
> Philippe Grosjean wrote:
>
>>
>> It takes advantage of `!` being not defined for character arguments:
>>
>
> *gasp*
>
> how much R code is destined to feature on www.thedailywtf.com in the
> future?
>
> whats the chances of block commenting
Peter and list,
Thanks for the response. A did add box as a factor (box <-
factor(box)). Julian should be linear - bluebird chicks are bluer as
the season progresses from March to August.
I did try the following
rtot.lme <- lmer(rtot ~ sex +(purban|box:chick) + (purban|box), data=bb,
na.acti
Philippe Grosjean wrote:
>
> It takes advantage of `!` being not defined for character arguments:
>
*gasp*
how much R code is destined to feature on www.thedailywtf.com in the
future?
whats the chances of block commenting being included in a future
version? and more generally, is ther
You might also want to look at the function quantcut in the gtools
package (part of the gregmisc bundle).
On 05/10/06, Alberto Monteiro <[EMAIL PROTECTED]> wrote:
> Is there any function that divides a sample into N quantiles?
>
> For example, for N = 2, this would be the solution:
>
> x <- rnor
cut.quantile <- function(x, N, use.ppoints=TRUE) {
qq <- if (use.ppoints) c(0,ppoints(N-1),1)
else seq(0, 1, 1/N)
breaks <- quantile(x, qq)
breaks[1] <- breaks[1] - 1
breaks[N+1] <- breaks[N+1]+1
cut(x, breaks)
}
tmpT <- cut.quantile(rnorm(100), 10, TRUE)
table(tmpT)
tmpF <- cut.quant
"Alberto Monteiro" <[EMAIL PROTECTED]> writes:
> Is there any function that divides a sample into N quantiles?
>
> For example, for N = 2, this would be the solution:
>
> x <- rnorm(100)
> m <- median(x)
> q <- ifelse(x <= median, 1, 2)
Have a look at
> N <- 2
> table(cut(x,quantile(x,seq(0,1,
Is there any function that divides a sample into N quantiles?
For example, for N = 2, this would be the solution:
x <- rnorm(100)
m <- median(x)
q <- ifelse(x <= median, 1, 2)
Alberto Monteiro
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz
Ooops! Sorry, I send it only to Uwe Ligges the first time.
Best,
Philippe Grosjean
This is perhaps another solution, more elegant in the way the block
comment is written... but it requires to redefine `!` and slows it a
little bit because it tests first its arguments before calling
.Primitive(!):
"Jeffrey Stratford" <[EMAIL PROTECTED]> writes:
> I just had a manuscript returned with the biggest problem being the
> analysis. Instead of using principal components in a regression I've
> been asked to analyze a few variables separately. So that's what I'm
> doing.
> I pulled a feather from
I just had a manuscript returned with the biggest problem being the
analysis. Instead of using principal components in a regression I've
been asked to analyze a few variables separately. So that's what I'm
doing.
I pulled a feather from young birds and we quantified certain aspects of
the color o
Goodmorning everyone!
Just a quick question:
I want to apply eof analysis and downscaling using the
clim.pact package.
What form should my data have? Only netCDF?
Right now my data are of the form of ascii files for
each month with 3 columns corresponding to latitude,
longitude and value of my obs
On Thu, 2006-10-05 at 11:39 +0200, KOITA Lassana - STAC/ACE wrote:
>
>
>
> Hi! R users
> I would like to ask you where could we find the VGAM Package. I don't find
> it in the list of packages.
>
> Thak you for your help
>
>
> Lassana KOITA
That's because it isn't on CRAN yet. You can find
> how can I use variables in the RODBC environment.
>
> Example which does not work:
>
> Thanks for your help.
>
> Thorsten
>
> pn <- '39R5238';
>
> library(RODBC);
> odbcobj <- odbcConnect("SQUIT21C",uid="muehge",pwd="xxx");
> sql <- "select
> u.unitid,
> from test
> where part in ('pn')
> "
Thanks a lot! longfun2 & longfun3 work perfect for my "very
untypical" problem. As I have many local variables, usual functions
with parameters are very uncomfortable, but the code you gave me is
great!
Meinhard
On Oct 4, 2006, at 5:25 PM, Gabor Grothendieck wrote:
> longfun could just pas
google VGAM
On Thu, 5 Oct 2006, KOITA Lassana - STAC/ACE wrote:
Hi! R users
I would like to ask you where could we find the VGAM Package. I don't find
it in the list of packages.
Thak you for your help
Lassana KOITA
Etudes de Sécurité et d'Exploitation aéroportuaires / Safety Study &
Hi! R users
I would like to ask you where could we find the VGAM Package. I don't find
it in the list of packages.
Thak you for your help
Lassana KOITA
Etudes de Sécurité et d'Exploitation aéroportuaires / Safety Study &
Statistical analysis
Service Technique de l'Aviation Civile (STAC) / C
hi, use paste:
# a string/number/date
pn <- '39R5238';
sql <- paste("select u.unitid from test where part =", pn)
^^
# an array of strings/numbers/dates
pn=c(1,2,3,4)
sql <- paste("select u.unitid from test where part in (",
I tought that aggregate was the way to go, but only for large dataframes it is
faster.
> df <- read.table(stdin(),header=TRUE)
0: Location TimeXY
1: 1 0 1.6 9.3
2: 1 3 4.2 10.4
3: 1 6 2.7 16.3
4: 2 0 0.5 2.1
5: 2
Robin Hankin wrote:
>
> On 5 Oct 2006, at 10:05, Uwe Ligges wrote:
>
>>
>>
>> Wee-Jin Goh wrote:
>>> Hello list,
>>>
>>> Is there any way to perform a block comment in R? In C++, anything in
>>> between a /* and */ is considered a comment, and it allows
>>> programmers to comment out chunks of
1 - 100 of 112 matches
Mail list logo