what about using mapply?
splitted.value-with(x.1, split(VALUE, GROUP))
splitted.freq-with(x.1, split(FREQUENCY, GROUP))
mapply(weighted.mean, splitted.value, w=splitted.freq)
Stefano
-Messaggio originale-
Da: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] conto di
[EMAIL
lines(...) could perhaps be useful ?
hih
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Get articles from http://www.jstatsoft.org
Firth
Bradley-Terry Models in R
Volume 12, Issue 01
Sturtz, Ligges, and Gelman
R2WinBUGS: A Package for Running WinBUGS from R
Volume 12, Issue 03
Mineo and Ruggieri
A Software Tool for the Exponential Power Distribution: The normalp
Package
Version 1.0-3 of the pls package is now available on CRAN.
The pls package implements partial least squares regression (PLSR) and
principal component regression (PCR). Features of the package include
- Several plsr algorithms: orthogonal scores, kernel pls and simpls
- Flexible cross-validation
Insightful, the maker of S-PLUS, is looking for people with strong
statistical backgrounds and good experience in using S-PLUS or R for data
analysis, statistical modelling and statistical programming for permanent
and/or contract positions to meet increasing demands for S-PLUS consulting.
For a
Recent changes to read.spss() in the foreign package return a dataframe
containing additional attributes. For example,
TEMP-read.spss(choose.files(), to.data.frame=T,use.value.labels=F)
str(TEMP)
`data.frame': 780 obs. of 8 variables:
$ EXPOS01: atomic 1 1 2 1 2 3 2 4 2 1 ...
Hi,
I am wondering if anybody has experience with importing .irb files
(Temperature matrices from infratec Thermal cameras) into R.
A hint as to what package could be used would be appreciated.
OS Linux 9.3
R: 2.1.0
Sebastian
__
Great tip. Thanks.
One problem: a lot of hits are in REBOL language (whatever it is) that also
uses R extension.
Jarek
\===
Jarek Tuszynski, PhD. o / \
Science Applications International Corporation \__,|
Try:
filetype:R boxplot -rebol
On 5/26/05, Tuszynski, Jaroslaw W. [EMAIL PROTECTED] wrote:
Great tip. Thanks.
One problem: a lot of hits are in REBOL language (whatever it is) that also
uses R extension.
Jarek
\===
Jarek
I have a vague recollection of seeing reference, fairly recently, to
a function that forms a single factor which ``codes'' the interaction
between two (or more?) factors. Do I recollect correctly? It would
be easy enough to roll one's own, but if there is an existing
function it probably does a
Are you looking for interaction() ?
a - gl(2, 4, 8)
b - gl(2, 2, 8, label = c(ctrl, treat))
s - gl(2, 1, 8, label = c(M, F))
interaction(a, b)
[1] 1.ctrl 1.ctrl 1.treat 1.treat 2.ctrl 2.ctrl 2.treat 2.treat
Levels: 1.ctrl 2.ctrl 1.treat 2.treat
interaction(a, b, s, sep = :)
[1] 1:ctrl:M
The DAAG package has the following:
show.colors(type=c(singles, shades, grayshades),
order.cols=TRUE)
I am sure there are better ways to do the ordering than my ad hoc
approach,
though.
John Maindonald email: [EMAIL PROTECTED]
phone : +61 2 (6125)3473fax : +61
Hi,
I am trying to write a function to read in a whole text file as a single
string ( so I can calculate its sha1 hash function using package
digest). I need a single string containing the whole file, and so far I
was using paste(readLines(fileName), collapse = ). Unfortunately this
function
roger bos wrote:
I used this tutorial and completed steps 1-6 without errors, but on
step 7 I tried to run R CMD check on my package called 'ram' directory
one level above the 'ram' folder and I got the following error?
I:\R_HOMER CMD check ram
* checking for working latex ...Error: environment
Hello,
You can append an end-of-line character in your file doing :
sink(test2.xml,append=TRUE)
cat(\n)
sink()
Romain
Le 26.05.2005 15:17, Tuszynski, Jaroslaw W. a écrit :
Hi,
I am trying to write a function to read in a whole text file as a single
string ( so I can calculate its sha1
If its just a matter of suppressing the warning see:
?suppressWarnings
On 5/26/05, Tuszynski, Jaroslaw W. [EMAIL PROTECTED] wrote:
Hi,
I am trying to write a function to read in a whole text file as a single
string ( so I can calculate its sha1 hash function using package
digest). I need a
On Thu, 26 May 2005, Bliese, Paul D LTC USAMH wrote:
On a related note, do other users routinely use read.spss with the
defaults of to.data.frame=F or use.value.labels=T? My experience
is that I am always using the non-default values in which case it would
be helpful to change the defaults to
I will be out of the office starting 05/25/2005 and will not return until
06/01/2005.
I will be ooo 05/26-06/01
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
Dear WizaRds,
Working through sampling theory, I tried to comprehend the concept of
stratification and apply it with Survey to a small example. My question
is more of theoretic nature, so I apologize if this does not fully fit
this board's intention, but I have come to a complete stop in my
Hello,
Is there a library that can be used to implement two-part models for
data with 'extra' zeros? I am already aware of some of the
zero-inflated poisson functions out there and of the negative binomial
glm option. Thanks.
Richard
--
Richard Chandler
Department of Natural Resources
Hi, I have a factor and I would like to find the most frequent level.
I think my current approach is a bit long winded and I was wondering if
there was a more elegant way to do it:
x - factor(sample(1:0, 5,replace=TRUE))
levels(x)[ which( as.logical((table(x) == max(table(x == TRUE ) ]
This is a VERY special question. Please redirect your question to the
appropriate mailing list. See
http://mailman.csd.univie.ac.at/mailman/listinfo/rcom-l
for more information.
Uwe Ligges
Constant Depièreux wrote:
Dear All,
I am experiencing a problem for which I need some help.
I have
Please read the posting guide.
It tells you to provide (a) small reproducible examples and (b)
'If the question relates to a package that is downloaded from CRAN try
contacting the package maintainers first. You can also use
find(functionname) and packageDescription(packagename) to find this
Don't know if this is more elegant:
names(which.max(table(x)))
Andy
From: Rajarshi Guha
Hi, I have a factor and I would like to find the most frequent level.
I think my current approach is a bit long winded and I was
wondering if
there was a more elegant way to do it:
x -
Rajarshi Guha wrote:
Hi, I have a factor and I would like to find the most frequent level.
I think my current approach is a bit long winded and I was wondering if
there was a more elegant way to do it:
x - factor(sample(1:0, 5,replace=TRUE))
levels(x)[ which( as.logical((table(x) ==
Can you please specify a small reproducible example?
Uwe Ligges
Prof J C Nash wrote:
I appear to have hit one of the drop issues raised in some discussions
a couple of years ago by Frank Harrell. They don't seem to have been
fixed, and I'm under some pressure to get a quick solution for a
you could try this:
x - factor(sample(letters[1:3], 20, TRUE))
###
tab - table(x)
names(tab)[tab == max(tab)]
I hope it helps.
Best,
Dimitris
Dimitris Rizopoulos
Ph.D. Student
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35,
You could also use:
names(rev(sort(table(x[1]
There is nonetheless a difference if there are several levels which
provides this maximum.
This method will only return one, yours would return all those levels
(which may not be desirable for some others processing).
HTH,
Eric
Eric Lecoutre
Dear R-ians,
I'm looking for a computational simplified formula to calculate a
measure for heterogeneity (let's say H ):
H = sqrt [ (Si (Sj (Xi - Xj)² ) ) /n ]
where:
sqrt = square root
Si = summation over i (= 0 to n)
Sj = summation over j (= 0 to n)
Xi = element of X with index i
Xj =
Dear all,
Maybe somebody can help me to understand my problem:
Inside a R script, I try to export the graphic results of 'bwplot' in some
jpeg files.
The data source ('main') is a mix of numeric and factor values
the analysis_bwplot() contains the loops (i and j) and calls the
The which.max solution is fine as long as the maximum is always unique.
Otherwise, which.max will give you the first maximum.
So using the x == max(x) version will have an advantage if there can be
ties.
Regards,
Matt Wiener
-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL
R Users,
I have not been able to find anything close to what I want searching
R-help and I am hoping someone could point me in the right direction.
The data consists of differences in length of individual salamanders
collected at time of initial capture and last recapture (excerpt below).
What I
Lots of good ideas, and great advice! Thank you as always ~Erithid
vincent wrote:
lines(...) could perhaps be useful ?
hih
__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide!
Hello -
This is not a real problem, just an annoyance. Sometimes, but not always,
I get a set of strange warnings from hist(). Example follows.
#Produce a histogram of start dates for a set of field measurements.
# I didn't reproduce all the dates, because not
I have some polar smoothing code that allows x-y smoothing of middle,
outer, and inner regions. I'm thinking of posting it as a CRAN
package. Does this functionality already exist in R or a CRAN package?
__
R-help@stat.math.ethz.ch mailing list
Some example code using segments():
x - 1:10
low - rnorm(10)
high - rnorm(10)
plot(x, low, ylim = range(c(low, high)), type=n)
segments(x, low, x, high)
Uwe Ligges
Bret Collier wrote:
R Users,
I have not been able to find anything close to what I want searching
R-help and I am hoping
Kati == Katrin Schweitzer [EMAIL PROTECTED]
on Wed, 25 May 2005 08:25:07 +0200 writes:
I think you have to get your hands dirty on this one, but it's not too
hard. Here's a function pie90() which is a tiny modification of pie().
Does that do the trick?
Kati Yes,
Li, Jia wrote:
Dear all,
I am wondering if there is a way to find how R defined(or wrote) the function of
coxph? I don not mean the one that we get by checking help(coxph), but the one
like coxph-function(){...}
Thanks,
Jia
At the commandline, type the following:
On Thu, 26 May 2005, Mark Hempelmann wrote:
Dear WizaRds,
Working through sampling theory, I tried to comprehend the concept of
stratification and apply it with Survey to a small example. My question is
more of theoretic nature, so I apologize if this does not fully fit this
board's
On Thu, 26 May 2005 [EMAIL PROTECTED] wrote:
Dear R-Users!
Is there a possibility in R to do analyze longitudinal survey data (repeated
measures in a survey)? I know that for longitudinal data I can use lme() to
incorporate the correlation structure within individual and I know that there is
XLSolutions Corp. is currently looking for junior/senior -
contract/permanent -
consultants with math or stats background and capable of programming in
R or S-plus
and C or Java. Skills in data analysis are important for our clients
partnering with us in search of the most talented and
Could anyone help with a linear mixed model fitting problem ?
The model is :
Y= Xp + Zu + e
where X, Z are known design matrix, p is fixed effect factor, u is
random effect, u~ (0, G) , e~(0,R)
The main problem is , I want to fix the covariance matrix G to be a
constant times a known
Dear all,
I'd like to define a k by k matrix where the element is defined by
mn-function(m,n) sum(choose(m,(m-0:m))*choose((k-m),(n-m+0:m)))
the mn function works fine for scalar m and n, however, it fails to define
the matrix by outer.
a-outer(1:k,1:k,mn)
gives error message:
Error in
On 5/26/05, Zhen Pang [EMAIL PROTECTED] wrote:
Dear all,
I'd like to define a k by k matrix where the element is defined by
mn-function(m,n) sum(choose(m,(m-0:m))*choose((k-m),(n-m+0:m)))
the mn function works fine for scalar m and n, however, it fails to define
the matrix by outer.
If 'oxygen' is a matrix with one row or column, 'oxygen' is treated as
a one-dimensional contingency table. In this case, the hypothesis
tested is whether the population probabilities equal those in 'p', or
are all equal if 'p' is not given.
you can convert the 'oxygen' and 'train' variables to
Hi again!
I have a data.frame with the columns y, x1, x2, x3.
I would like to fit linear models with one variable at a time,
then 2 variables at a time, and then 3.
Makes me think of a power set.
Anyhow, is there a function to produce the right hand side of the formulas,
please?
thanks,
Hi
I am working on corpora of automatically recognized utterances, looking
for features that predict error in the hypothesis the recognizer is
proposing.
I am using the glm functions to do logistic regression. I do this type
of thing:
* logistic.model = glm(formula = similarity ~.,
predict.glm by default produces predictions on the scale of the
linear predictors. If in a logistic regression, you want the
predictions to be on the response scale [0,1], use
x - predict(logistic.model, medians, type=response)
for example. See ?predict.glm for details.
Cheers,
Simon.
48 matches
Mail list logo