R: [R] weighted.mean and tapply (again)

2005-05-26 Thread Guazzetti Stefano
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

Re: [R] Any ideas on how to add a dotted line to a box plot to indicate a specific value?

2005-05-26 Thread vincent
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

[R] [R-pkgs] R Packages and code published in JSS in 2005

2005-05-26 Thread Jan de Leeuw
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

[R] [R-pkgs] pls version 1.0-3

2005-05-26 Thread Bjørn-Helge Mevik
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

[R] [Job ad] Insightful looking for statistical consultants to meet increasing consulting demand

2005-05-26 Thread Lou Bajuk
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

[R] read.spss in R 2.1.0 make basic dataframe

2005-05-26 Thread Bliese, Paul D LTC USAMH
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 ...

[R] reading .irb files into R

2005-05-26 Thread Sebastian Leuzinger
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 __

RE: [R] Useful tip: Use Google to find R scripts

2005-05-26 Thread Tuszynski, Jaroslaw W.
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 \__,|

Re: [R] Useful tip: Use Google to find R scripts

2005-05-26 Thread Gabor Grothendieck
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

[R] Single factor from interaction.

2005-05-26 Thread Rolf Turner
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

Re: [R] Single factor from interaction.

2005-05-26 Thread Chuck Cleland
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

Re: [R] colors and palettes and things...

2005-05-26 Thread John Maindonald
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

[R] Reading text files and readLine

2005-05-26 Thread Tuszynski, Jaroslaw W.
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

Re: [R] website reference for building R packages

2005-05-26 Thread Uwe Ligges
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

Re: [R] Reading text files and readLine

2005-05-26 Thread Romain Francois
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

Re: [R] Reading text files and readLine

2005-05-26 Thread Gabor Grothendieck
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

Re: [R] read.spss in R 2.1.0 make basic dataframe

2005-05-26 Thread Thomas Lumley
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

[R] Kouros Owzar is ooo.

2005-05-26 Thread Kouros Owzar
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!

[R] Survey and Stratification

2005-05-26 Thread Mark Hempelmann
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

[R] two-part models

2005-05-26 Thread Richard Chandler
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

[R] a more elegant approach to getting the majority level

2005-05-26 Thread 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 - factor(sample(1:0, 5,replace=TRUE)) levels(x)[ which( as.logical((table(x) == max(table(x == TRUE ) ]

Re: [R] Help needed - Use of RSrvr in macro mode

2005-05-26 Thread Uwe Ligges
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

Re: [R] PAN: Need Help for Multiple Imputation Package

2005-05-26 Thread Uwe Ligges
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

RE: [R] a more elegant approach to getting the majority level

2005-05-26 Thread Liaw, Andy
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 -

Re: [R] a more elegant approach to getting the majority level

2005-05-26 Thread Uwe Ligges
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) ==

Re: [R] [Fwd: Re: [Fwd: failure delivery]]

2005-05-26 Thread Uwe Ligges
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

Re: [R] a more elegant approach to getting the majority level

2005-05-26 Thread Dimitris Rizopoulos
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,

RE: [R] a more elegant approach to getting the majority level

2005-05-26 Thread Eric Lecoutre
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

[R] Simplify formula for heterogeneity

2005-05-26 Thread Stefaan Lhermitte
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 =

[R] export the graphical result of bwplot()

2005-05-26 Thread BIBIS, Garnier, Christophe
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

RE: [R] a more elegant approach to getting the majority level

2005-05-26 Thread Wiener, Matthew
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] Plotting Ranges as Vertical Lines

2005-05-26 Thread Bret Collier
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

Re: [R] Any ideas on how to add a dotted line to a box plot to indicate a specific value?- Thank you all for your help

2005-05-26 Thread BJ
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!

[R] warnings from hist(): parameter XXX couldn't be set in high-level plot functionN

2005-05-26 Thread George_Heine
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

[R] polar smoothing code

2005-05-26 Thread rlee
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

Re: [R] Plotting Ranges as Vertical Lines

2005-05-26 Thread Uwe Ligges
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

Re: [R] rotate pie chart

2005-05-26 Thread Martin Maechler
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,

Re: [R] To find how R defined the function of coxph?

2005-05-26 Thread Sundar Dorai-Raj
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:

Re: [R] Survey and Stratification

2005-05-26 Thread Thomas Lumley
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

Re: [R] longitudinal survey data

2005-05-26 Thread Thomas Lumley
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

[R] Consulting Positions Open at XLSolutions Corp

2005-05-26 Thread elvis
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

[R] specifying values in correlation matrix in nlme

2005-05-26 Thread Keyan Zhao
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

[R] define matrix by outer?

2005-05-26 Thread Zhen Pang
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

Re: [R] define matrix by outer?

2005-05-26 Thread Gabor Grothendieck
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.

Re: [R] Chi Square Test on two groups of variables

2005-05-26 Thread Guohui Ding
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

[R] Power set

2005-05-26 Thread Laura Holt
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,

[R] logistic regression

2005-05-26 Thread Stephen Choularton
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 ~.,

Re: [R] logistic regression

2005-05-26 Thread Simon Blomberg
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.