[R] \include-mechanism in Sweave?
Dear HelpeRs, I'm very fond of Sweave and I use it as often as possible. It'a a pity I can't use it for larger projects or can I? For instance suppose I have three files file1.rnw, file2.rnw and file3.rnw with Sweave code. Working on file2.rnw I whould like to exclude file1.rnw and file3.rnw temporarily and joining all of them later. This amounts to a mechanism similar to using LaTeX's \include command. *Is* there a way to achieve that? Thank you in advance. D. Trenkler -- Dietrich Trenkler c/o Universitaet Osnabrueck Rolandstr. 8; D-49069 Osnabrueck, Germany email: [EMAIL PROTECTED] __ 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 and provide commented, minimal, self-contained, reproducible code.
[R] How to compute Wilk's Lambda
Dear helpeRs, the following data set comes from Johnson/Wichern: Applied Multivariate Statistical Analysis, 6th ed, pp. 304-306. /X - structure(c(9, 6, 9, 3, 2, 7), .Dim = as.integer(c(3, 2))) Y - structure(c(0, 2, 4, 0), .Dim = as.integer(c(2, 2))) Z - structure(c(3, 1, 2, 8, 9, 7), .Dim = as.integer(c(3, 2)))/ I would like to compute Wilk's Lambda in R, which I know is 0.0385. How can I do that? I tried /U - rbind(X,Y,Z) m - manova(U~rep(1:3, c(3, 2, 3))) summary(m,test=Wilks)/ which gives / Df Wilks approx F num Df den Df Pr(F) rep(1:3, c(3, 2, 3)) 1 0.162 12.930 2 5 0.01057 * Residuals 6 --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1/ I suppose the argument rep(1:3, c(3, 2, 3)) in manova() is not appropriate. Any help is very much appreciated. Dietrich -- Dietrich Trenkler c/o Universitaet Osnabrueck Rolandstr. 8; D-49069 Osnabrueck, Germany email: [EMAIL PROTECTED] __ 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 and provide commented, minimal, self-contained, reproducible code.
[R] Files in EViews format
Dear HelpeRs, I wonder if anyone knows of ways to read EViews file types. I did not find a function in the package 'foreign' and a search query submitted to http://search.r-project.org was not successful. Any hint is very much welcome. Dietrich Trenkler -- Dietrich Trenkler c/o Universitaet Osnabrueck Rolandstr. 8; D-49069 Osnabrueck, Germany email: [EMAIL PROTECTED] __ 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 and provide commented, minimal, self-contained, reproducible code.
[R] Measurements of 3000 criminals
Hallo everyone, excuse me if this is not a genuine R question but I do not know where to ask else. Referring to e.g. https://stat.ethz.ch/pipermail/r-help/2004-December/062114.html I wonder if these measurements of 3000 criminals (raw data) are available anywhere. At least I didn't find them in the R datasets package or by means of Google. What I did find was a table of frequencies of the central values for *grouped* classifications (finger lenghts) in the Handbook of Small Data Sets. Thank you in advance. D. Trenkler -- Dietrich Trenkler c/o Universitaet Osnabrueck Rolandstr. 8; D-49069 Osnabrueck, Germany email: [EMAIL PROTECTED] __ 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 and provide commented, minimal, self-contained, reproducible code.
Re: [R] putting stuff into bins...
Federico Calboli schrieb: Hi All, I have a vector of data, a vector of bin breakpoints and I want to put my data in the bins and then extract fanciful informations like the mean value of each bin. I know I can write my own function, but I would have thought that R should have somewhere a function that took as arguments something like (data, breaks, what to do with the data in the bins). I surey could not find it trawling the R-help archives though. If such a function exists I'd be grateful to anyone pointing it out to me. Cheers, Fede The following should be of help: bd384 - c(2.968, 2.097, 1.611, 3.038, 7.921, 5.476, 9.858, 1.397, 0.155, 1.301, 9.054, 1.958, 4.058, 3.918, 2.019, 3.689, 3.081, 4.229, 4.669, 2.274, 1.971, 10.379, 3.391, 2.093, 6.053, 4.196, 2.788, 4.511, 7.3, 5.856, 0.86, 2.093, 0.703, 1.182, 4.114, 2.075, 2.834, 3.698, 6.48, 2.36, 5.249, 5.1, 4.131, 0.02, 1.071, 4.455, 3.676, 2.666, 5.457, 1.046, 1.908, 3.064, 5.392, 8.393, 0.916, 9.665, 5.564, 3.599, 2.723, 2.87, 1.582, 5.453, 4.091, 3.716, 6.156, 2.039) cut(bd384,0:11) split(bd384,cut(bd384,0:11)) sapply(split(bd384,cut(bd384,0:11)),mean) D.Trenkler -- Dietrich Trenkler c/o Universitaet Osnabrueck Rolandstr. 8; D-49069 Osnabrueck, Germany email: [EMAIL PROTECTED] __ 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 and provide commented, minimal, self-contained, reproducible code.
Re: [R] Statitics Textbook - any recommendation?
Hi all, I am very fond of Using R for Introductory Statistics by John Verzani, 2005, Chapman Hall. Regards D. Trenkler -- Dietrich Trenkler c/o Universitaet Osnabrueck Rolandstr. 8; D-49069 Osnabrueck, Germany email: [EMAIL PROTECTED] __ 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 and provide commented, minimal, self-contained, reproducible code.
[R] S in cor.test(..., method=spearman)
Dear HelpeRs, I have some data: ice - structure(c(0.386, 0.374, 0.393, 0.425, 0.406, 0.344, 0.327, 0.288, 0.269, 0.256, 0.286, 0.298, 0.329, 0.318, 0.381, 0.381, 0.47, 0.443, 0.386, 0.342, 0.319, 0.307, 0.284, 0.326, 0.309, 0.359, 0.376, 0.416, 0.437, 0.548, 41, 56, 63, 68, 69, 65, 61, 47, 32, 24, 28, 26, 32, 40, 55, 63, 72, 72, 67, 60, 44, 40, 32, 27, 28, 33, 41, 52, 64, 71), .Dim = as.integer(c(30, 2))) Using cor.test(ice[,1],ice[,2],method=spearman) I get (apart from a warning message due to ties) Spearman's rank correlation rho data: ice[, 1] and ice[, 2] S = 769.4403, p-value = 1.543e-08 alternative hypothesis: true rho is not equal to 0 sample estimates: rho 0.828823 I wonder what S is. I presume it is sum((rank(ice[,1])-rank(ice[,2]))^2), but this delivers 768.5. Is it the way ranks are computed in cor.test? Thank you in advance. D. Trenkler -- Dietrich Trenkler c/o Universitaet Osnabrueck Rolandstr. 8; D-49069 Osnabrueck, Germany email: [EMAIL PROTECTED] __ 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 and provide commented, minimal, self-contained, reproducible code.
[R] dotchart: Gap between text and chart
I have some data which I would like to display with dotchart. The labels are very long, so the chart becomes too small. Setting cex=0.7 seems to be a good compromise, but the gap between the text and the chart still is too large. I did not find a gap parameter in the description of dotchart... Thanks for any help. D. Trenkler a - structure(c(103.35, 36.73, 55.09, 302.66, 68.54, 35.46, 138.65, 25.21, 110.85, 6.66, 46.57, 70.23), .Names = c(Nahrungsmittel und alkoholfreie Getraenke, Alkoholische Getraenke, Tabakwaren, Bekleidung und Schuhe, Wohnungsmieten, Energie, Einrichtungsgegenstaende, Gesundheitspflege, Verkehr, Nachrichtenuebermittlung, Freizeit, Unterhaltung und Kultur, Bildungswesen, Beherbergungs und Gaststaettendienstleistungen, Andere Waren und Dienstleistungen)) dotchart(sort(a)) dotchart(sort(a),cex=0.7) -- Dietrich Trenkler c/o Universitaet Osnabrueck Rolandstr. 8; D-49069 Osnabrueck, Germany email: [EMAIL PROTECTED] __ 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
Re: [R] LaTeX in R graph
[EMAIL PROTECTED] schrieb: Hello, I would like to know if it is possible to insert LaTeX typesetting in R output. I want to obtain a graph with LaTeX label in order to incorporate it as postscript or pdf, x-seq(0,1,length=100) y-x*x plot(x,y,xlab=$X$,ylab=$X^2$) __ 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 Hi, have a look at the psfrag package. D. Trenkler -- Dietrich Trenkler c/o Universitaet Osnabrueck Rolandstr. 8; D-49069 Osnabrueck, Germany email: [EMAIL PROTECTED] __ 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] DUPLEX
Hi all, not to invent the wheel a second time I wonder if someone out there has programmend Snee's CADEX algorithm (Validation of regression models: Methods and examples, Technometrics 19, 415-428). Thank you in advance. D. Trenkler -- Dietrich Trenkler c/o Universitaet Osnabrueck Rolandstr. 8; D-49069 Osnabrueck, Germany email: [EMAIL PROTECTED] __ 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
Re: [R] The gamma function and infinity
Florent Bresson schrieb: I have to calculate some formula like: gamma(x)/(gamma(x+y) and I observed that for relatively big values of x, R returns infinity and so cannot compute the formula. Is it possible to force R to give the real value of gamma(x) instead of Inf ? thanks __ 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 Have a look at lgamma. hth D. Trenkler -- Dietrich Trenkler c/o Universitaet Osnabrueck Rolandstr. 8; D-49069 Osnabrueck, Germany email: [EMAIL PROTECTED] __ 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