Re: [R] Bug in levels() function?

2008-01-29 Thread Groot, Philip de
Hello all, Thank you for all the responses. It is clear to me now. However, if the drop possibility was also mentioned in the help text (in R, so ?levels) I wouldn't have asked this question at all! Regards, Philip From: Thomas Lumley [mailto:[EMAIL

Re: [R] matrix creation -- answer: data.matrix()

2008-01-29 Thread Martin Maechler
GS == Gavin Simpson [EMAIL PROTECTED] on Tue, 29 Jan 2008 00:09:05 + writes: GS hits=-2.6 tests=BAYES_00 GS X-USF-Spam-Flag: NO GS On Mon, 2008-01-28 at 12:17 -0700, Michelle DePrenger-Levin wrote: I was asked for the following information and hope it might help those

Re: [R] Expert systems

2008-01-29 Thread Peter Dalgaard
Hans W. Borchers wrote: Ralf Finne Ralf.Finne at syh.fi writes: Hi R-users Is there any functions in R that can implement expert systems? The aim of an expert system is to produce a probable diagnosis for a patient with certain symptoms. In the classical expert system a mumber of experts

[R] Expert systems

2008-01-29 Thread Ralf Finne
Hi R-users Is there any functions in R that can implement expert systems? The aim of an expert system is to produce a probable diagnosis for a patient with certain symptoms. In the classical expert system a mumber of experts are asked to make statements on the probabilities for different diseases

Re: [R] package.skeleton from within function: objects not found

2008-01-29 Thread Tineke Casneuf
Hi all, sorry to bother you all once more, but I still haven't solved this problem. Is there anyone who knows how to pass an environment as an argument to package.skeleton from within function, so that this environment can be saved into a newly build source package? See example script below.

Re: [R] Expert systems

2008-01-29 Thread Hans W. Borchers
Ralf Finne Ralf.Finne at syh.fi writes: Hi R-users Is there any functions in R that can implement expert systems? The aim of an expert system is to produce a probable diagnosis for a patient with certain symptoms. In the classical expert system a mumber of experts are asked to make

Re: [R] remove similar values

2008-01-29 Thread Romain Francois
Hi, Not sure I understand the question, but maybe you need ?unique or ?duplicated Cheers, Romain mohamed nur anisah wrote: hello!! say that i have the values of x1 and x2. my x1 has longer length than x2. how am i going to remove the similar values of x1 and x2. Any suggestion??

Re: [R] remove similar values

2008-01-29 Thread Peter Dalgaard
Romain Francois wrote: Hi, Not sure I understand the question, but maybe you need ?unique or ?duplicated Or maybe ?union, ?setdiff, ?intersection. Or ?merge. Cheers, Romain mohamed nur anisah wrote: hello!! say that i have the values of x1 and x2. my x1 has longer

Re: [R] maptools no such file

2008-01-29 Thread Rainer Hurling
-- X-USF-Spam-Status: hits=-2.5 tests=BAYES_00,FORGED_RCVD_HELO X-USF-Spam-Flag: NO Am 29.01.2008 00:04 (UTC+1) schrieb Roger Bivand: On Mon, 28 Jan 2008, Rainer Hurling wrote: Roger, I tried your suggestions and ran into same problems as Pieter did before. Rainer: I don't think that

[R] Correlation matrix for data in long format

2008-01-29 Thread Serguei Kaniovski
Hello, I cannot figure out how to use tapply to compute the correlation matrix in the variable x between the states? The data is in long format, e.g.: state,year,x Alabama,2001,0.45 Alabama,2002,0.47 Alabama,2003,0.48 Alabama,2004,0.44 Arizona,2001,0.34 Arizona,2002,0.32 Arizona,2003,0.38

[R] sqldf error

2008-01-29 Thread Werner Wernersen
Hi, sqldf sounds like a very useful package but I don't even get the example to run: a1s - sqldf(select * from warpbreaks limit 6) Error in combine(FUN(...)) : argument value is missing, with no default I am using R 2.6.1 on Windows Vista Business and have updated all packages. Some

Re: [R] sqldf error

2008-01-29 Thread Gabor Grothendieck
I can't reproduce your error: library(sqldf) sqldf(select * from warpbreaks limit 6) breaks wool tension 1 26A L 2 30A L 3 54A L 4 25A L 5 70A L 6 52A L R.version.string # Vista [1] R version 2.6.2 alpha

Re: [R] pivot table in R

2008-01-29 Thread Attiglah, Mama
A = read.table(clipboard, header=TRUE) A sex age region no_of_accidents 1 F young north 10 2 F young south 12 3 F old north 5 4 F old south 7 5 M young north 24 6 M young south 30 7 M old

Re: [R] pivot table in R

2008-01-29 Thread Romain Francois
Hi Pietro, Depending on the actual structure you want in the output, you can use some of the functions in the apply family, particularly tapply, aggregate, or by. Something like : R tapply( d[[no_of_accidents ]], d[[ sex ]], sum ) F M 34 83 R aggregate( d[no_of_accidents ], d[ sex ], sum )

[R] how do i creat multiple back to back histograms?

2008-01-29 Thread Tom Willems
dear R-ussers, I would like to creeate a graph, i wich my data is presented as verticaly oriented histograms, wich give the frequency of the measured values, grouped per used measurement methode. So the X axis should hold the grouping variable and the Y axis a continuos variable. well not

Re: [R] Form Pairs of Variables for a paired t-test

2008-01-29 Thread nalluri pratap
Thanks a lot! Its working fine Pratap Henrique Dallazuanna [EMAIL PROTECTED] wrote: Try this: lapply(apply(combn(ncol(x),2), 2, function(y)x[,y]), function(z)t.test(z[,1], z[,2])) On 29/01/2008, nalluri pratap wrote: Hi Users, This is regarding the paired t-test. I have 5 variables

[R] Fortunes - was Re: [OT] vernacular names for circular diagrams

2008-01-29 Thread S Ellison
Gabor Grothendieck [EMAIL PROTECTED] 29/01/2008 12:35:27 As is common in human affairs, even the illusion of understanding is preferred to a lofty digression upon why the audience does not understand. Gabor, This should be in fortunes; it is depressingly accurate. But it doesn't have to be

[R] How to get two y-axises in a bar plot?

2008-01-29 Thread Gustaf Granath
Hi, I have measured two response variables (y1, y2) at each treatment level (x = 0, 1.5 or 3). Now I would like to show the y1 and y2 against x in a bar plot. However, y1 and y2 differ in scale so I need two y-axises, one on the left side and one on the right side (and I dont want to

Re: [R] pivot table in R

2008-01-29 Thread John Kane
Have a look at the reshape package. With your data as data.frame xx : library(reshape) dd - melt(xx, id=c(sex, age, region),measured=c(no_of_accidents)); dd cast(dd, sex~variable, sum) --- [EMAIL PROTECTED] wrote: Hello, I'm struggling with an elementary problem with R. I have a simple

[R] number of rescaling cycles in decorana

2008-01-29 Thread Marc Belisle
How do one dertermine the optimal number of rescaling cycles to use when performing DCA using the decorana function (library vegan)? Thanks for your time, Marc === Marc Bélisle Professeur adjoint Chaire de recherche du Canada en écologie spatiale et en écologie du paysage

Re: [R] pivot table in R

2008-01-29 Thread Christos Hatzis
Also, see ?aggregate: with(A, aggregate(no_of_accidents, by=list(SEX=sex), FUN='sum')) SEX x 1 F 34 2 M 83 -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Attiglah, Mama Sent: Tuesday, January 29, 2008 7:21 AM To: [EMAIL PROTECTED];

[R] on trellis.par.set/get (reproducing figures from Pinheiro Bates)

2008-01-29 Thread Dr. Ottorino-Luca Pantani
Dear R users, I would like to exactly reproduce a figure like the 1.5 or 1.9 or 4.13 from the book Mixed effects models in S and S-Plus. Not for the sake of it, but because I have my own data I would like to plot in that fashion (no colors) If I write plot(ergoStool) I can get a good

Re: [R] how to generate sequence a - z

2008-01-29 Thread Barry Rowlingson
Bernd Weiss wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 skestin schrieb: | I suppose it's very simple but I can't find the way to generate a sequence of | characters, e.g. from a to z. | Could you please help me with this? ?letters letters letters is okay for just that

Re: [R] how to generate sequence a - z

2008-01-29 Thread Duncan Murdoch
On 1/29/2008 7:39 AM, skestin wrote: I suppose it's very simple but I can't find the way to generate a sequence of characters, e.g. from a to z. Could you please help me with this? If you want the standard collation sequence, use the letters variable, as others have said. If you want the

[R] Convert string for expression in plot

2008-01-29 Thread Richard Longland
Hi, Although I understand how to use expression and paste to add superscripts and symbols to my graphs, I have a problem with adding superscripts to an existing string. For example, I read in the following from a separate file: 25Mg(p,g) I want to convert that to superscripts etc. (in LaTex

[R] Scale function

2008-01-29 Thread pellegrini
Hello everybody, There is something that I do not get with scale function. Say that I have a vector v - c(1,2,3,4,5,6), scale(v,center=TRUE,scale=TRUE) gives a new vector with 0 as mean and 1 as standard deviation. but, scale(v, center=FALSE,scale=TRUE) gives a new vector with a standard

[R] Guidance for reporting results from lme test?

2008-01-29 Thread Ronny Steen
Hello, I have sucsessfully used a linear mixed effect model, lme, (REML). The results are satisfactory, but I have problems with sorting out how to report the result in a scientific paper. Is there a genearal guidance for reporting lme results available (web page, book or article)? Best

Re: [R] pivot table in R

2008-01-29 Thread David Winsemius
[EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED] k: Three or four solutions have already been offered. Here is (yet) another: Atxt - + sex age region no_of_accidents + 1 F young north 10 + 2 F young south 12 + 3 F old north 5 + 4 F

Re: [R] sqldf error

2008-01-29 Thread Werner Wernersen
I cleaned up the environment and restarted everything and it does work. But I have no idea what it is what is different now. Anyway, it works! Thanks a lot Gabor! Best, Werner I can't reproduce your error: library(sqldf) sqldf(select * from warpbreaks limit 6) breaks wool

[R] Help needed on Normality test

2008-01-29 Thread Megh Dal
Hi all T gurus, I would like to test if my dataset is indeed from N(0, 0.011908969). K.S. test gives following result: ks.test(data, pnorm, 0, 0.011908969) One-sample Kolmogorov-Smirnov test data: data D = 0.1092, p-value = 1.318e-05 alternative hypothesis:

[R] Form Pairs of Variables for a paired t-test

2008-01-29 Thread nalluri pratap
Hi Users, This is regarding the paired t-test. I have 5 variables (say) Data$v1,Data$v2,Data$v3,Data$v4,Data$v5 in my data frame. Now, I need to perform a paired t-test on all the possible 10 pairs.How do I set up the pairs table directly and pass those variables in to t-test.

[R] regression - cluster option in STATA - what in R?

2008-01-29 Thread Niels Steen Krogh
My phd-student works in stata using cluster option in a regression model like this example: (from link: http://www.ats.ucla.edu/stat/stata/faq/clusterreg.htm) /* model 2 -- same as svy: regress with psu */ regress math homework, cluster(schid) I need to put som extra blinded data into the

[R] pivot table in R

2008-01-29 Thread pietro . parodi
Hello, I'm struggling with an elementary problem with R. I have a simple data frame such as this one giving the number of accidents subdivided by sex, age and region. sex age region no_of_accidents F young north 10 F young south 12 F

Re: [R] [OT] vernacular names for circular diagrams

2008-01-29 Thread Jim Lemon
Rolf Turner wrote: ... I have been for many years under the impression that the pie chart was invented by Florence Nightingale. Am I misinformed? Hi Rolf, Yes, you have been misled. Dear old Florence invented a related illustration now usually referred to as a polar area diagram. It was

Re: [R] [OT] vernacular names for circular diagrams

2008-01-29 Thread Gabor Grothendieck
http://en.wikipedia.org/wiki/Pie_chart cites papers using the polar area diagram prior to Nightengale although it does say that many sources credit it to her. On Jan 29, 2008 6:16 AM, Jim Lemon [EMAIL PROTECTED] wrote: Rolf Turner wrote: ... I have been for many years under the impression

Re: [R] Convert string for expression in plot

2008-01-29 Thread Uwe Ligges
Richard Longland wrote: Hi, Although I understand how to use expression and paste to add superscripts and symbols to my graphs, I have a problem with adding superscripts to an existing string. For example, I read in the following from a separate file: 25Mg(p,g) I want to convert

[R] q about efficient cross-classification/creating tables

2008-01-29 Thread Juliet Hannah
Dear R Users, I am posting a smaller portion of a question I posted last week. Code I have written takes weeks to run, and I am trying to make all the lines as efficient as possible. Here is one part of the code. I have some data that looks like [,1] [,2] [,3] [,4] [1,]1313

[R] [R-pkgs] New package: dtw - Dynamic Time Warping

2008-01-29 Thread Toni Giorgino
Dear R community, I would like to introduce the package dtw for computing Dynamic Time Warping (DTW) alignments and related algorithms on timeseries. The DTW algorithm computes the time axis stretch which optimally maps one timeseries (query) onto another (template); it outputs the resulting

Re: [R] Correlation matrix for data in long format

2008-01-29 Thread Henrique Dallazuanna
If I understand your question, you can try something like this: cor(data.frame(lapply(split(x, x$state), [, 3))) On 29/01/2008, Serguei Kaniovski [EMAIL PROTECTED] wrote: Hello, I cannot figure out how to use tapply to compute the correlation matrix in the variable x between the states? The

Re: [R] Integer vs numeric

2008-01-29 Thread cgenolin
Seems strange to me to define an operator relatively to a very special case. I have to admit that I do not use 1:1e7 every day :-) Wouldn't it be more appropriate to define a a:b operator numeric (that is preserving the initial class of a and b) and in specific case that need optimization,

Re: [R] how to generate sequence a - z

2008-01-29 Thread Attiglah, Mama
letters [1] a b c d e f g h i j k l m n o p q r s t u v w x y z LETTERS [1] A B C D E F G H I J K L M N O P Q R S T U V W X Y Z Hope that will help. Mama - Mama Attiglah, PhD Advanced Research Center Quantitative Research Analyst State Street Bank +44(0)20 7698 6290 (Direct Line) +44

Re: [R] Logit Regressions, Clustering etc

2008-01-29 Thread Paul Sweeting
Hi Sorry to bother the list again, but no-one has so far been able to suggest any help for the query below. As an added incentive, I have been asked why don't you do this in Stata? It's just a case of adding a flag in the regression... I'm loathe to start learning another stats package, so if

[R] how to generate sequence a - z

2008-01-29 Thread skestin
I suppose it's very simple but I can't find the way to generate a sequence of characters, e.g. from a to z. Could you please help me with this? -- View this message in context: http://www.nabble.com/how-to-generate-sequence-%22a%22---%22z%22-tp15158509p15158509.html Sent from the R help mailing

Re: [R] Expert systems

2008-01-29 Thread Domenico Vistocco
I know that there are packages implementings the probabilistic expert systems (the so-called probabilistic networks or bayesian networks). You find (at least) the following packages: bnlearn (bayesian network structure learning) deal (learning bayesian networks with mixed variables) G1DBN (for

Re: [R] Logit Regressions, Clustering etc

2008-01-29 Thread Thomas Lumley
The 'sandwich' package has sandwich standard errors of various sorts for a generalized linear models. I don't know if it handles the proportional odds model. -thomas On Tue, 29 Jan 2008, Paul Sweeting wrote: Hi Sorry to bother the list again, but no-one has so far been able to

Re: [R] how do i creat multiple back to back histograms?

2008-01-29 Thread S Ellison
Is ?pyramid.plot in the plotrix package of any help? Plotting three of these on the same device is possible after par(mfrow=c(1,3)) Tom Willems [EMAIL PROTECTED] 29/01/2008 11:43:46 dear R-ussers, I would like to creeate a graph, i wich my data is presented as verticaly oriented

Re: [R] how to generate sequence a - z

2008-01-29 Thread Bernd Weiss
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 skestin schrieb: | I suppose it's very simple but I can't find the way to generate a sequence of | characters, e.g. from a to z. | Could you please help me with this? ?letters letters HTH, B. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.7

Re: [R] how to generate sequence a - z

2008-01-29 Thread Christoph Scherber
-- X-USF-Spam-Status: hits=-2.6 tests=BAYES_00 X-USF-Spam-Flag: NO Hello, Sequences of letters can be generated by typing LETTERS #for capital letters or letters #for small letters Best wishes Christoph skestin schrieb: I suppose it's very simple but I can't find the way to generate a

Re: [R] how do i creat multiple back to back histograms?

2008-01-29 Thread ONKELINX, Thierry
Maybe this is what you'd like. library(ggplot2) freqs - data.frame(value= c( 0.000,1.204,1.301,1.362,1.447,1.505,1.602,1.653,1.756,1.806,1.903,1.959, 2.053,2.107,2.204,2.258,2.354,2.408,2.505,2.559,2.656,2.709,2.806) , tp1= c( 8,1,0,13,0,6,0,25,0,5,0,15,0,4,0,7,0,0,0,1,0,0,0) ,

[R] Compiling R code

2008-01-29 Thread Attiglah, Mama
Hi all, I am struggling to compile a massive R code that I have written through some years, aiming to provide automated investment strategies to my Portfolio Managers. You may ask me why do I not rewrite the code in C or C++; the answer is it is really massive and that will take me lots of time.

Re: [R] Integer vs numeric

2008-01-29 Thread Henrik Bengtsson
x[1:n] /H On Jan 29, 2008 5:07 AM, [EMAIL PROTECTED] wrote: Seems strange to me to define an operator relatively to a very special case. I have to admit that I do not use 1:1e7 every day :-) Wouldn't it be more appropriate to define a a:b operator numeric (that is preserving the initial

Re: [R] Fortunes - was Re: [OT] vernacular names for circular diagrams

2008-01-29 Thread Gabor Grothendieck
I did not write that. On Jan 29, 2008 9:05 AM, S Ellison [EMAIL PROTECTED] wrote: Gabor Grothendieck [EMAIL PROTECTED] 29/01/2008 12:35:27 As is common in human affairs, even the illusion of understanding is preferred to a lofty digression upon why the audience does not understand.

Re: [R] Form Pairs of Variables for a paired t-test

2008-01-29 Thread Henrique Dallazuanna
Try this: lapply(apply(combn(ncol(x),2), 2, function(y)x[,y]), function(z)t.test(z[,1], z[,2])) On 29/01/2008, nalluri pratap [EMAIL PROTECTED] wrote: Hi Users, This is regarding the paired t-test. I have 5 variables (say) Data$v1,Data$v2,Data$v3,Data$v4,Data$v5 in my data frame. Now, I

[R] B-W stacked area chart with pattern

2008-01-29 Thread Markus Didion
Dear all, I would like to create a stacked area chart to show the development of species biomass over time. Since it is intended for publication I need to prepare in black and white. I have tried to modify the stackedPlot function submitted to this list by Christian Lasarczyk on Tue, 16 Aug

Re: [R] B-W stacked area chart with pattern

2008-01-29 Thread hadley wickham
On Jan 29, 2008 9:12 AM, Markus Didion [EMAIL PROTECTED] wrote: Dear all, I would like to create a stacked area chart to show the development of species biomass over time. Since it is intended for publication I need to prepare in black and white. I have tried to modify the stackedPlot

Re: [R] B-W stacked area chart with pattern

2008-01-29 Thread Markus Didion
Thanks Hadley for your comment. I've got a minimum of 12 species and thus just using different greys won't do it. I've tried it with two background fills, i.e. white and a medium grey, and then used various angles for the shading lines, even plotted it twice to obtain some sort of cross

Re: [R] How to get two y-axises in a bar plot?

2008-01-29 Thread Attiglah, Mama
Try this X = rbind(y1, y2) colnames(X) = as.character(x) barplot( X, density=c(35,40), col=c(red,blue), beside=FALSE) barplot( X, density=c(35,40), col=c(red,blue), beside=TRUE) Alternatively, barplot( y1, ylim = c(0, max(y1,y2)), col=blue, beside=FALSE) par(new=TRUE) barplot( y2, ylim =

Re: [R] coherency and phase plots

2008-01-29 Thread stephen sefick
spec.pgram does accept multivariate time series, and I have used this with success. I just don't know if there is an implementation of cross-spectrum in R. Or what exactley Phase vs frequency is telling me. On Jan 29, 2008 2:06 PM, Donald McKenzie [EMAIL PROTECTED] wrote: See the help for

Re: [R] Fortunes - was Re: [OT] vernacular names for circular diagrams

2008-01-29 Thread Gabor Grothendieck
Search the archives and find who posted it. On Jan 29, 2008 1:52 PM, John Kane [EMAIL PROTECTED] wrote: Any idea who did? I have it in my list of quotes and attributed to you. Anon is so boring as a source. --- Gabor Grothendieck [EMAIL PROTECTED] wrote: I did not write that. On

Re: [R] Expert systems

2008-01-29 Thread Søren Højsgaard
I can add that I've recently uploaded the gRain package for gRAphical Independence Networks, aka probabilistic networks/Bayesian networks. Regards Søren Fra: [EMAIL PROTECTED] på vegne af Domenico Vistocco Sendt: ti 29-01-2008 19:07 Til: Ralf Finne Cc:

Re: [R] Help needed on Normality test

2008-01-29 Thread Greg Snow
The 2 tests are testing different hypotheses. The KS test is testing the null that the data comes from a normal with mean 0 and sd 0.11908969, this can be false if the data is not normal or if the mean is not 0 or if the sd is not 0.0119 or any combination of the 3. The Shapiro test was not

Re: [R] Fortunes - was Re: [OT] vernacular names for circular di

2008-01-29 Thread Ted Harding
On 29-Jan-08 18:52:30, John Kane wrote: Any idea who did? I have it in my list of quotes and attributed to you. Anon is so boring as a source. It was Jim Lemon, earlier in this thread: Date: Tue, 29 Jan 2008 22:16:55 +1100 Ted. --- Gabor Grothendieck [EMAIL PROTECTED] wrote: I did

[R] rpart Error in yval[, 1] : incorrect number of dimensions

2008-01-29 Thread Randy Griffiths
I am trying to make a decision tree using rpart. The function runs very quickly considering the size of the data (1742, 163). When I call the summary command I get this: summary(bookings.cart) Call: rpart(formula = totalRev ~ ., data = bookings, method = class) n=1741 (1 observation deleted

Re: [R] B-W stacked area chart with pattern

2008-01-29 Thread Greg Snow
I would question if a stacked area chart is really the best way to display information on 12 groups. You can put a lot of information into the plot, but the viewer will probably experience information overload and not be able to get much useful information out of the plot. Stacked area plots

Re: [R] Convert string for expression in plot

2008-01-29 Thread Uwe Ligges
Richard Longland wrote: Thanks for the help. This substitute command might be what I'm after, but, the whole string is being read in from a file. So I can't explicitly write the thing out as you did in your example, as with your example in R-news. My rules are: Convert any ,g or g, to

[R] for loop help

2008-01-29 Thread Adriana Bejarano
Hi, I have written the following code which works fine step-5 numSim-15 N-double(numSim) A-double(numSim) F-double(numSim) M-double(numSim) genx-double(numSim) for (i in 1:numSim) { N[i]-20 PN-(runif(N[i], 0, 1)) A[i]-sum(ifelse(PN0.2, 1, 0)) PF- runif((A[i]*0.5), 0, 1)

Re: [R] heatmap and legend

2008-01-29 Thread Earl F. Glynn
Ng Stanley [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] This should be elementary, but I can't find any resource on creating a legend for heatmap. Please help. Take a look at: * heatmap.2 in gplots package * heatplot in made4 Bioconductor package * heatmap_2 in Heatplus

Re: [R] Linux, UNIX, XP32, Vista X64 or ...? [SEC=UNCLASSIFIED]

2008-01-29 Thread Patrick Connolly
On Sun, 27-Jan-2008 at 07:38PM -0500, Gabor Grothendieck wrote: | On the PC there is a builtin GUI but not on UNIX and there are | some packages that are OS specific in which case you might | get more or less selection but probably more. Also depending | on the specific system you may have

Re: [R] Fortunes - was Re: [OT] vernacular names for circular diagrams

2008-01-29 Thread John Kane
Any idea who did? I have it in my list of quotes and attributed to you. Anon is so boring as a source. --- Gabor Grothendieck [EMAIL PROTECTED] wrote: I did not write that. On Jan 29, 2008 9:05 AM, S Ellison [EMAIL PROTECTED] wrote: Gabor Grothendieck [EMAIL PROTECTED] 29/01/2008

[R] coherency and phase plots

2008-01-29 Thread stephen sefick
I am having a hard time interpreting the phase and coherency plots. x is two timeseries that occur at the same time i.e. a b 1 11.2 12.3 16 11.3 12.4 31 11.4 12.5 46 11.5 12.6 ...etc even though my example is does not show this they are oscillating at

Re: [R] on trellis.par.set/get (reproducing figures from Pinheiro Bates)

2008-01-29 Thread Deepayan Sarkar
On 1/29/08, Dr. Ottorino-Luca Pantani [EMAIL PROTECTED] wrote: Dear R users, I would like to exactly reproduce a figure like the 1.5 or 1.9 or 4.13 from the book Mixed effects models in S and S-Plus. Not for the sake of it, but because I have my own data I would like to plot in that fashion

[R] bootstrap sampling using sample

2008-01-29 Thread Majnu John
Hello All, I used sample(..., replace = TRUE) repeatedly to generate 100 bootstrap samples of a data that I'm working with. If I re-run my codes, it'll generate a different set of 100 bootstrap samples. Is there any way that I can get the same set of 100 bootstrap re-samples at each re-run

Re: [R] bootstrap sampling using sample

2008-01-29 Thread Henrique Dallazuanna
see ?set.seed On 29/01/2008, Majnu John [EMAIL PROTECTED] wrote: Hello All, I used sample(..., replace = TRUE) repeatedly to generate 100 bootstrap samples of a data that I'm working with. If I re-run my codes, it'll generate a different set of 100 bootstrap samples. Is there any way

Re: [R] Linux, UNIX, XP32, Vista X64 or ...? [SEC=UNCLASSIFIED]

2008-01-29 Thread Gabor Grothendieck
On Jan 29, 2008 2:30 PM, Patrick Connolly [EMAIL PROTECTED] wrote: On Sun, 27-Jan-2008 at 07:38PM -0500, Gabor Grothendieck wrote: | On the PC there is a builtin GUI but not on UNIX and there are | some packages that are OS specific in which case you might | get more or less selection but

Re: [R] Logit Regressions, Clustering etc

2008-01-29 Thread Frank E Harrell Jr
Paul Sweeting wrote: Hi Sorry to bother the list again, but no-one has so far been able to suggest any help for the query below. As an added incentive, I have been asked why don't you do this in Stata? It's just a case of adding a flag in the regression... I'm loathe to start learning

Re: [R] B-W stacked area chart with pattern

2008-01-29 Thread David Scott
I would support this advice. Stacked bar charts are generally not recommended because comparisons are difficult. Having 12 groups increases the difficulty. Best have a look at Cleveland's work before you go down your currently intended path. Try delving into Elements of Graphing Data and

Re: [R] for loop help

2008-01-29 Thread jim holtman
Is this what you want? numSim - 15 genx-double(numSim) N - rep(20, numSim) A - F - M - numeric(numSim) result - lapply(1:5, function(.x){ + for (i in 1:numSim) { + PN-(runif(N[i], 0, 1)) + A[i]-sum(ifelse(PN0.2, 1, 0)) + PF- runif((A[i]*0.5), 0, 1) +

[R] drawing arrows with rgl

2008-01-29 Thread Kasper Peeters
Hi, I am looking for a package which allows me to draw arrows (cylinders with cones on them, basically) in 3d images produced with rgl. Is such a thing available? I did notice the 'compositions' package, which contains 'arrow3D'. However, it relies on 'tensorA', which fails to install on my

[R] Direct adjusted survival?

2008-01-29 Thread Peter Jepsen
Hello, I am trying to find an R function to compute 'direct adjusted survival' with standard errors. A SAS-macro to do this is presented in Zhang X, Loberiza FR, Klein JP, Zhang MJ. A SAS macro for estimation of direct adjusted survival curves based on a stratified Cox regression model. Comput

Re: [R] Compiling R code

2008-01-29 Thread Daniel Oberski
One suggestion you have probably already considered, but: why not R CMD BATCH the script? You can set up an executable to do that. No need to compile the actual R code. If you want to hide the code and/or it has interaction, you can also set it up on a web or intranet server for them, calling the

Re: [R] drawing arrows with rgl

2008-01-29 Thread Duncan Murdoch
On 1/29/2008 6:23 PM, Kasper Peeters wrote: Hi, I am looking for a package which allows me to draw arrows (cylinders with cones on them, basically) in 3d images produced with rgl. Is such a thing available? The shapes3d demo in rgl draws cones. You could use the same ideas to draw

Re: [R] Package simex

2008-01-29 Thread Daniel Oberski
Dear Michael If I understand you correctly, you already have an estimate of the measurement error? It would seem that if you can estimate the error, then this estimate comes with a standard error. For example, suppose that you have a nonlinear model where one of the predictors is a sum of two

Re: [R] Direct adjusted survival?

2008-01-29 Thread Thomas Lumley
On Wed, 30 Jan 2008, Peter Jepsen wrote: I am trying to find an R function to compute 'direct adjusted survival' with standard errors. A SAS-macro to do this is presented in Zhang X, Loberiza FR, Klein JP, Zhang MJ. A SAS macro for estimation of direct adjusted survival curves based on a

[R] assign column classes when creating a data frame from several vectors

2008-01-29 Thread kamokoi
R-helpers, Thanks in advance for your help. I am an R newbie and I am having trouble figuring out the easiest/most efficient way to assign classes to columns in a newly created data frame. R seems to want to convert everything to a factor when I use the cbind function to compile vectors into a

Re: [R] Scale function

2008-01-29 Thread David Winsemius
pellegrini [EMAIL PROTECTED] wrote in news:[EMAIL PROTECTED]: There is something that I do not get with scale function. Say that I have a vector v - c(1,2,3,4,5,6), scale(v,center=TRUE,scale=TRUE) gives a new vector with 0 as mean and 1 as standard deviation. but, scale(v,

Re: [R] Guidance for reporting results from lme test?

2008-01-29 Thread lorenz.gygax
Dear Ronny, I have sucsessfully used a linear mixed effect model, lme, (REML). The results are satisfactory, but I have problems with sorting out how to report the result in a scientific paper. Is there a genearal guidance for reporting lme results available (web page, book or

[R] Concatenate xyplots

2008-01-29 Thread jeitel
Dear R-community, I created 5 different xyplots and graphed all of them with the print command on one page (e.g. print(graph1, split=c(1,1,1,5), more = T) ... print(graph5, split=c(1,5,1,5), more =T) Using the above commands separates each graph by a white space. However, since the

Re: [R] Integer vs numeric

2008-01-29 Thread Christophe Genolini
x[c(2,4)] work as well Henrik Bengtsson a écrit : x[1:n] /H On Jan 29, 2008 5:07 AM, [EMAIL PROTECTED] wrote: Seems strange to me to define an operator relatively to a very special case. I have to admit that I do not use 1:1e7 every day :-) Wouldn't it be more appropriate to define

Re: [R] Random and fixed effect model with a covariate

2008-01-29 Thread lorenz.gygax
Dear Sophie, I wonder if anyone can please offer any advice on a model including 2 fixed effects and 1 random effect, as well as a covariate? The experimental design is as follows: I have a two by two factor design, where the two factors, Age (A) and Group size (G), both have 2 levels

[R] Multiplying each row of a big matrix with a vector

2008-01-29 Thread Megh Dal
I have a big matrix 'ret'. I want to multiply each row of it with a 2nd vector 'pos', resulting result, I want to save in a vector named 'port'. I wrote following code: pos [1] 2593419 2130220 6198197 1673888 198 1784732 2052120 -7490228 -5275000 dim(ret) [1] 500 9

Re: [R] Multiplying each row of a big matrix with a vector

2008-01-29 Thread Bill.Venables
port - as.vector(ret %*% port) should do it. Bill Venables -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Megh Dal Sent: Wednesday, 30 January 2008 5:20 PM To: [EMAIL PROTECTED] Subject: [R] Multiplying each row of a big matrix with a vector I have

Re: [R] [OT] vernacular names for circular diagrams

2008-01-29 Thread Jean lobry
On Mon, 28 Jan 2008 13:38:51 -0600, Roger Koenker wrote: Howard Wainer (Graphical Discovery, PUP, 2005, p 20) gives this dubious honor to Playfair (1759- 1823). Nightingale (1820- 1910) was far too enlightened for this sort of thing, see for example her letter to Galton about

[R] Odp: Multiplying each row of a big matrix with a vector

2008-01-29 Thread Petr PIKAL
I am not sure if you really want what you explain that you want To multiply each row with a vector you can use e.g. t(apply(ret,1, function(y) pos*y)) or t(t(ret)*pos) but then you will get the same matrix just multiplied by a vector. If you want to perform matrix multiplication then just