Re: [R] Tinn R - the preferred R term was not defined

2010-08-23 Thread pdb
Ok - I found the correct forum and that this seems to be a common problem. http://sourceforge.net/projects/tinn-r/forums/forum/481900/topic/3741784 -- View this message in context: http://r.789695.n4.nabble.com/Tinn-R-the-preferred-R-term-was-not-defined-tp2334642p2334649.html Sent from the

Re: [R] Fitting a regression model with with ARMA error

2010-08-23 Thread Gavin Simpson
On Mon, 2010-08-23 at 08:12 +0530, Aditya Damani wrote: Hi, I want to fit a regression model with one independent variable. The error part should be fitted an ARMA process. For example, y_t = a + b*x_t + e_t where e_t is modelled as an ARMA process. Please let me know how do I do

Re: [R] Dickey–Fuller test in R

2010-08-23 Thread Gavin Simpson
On Mon, 2010-08-23 at 08:18 +0530, Aditya Damani wrote: Hi, While doing the adf test using ur.df “price.df2=ur.df(y=log(price),type = drift, selectlags=AIC) summary(price.df2)” It gives two values for “value of test statistic is: -1.5992 2.32” one value is the t-test (or t-ratio), what

Re: [R] Engle Granger Test in R

2010-08-23 Thread Gavin Simpson
On Mon, 2010-08-23 at 08:42 +0530, Aditya Damani wrote: Hi, Please tell me the R codes for Engle Granger Test of cointegration. It isn't good form to pepper the list with questions, especially when said questions do not indicate you have done the required level of self-help etc before

[R] Picking out dates in xts

2010-08-23 Thread Lily_stats
Hi all, I like how smart xts and would like to pick out a period from my xts object*. I am able to pick out periods of particular years, for example : conc.xts-tt.xts['1983'] My question is, how can I pick out say, a) just the first 6 months of 1983. b) several years, say 1983 AND 1984 c)

[R] manual update Agilent oligo probes

2010-08-23 Thread Unger Kristian
Hi there! I wonder if anybody has some script for updating the annotations of Agilent custom probes. I want to update the annotation file of a custom 180k array. Best wishes Kristian _ Kristian Unger Imperial College London __

[R] sendmailR-package-valid code needed

2010-08-23 Thread Velappan Periasamy
## Not run: from - sprintf(sendmailR@ to - ol...@datensplitter.net subject - Hello from R msg - It works! sendmail(from, to, subject, msg, control=list(smtpServer=ASPMX.L.GOOGLE.COM)) ## End(Not run) the above commands are provided in this document ie

Re: [R] Fitting a GARCH model in R

2010-08-23 Thread Liviu Andronic
Hello You can find functions related to GARCH by searching on Rseek.org or by running in R: install.packages('sos', dep=T) require(sos) findFn('garch') Regards Liviu On Mon, Aug 23, 2010 at 5:59 AM, Aditya Damani adicoo...@gmail.com wrote: Hi, I want to fit a mean and variance model jointly.

[R] One legend for a multiple graph page

2010-08-23 Thread Jordan Ouellette-Plante
Hi, I am using the Sciplot package to graph barplots. Since I put 4 barplots per page and that the legends are always the same, I would like to find a way to have only one legend per page. Also, I would like it to be centered in the middle of the page. I tried locator() without success.

[R] DNA sequence Fst

2010-08-23 Thread blue jay
Hi, I want to analyse DNA sequence data (mtDNA) in R as in calculate Fst, Heterozygosity and such summary statistics. Package Adagenet converts the DNA sequence into retaining only retaining the polymorphic sites and then calcuates Fst.. but is there any other way to do this? I mean analyse the

Re: [R] DNA sequence Fst

2010-08-23 Thread Tim Gruene
Hello Blue Ray, I have worked with DNA, but frankly I do not know what Fst, Heterozygosity and such summary statistics might be. If you could explain a little, maybe even give a reference about their meaning and how to do the calculations, people who are not biologists but know R might be able

[R] One legend for a multiple graph page

2010-08-23 Thread Ouellette-Plante, Jordan
Hi, I am using the Sciplot package to graph barplots. Since I put 4 barplots per page and that the legend is always the same, I would like to find a way to have only one legend per page. Also, I would like it to be centered in the middle of the page. I tried locator() without success. Thanks for

Re: [R] which one give clear picture-pdf, jpg or tiff?

2010-08-23 Thread S Ellison
I use savePlot() with type=emf (remember to include the right file extension - although savePlot will use the type as default extension, it will only do so if there are no '.'s in the filename, so filenames like '../plots/aplot' won't get the extension automatically. Really should have made that

Re: [R] DNA sequence Fst

2010-08-23 Thread Charles Roosen
Hi, Take a look at the Bioconductor packages, particularly BSgenome. If that isn't specific enough, you might want to try the Bioconductor mailing list rather than R-help. http://www.bioconductor.org/packages/release/bioc/html/BSgenome.html bioconduc...@stat.math.ethz.ch Best

Re: [R] One legend for a multiple graph page

2010-08-23 Thread Jim Lemon
On 08/23/2010 09:52 PM, Jordan Ouellette-Plante wrote: Hi, I am using the Sciplot package to graph barplots. Since I put 4 barplots per page and that the legends are always the same, I would like to find a way to have only one legend per page. Also, I would like it to be centered in the

Re: [R] problems with merge() - the output has many repeated lines

2010-08-23 Thread Michael Dewey
At 18:23 22/08/2010, Cecilia Carmo wrote: I have done intersect(names(df1), names(df2)) [1] firm year This is the key I used to merge merge(df1,df2,by=c(firm,year)) And there is just one row firm/year in df1 that matches with another firm/year row in df2. Df1 has more firm/year rows than

Re: [R] Fitting VAR and doing Johansen's cointegration test in R

2010-08-23 Thread John C Frain
Look at the econometrics and time series Task wiew on the CRAN web site John On 23 August 2010 04:09, Aditya Damani adicoo...@gmail.com wrote: Hi, Could someone please tell me the R codes for fitting VAR(p) (Vector Auto Regressive) models and doing the Johansen’s cointegration tests. TIA

Re: [R] manual update Agilent oligo probes

2010-08-23 Thread David Winsemius
Try BioC? -- View this message in context: http://r.789695.n4.nabble.com/manual-update-Agilent-oligo-probes-tp2334869p2335106.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] problems with merge() - the output has many repeated lines

2010-08-23 Thread Cecilia Carmo
Thank you all for your help and patience. I’have done table(duplicated(df1[, c(firm,year)])) as William Dunlap suggested and I find repeated rows in df1. R is always right! I really believed that my data could not be repeated lines. I now have another problem which is to discover why this

[R] Maria Teresa Torres Muñoz/Control/Gestión de Accidentes/LineaDirecta está ausente de la oficina.

2010-08-23 Thread Maria Teresa Torres Muñoz
Estaré ausente de la oficina desde el 23/08/2010 y no volveré hasta el 06/09/2010. Responderé a su mensaje cuando regrese, si es urgente enviar mail a Estadisticas GDA Visítenos en: www.lineadirecta.com Este mensaje y los documentos que, en su caso, lleve anexos, pueden contener

[R] Cran-packages-ProfessoR- how to Automatically email a file to an address using the perl program.

2010-08-23 Thread Velappan Periasamy
AutoEmail autoemail Description Automatically email a file to an address using the perl program. Usage autoemail(eadd, sfile, hnote = Exam Results) Arguments eaddEmail address sfile file to be sent hnotesubject line

Re: [R] sendmailR-package-valid code needed

2010-08-23 Thread Velappan Periasamy
Hello Chris Campbell , I tried this for my email id it give me errors from - sprintf(sendma...@%s, Sys.info()[4]) to - veepsi...@gmail.com subject - Hello from R msg - It works! sendmail(from, to, subject, msg,control=list(smtpServer=ASPMX.L.GOOGLE.COM)) Error in waitFor(code) : SMTP

[R] AUC

2010-08-23 Thread Samuel Okoye
Hello, Is there is any R function computes the AUC for paired data? Many thanks, Samuel [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

[R] Fitting Weibull Model with Levenberg-Marquardt regression method

2010-08-23 Thread Veronesi, Fabio
Hi, I have a problem fitting the following Weibull Model to a set of data. The model is this one: a-b*exp(-c*x^d) If I fitted the model with CurveExpert I can find a very nice set of coefficients which create a curve very close to my data, but when I use the nls.lm function in R I can't obtain

Re: [R] sendmailR-package-valid code needed

2010-08-23 Thread Chris Campbell
Hi veepsirtt This code is fragmented due to the syntax of the example not being parsed as intended to text. The source of \examples for sendmail.Rd is: from - sprintf(sendma...@%s, Sys.info()[4]) to - ol...@datensplitter.net subject - Hello from R msg - It works! sendmail(from, to, subject,

Re: [R] Fatal Error

2010-08-23 Thread Petr PIKAL
Hi Another possibility could be that .RData was saved when some packages were used and are not installed in this R version (I often percieve it when I migrate among different computers). If the complete error message suggests it you can install that package and you may open your .RData again

Re: [R] sendmailR-package-valid code needed

2010-08-23 Thread Barry Rowlingson
On Mon, Aug 23, 2010 at 3:55 PM, Velappan Periasamy veepsi...@gmail.com wrote: Hello Chris Campbell , I tried this for my email id it give me errors from - sprintf(sendma...@%s, Sys.info()[4]) to - veepsi...@gmail.com subject - Hello from R msg - It works! sendmail(from, to, subject,

Re: [R] AUC

2010-08-23 Thread Frank Harrell
Samuel, Since the difference in AUCs has insufficient power and doesn't really take into account the pairing of predictions, I recommend the Hmisc package's rcorrp.cens function. Its method has good power and asks the question is one predictor more concordant than the other in the same

Re: [R] Fitting VAR and doing Johansen's cointegration test in R

2010-08-23 Thread Owe Jessen
Am 23.08.2010 05:09, schrieb Aditya Damani: Hi, Could someone please tell me the R codes for fitting VAR(p) (Vector Auto Regressive) models and doing the Johansen’s cointegration tests. TIA Aditya __ R-help@r-project.org mailing list

Re: [R] DNA sequence Fst

2010-08-23 Thread Keo Ormsby
Hi Blue Jay, If your sequences are small (10Kb) and you have a few samples (~100) the seqinr package from CRAN itself is a very straightforward way of handling DNA sequences, but if you plan to do more sophisticated things that can drain your RAM and processor time, I would definitely

[R] Strange space characters in character strings

2010-08-23 Thread Mark Breman
Hello everyone, I am reading a HTML table from a website with readHTMLTable() from the XML package: library(XML) moose = readHTMLTable(http://www.decisionmoose.com/Moosistory.html;, header=FALSE, skip.rows=c(1,2), trim=TRUE)[[1]] moose V1 V2

[R] Recyclable

2010-08-23 Thread Hadley Wickham
Hi all, Is there a function to determine whether a set of vectors is cleanly recyclable? i.e. is there a common function for detecting the error/warnings that underlie the following two function calls? 1:3 + 1:2 [1] 2 4 4 Warning message: In 1:3 + 1:2 : longer object length is not a multiple

[R] Problems with Tinn-R

2010-08-23 Thread jim holtman
A co-worker has been having problems with using Tinn-R and has posted to their help forum and got no response. So I am asking if anyone else who might be using Tinn-R has seen the problems that he is experiencing. I am using the same version of R and Tinn-R that he is, and I have not seen it. I

[R] lmer() causes segfault

2010-08-23 Thread Bertolt Meyer
Hello lmer() - users, A call to the lmer() function causes my installation of R (2.11.1 on Mac OS X 10.5.8) to crash and I am trying to figure out the problem. I have a data set with longitudinal data of four subsequent performance measures of 1133 individuals nested in 88 groups. The data

[R] Sum a list of tables

2010-08-23 Thread Thaler, Thorn, LAUSANNE, Applied Mathematics
Hi all, In R it is possible to sum tables: (a - table(rep(1:3, sample(10,3 1 2 3 2 5 7 a+a 1 2 3 4 10 14 Now suppose that I have a list of tables, where each table counts the same things k - list(a,a,a) How can I sum all tables in k? do.call(sum, k) [1] 42 does not work

[R] Problems installing JRI on Macintosh/Snowleopard

2010-08-23 Thread Lars Beckmann
Dears, I have a problem to install JRI on a Macintosh with Snowleopard OS. configure runs without error message but make gives the following error message: $ make make -C src JRI.jar gcc -arch i386 -arch ppc -c -o Rengine.o Rengine.c -g -Iinclude -fno-common

Re: [R] Recyclable

2010-08-23 Thread Hadley Wickham
I should note that I realise this function is pretty trivial to write (see below), I just want to avoid reinventing the wheel. recyclable - function(...) { lengths - vapply(list(...), length, 1) all(max(lengths) %% lengths == 0) } Hadley On Mon, Aug 23, 2010 at 10:33 AM, Hadley Wickham

[R] (no subject)

2010-08-23 Thread Hongying Li
Hi all, I have a question about survplot in Design package. There is an option to print the number of subjects at risk at the start of each time interval. But I do not know how the time interval is decided, i.e. I do not know the correspoding time to the number at risk printed. How can I get

Re: [R] Sum a list of tables

2010-08-23 Thread RICHARD M. HEIBERGER
Reduce(`+`, k) On Mon, Aug 23, 2010 at 12:18 PM, Thaler, Thorn, LAUSANNE, Applied Mathematics thorn.tha...@rdls.nestle.com wrote: Hi all, In R it is possible to sum tables: (a - table(rep(1:3, sample(10,3 1 2 3 2 5 7 a+a 1 2 3 4 10 14 Now suppose that I have a list of

Re: [R] Sum a list of tables

2010-08-23 Thread RICHARD M. HEIBERGER
sorry, cancel that. I will try again. On Mon, Aug 23, 2010 at 12:35 PM, RICHARD M. HEIBERGER r...@temple.eduwrote: Reduce(`+`, k) [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Sum a list of tables

2010-08-23 Thread Thaler, Thorn, LAUSANNE, Applied Mathematics
Perfectly, works as expected. Regarding the other questions, can anybody point me to the right direction? BR Thorn From: RICHARD M. HEIBERGER [mailto:r...@temple.edu] Sent: lundi 23 août 2010 18:36 To: Thaler,Thorn,LAUSANNE,Applied Mathematics Cc: r-help@r-project.org Subject: Re: [R]

Re: [R] lmer() causes segfault

2010-08-23 Thread Ben Bolker
Bertolt Meyer bmeyer at sozpsy.uzh.ch writes: Hello lmer() - users, A call to the lmer() function causes my installation of R (2.11.1 on Mac OS X 10.5.8) to crash and I am trying to figure out the problem. [snip snip] detach(package:nlme) library(lme4) mod1 - lmer(performance ~

Re: [R] sendmailR-package-valid code needed

2010-08-23 Thread Ben Bolker
Barry Rowlingson b.rowlingson at lancaster.ac.uk writes: On Mon, Aug 23, 2010 at 3:55 PM, Velappan Periasamy veepsirtt at gmail.com wrote: Hello Chris Campbell , I just posted my embryonic 'Rmail' package, which does a form of SMTP authentication (maybe not the version you want), to

Re: [R] R Package about Variable Selection for GLMM (Generalized Linear Mixed Model)?

2010-08-23 Thread Ben Bolker
Jun Bum Kwon junbum at uwm.edu writes: [lightly edited] I saw several great R packages for Variable Selection. I also found several R packages for GLMM. But, I did not find yet R package about Variable Selection for GLMM even though several  papers about it have been published. Such

[R] Kalman Filtering with Singular State Noise Covariance Matrix

2010-08-23 Thread Scott Stephens
Since notation for state-space models vary, I'll use the following convention: x(t) indicates the state vector, y(t) indicates the vector of observed quantities. State Transition Equation: x(t+1) = Fx(t) + v(t) Observation Equation: y(t) = Gx(t) + w(t) Cov[v(t)] = V Cov[w(t)] = W I've found

Re: [R] Aspect Ratio

2010-08-23 Thread Greg Snow
A couple of additional examples of when asp is important to use: The command abline(0,1) adds a line to the current plot, this line is often referred to as the 45 degree line, but the angle with the axes is only 45 degrees when asp==1, setting asp=1 will enforce this. There are multiple

[R] change order of plot panels in faceted ggplot/qplot

2010-08-23 Thread Alison Macalady
Hi, I have a 5-paneled figure that i made using the facet function in qplot (ggplot). I've managed to arrange the panels into two rows/ three columns, but for the sake of easy visual comparisons between panels in my particular dataset, I want to have the two plots on the bottom align on

[R] Quantile Regression and Goodness of Fit

2010-08-23 Thread Steven Ranney
All - Does anyone know if there is a method to calculate a goodness-of-fit statistic for quantile regressions with package quantreg? Specifically, I'm wondering if anyone has implemented the goodness-of-fit process developed by Koenker and Machado (1999) for R? Though I have used package

Re: [R] sendmailR-package-valid code needed

2010-08-23 Thread Ben Bolker
No, alas. It would have been nice but I decided I didn't need it that badly/need to spend time reinventing that many wheels. (It does do mail-merge, though, which is what I developed it for in the first place.) It seemed to me that a more sensible solution would have been to find a Perl or

Re: [R] Quantile Regression and Goodness of Fit

2010-08-23 Thread nikhil kaza
http://www.econ.uiuc.edu/~roger/research/R1/R1.html On Mon, Aug 23, 2010 at 2:15 PM, Steven Ranney steven.ran...@montana.eduwrote: All - Does anyone know if there is a method to calculate a goodness-of-fit statistic for quantile regressions with package quantreg? Specifically, I'm

[R] extracting p-values from Anova objects (from the car library)

2010-08-23 Thread Johan Steen
Dear all, is there anyone who can help me extracting p-values from an Anova object from the car library? I can't seem to locate the p-values using str(result) or str(summary(result)) in the example below A - factor( rep(1:2,each=3) ) B - factor( rep(1:3,times=2) ) idata - data.frame(A,B)

Re: [R] Fitting Weibull Model with Levenberg-Marquardt regression method

2010-08-23 Thread Gabor Grothendieck
On Mon, Aug 23, 2010 at 11:01 AM, Veronesi, Fabio f.veron...@cranfield.ac.uk wrote: Hi, I have a problem fitting the following Weibull Model to a set of data. The model is this one: a-b*exp(-c*x^d) If I fitted the model with CurveExpert I can find a very nice set of coefficients which create

[R] Coinertia randtest

2010-08-23 Thread Petar Milin
Hello! I dunno why, but I cannot make randtes.coinertia() from ade4 package working. I have two nice distance matrices (Euclidean): dist1 1 2 3 4 5 6 7 2 2.5776799 3 1.7892825 1.0637487 4 1.0557991 2.4270728 2.0626604 5 1.6745483

[R] easiest way to write an R dataframe to excel?

2010-08-23 Thread Eva Nordstrom
I am using R 2.11.1 in a Microsoft Windows 7 environment.   I tried using WriteXLS, but get the message In system(cmd) : perl not found   What is the easiest way to write an R dataframe to Excel?  (I am familiar with WriteXLS, but I do not have PERL installed, and if not needed, do not wish to

Re: [R] easiest way to write an R dataframe to excel?

2010-08-23 Thread Liviu Andronic
On Mon, Aug 23, 2010 at 10:50 PM, Eva Nordstrom eva.nordst...@yahoo.com wrote: I am using R 2.11.1 in a Microsoft Windows 7 environment. I tried using WriteXLS, but get the message In system(cmd) : perl not found What is the easiest way to write an R dataframe to Excel?  (I am familiar

Re: [R] extracting p-values from Anova objects (from the car library)

2010-08-23 Thread David Winsemius
On Aug 23, 2010, at 3:01 PM, Johan Steen wrote: Dear all, is there anyone who can help me extracting p-values from an Anova object from the car library? I can't seem to locate the p-values using str(result) or str(summary(result)) in the example below A - factor( rep(1:2,each=3) ) B -

[R] trajectory plot (growth curve)

2010-08-23 Thread Lei Liu
Hi there, I want to make trajectory plots for data as follows: ID timey 1 1 1.4 1 2 2.0 1 3 2.5 2 1.5 2.3 2 4 4.5 2 5.5 1.6 2 6 2.0 ... That is, I will plot a growth curve for each subject ID, with y in

Re: [R] change order of plot panels in faceted ggplot/qplot

2010-08-23 Thread Bert Gunter
This is easy to do in xyplot (latice package) via the index.cond and skip arguments. Don't know about ggplot though. -- Bert On Mon, Aug 23, 2010 at 11:02 AM, Alison Macalady a...@kmhome.org wrote: Hi, I have a 5-paneled figure that i made using the facet function in qplot (ggplot).  I've

Re: [R] Coinertia randtest

2010-08-23 Thread Mark Difford
Hi Petar, I dunno why, but I cannot make randtes[t].coinertia() from ade4 package working. I have two nice distance matrices (Euclidean): Could anyone help with this? Yes (sort of). The test has not yet been implemented for dudi.pco, as the message at the end of your listing tells you.

Re: [R] trajectory plot (growth curve)

2010-08-23 Thread Gabor Grothendieck
On Mon, Aug 23, 2010 at 3:58 PM, Lei Liu liu...@virginia.edu wrote: Hi there, I want to make trajectory plots for data as follows: ID      time    y 1       1       1.4 1       2       2.0 1       3       2.5 2       1.5     2.3 2       4       4.5 2       5.5     1.6 2       6      

Re: [R] trajectory plot (growth curve)

2010-08-23 Thread Gabor Grothendieck
On Mon, Aug 23, 2010 at 4:16 PM, Gabor Grothendieck ggrothendi...@gmail.com wrote: On Mon, Aug 23, 2010 at 3:58 PM, Lei Liu liu...@virginia.edu wrote: Hi there, I want to make trajectory plots for data as follows: ID      time    y 1       1       1.4 1       2       2.0 1       3      

Re: [R] Regex exercise

2010-08-23 Thread Greg Snow
How about: x - 1 2 -5, 3- 6 4 8 5-7 10; x library(gsubfn) strapply( x, '(([0-9]+) *- *([0-9]+))|([0-9]+)', function(one,two,three,four) { if( nchar(four) 0 ) return(as.numeric(four) ) return( seq( from=as.numeric(two), to=as.numeric(three) ) )

Re: [R] Sum a list of tables

2010-08-23 Thread David Winsemius
On Aug 23, 2010, at 12:39 PM, Thaler, Thorn, LAUSANNE, Applied Mathematics wrote: Perfectly, works as expected. Regarding the other questions, can anybody point me to the right direction? So first question: where is the `+` operation defined for tables? tables are a modification

Re: [R] easiest way to write an R dataframe to excel?

2010-08-23 Thread Marc Schwartz
On Aug 23, 2010, at 2:50 PM, Eva Nordstrom wrote: I am using R 2.11.1 in a Microsoft Windows 7 environment. I tried using WriteXLS, but get the message In system(cmd) : perl not found What is the easiest way to write an R dataframe to Excel? (I am familiar with WriteXLS, but I do

[R] Problem with step.gam

2010-08-23 Thread mahesh samtani
Hello, I am running a step.gam with 21 explanatory variables. I run into a problem with the Error: cannot allocate vector of size 437.9 Mb if the list of explanatory variables is longer than 17. I have to comment out 4 of the variables and can't test than 17 variables (see below). I am wondering

Re: [R] easiest way to write an R dataframe to excel?

2010-08-23 Thread David Winsemius
On Aug 23, 2010, at 4:52 PM, Marc Schwartz wrote: On Aug 23, 2010, at 2:50 PM, Eva Nordstrom wrote: I am using R 2.11.1 in a Microsoft Windows 7 environment. I tried using WriteXLS, but get the message In system(cmd) : perl not found Snipped muc useful information If you have

Re: [R] trajectory plot (growth curve)

2010-08-23 Thread Kingsford Jones
and some more options... dat - structure(list(ID = structure(c(1L, 1L, 1L, 2L, 2L, 2L, 2L), .Label = c(1, 2), class = factor), time = c(1, 2, 3, 1.5, 4, 5.5, 6), y = c(1.4, 2, 2.5, 2.3, 4.5, 1.6, 2)), .Names = c(ID, time, y), row.names = c(NA, -7L), class = data.frame) library(lattice)

Re: [R] easiest way to write an R dataframe to excel?

2010-08-23 Thread Marc Schwartz
On Aug 23, 2010, at 4:22 PM, David Winsemius wrote: On Aug 23, 2010, at 4:52 PM, Marc Schwartz wrote: On Aug 23, 2010, at 2:50 PM, Eva Nordstrom wrote: I am using R 2.11.1 in a Microsoft Windows 7 environment. I tried using WriteXLS, but get the message In system(cmd) : perl not

Re: [R] easiest way to write an R dataframe to excel?

2010-08-23 Thread Erik Iverson
In addition to the Wiki already mentioned, the following may be useful: http://learnr.wordpress.com/2009/10/06/export-data-frames-to-multi-worksheet-excel-file/ Eva Nordstrom wrote: I am using R 2.11.1 in a Microsoft Windows 7 environment. I tried using WriteXLS, but get the message In

Re: [R] extracting p-values from Anova objects (from the car library)

2010-08-23 Thread Johan Steen
Thanks for your replies, but unfortunately none of them seem to help. I do get p-values in the output, but can't seem to locate them anywhere in these objects via the str() function. I also get very different output using str() than you obtained from the lm help page Here's my output: A -

[R] 3D stariway plot

2010-08-23 Thread mau...@alice.it
Please, is there an R function /package that allows for 3D stairway plots like the attached one ? In addition, how can I overlay a parametric grid plot?? Thank you Maura Alice body {margin:0;padding:0;} #footer {

[R] Memory Issue

2010-08-23 Thread Cuckovic Paik
Dear All, I have an issue on memory use in R programming. Here is the brief story: I want to simulate the power of a nonparameteric test and compare it with the existing tests. The basic steps are 1. I need to use Newton method to obtain the nonparametric MLE that involves the inversion of a

Re: [R] R reports

2010-08-23 Thread Kevin Wright
I'm mindful of the volunteer nature of R-core, but I'm also sympathetic to Donald. I use Sweave to create documents, though I tend to view Sweave as a typesetter, not a report writer. What do I see as the difference? Sweave typesets _raw_ R output. A report writer makes it easier to quickly

Re: [R] extracting p-values from Anova objects (from the car library)

2010-08-23 Thread Sarah Goslee
I didn't follow the earlier replies, but since you still can't seem to get p-values, what about this: (I also couldn't run your sample code, so this is a toy example; and do you mean anova() - I'm not familiar with Anova(), and didn't see anything with ??Anova) x - runif(100) y - runif(100)

Re: [R] extracting p-values from Anova objects (from the car library)

2010-08-23 Thread John Fox
Dear Johan, -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Johan Steen Sent: August-23-10 3:02 PM To: r-help@r-project.org Subject: [R] extracting p-values from Anova objects (from the car library) Dear all, is there

[R] unexpected subset select results?

2010-08-23 Thread ivo welch
quizz---what does this produce? d=data.frame( a=1:1000, b=2001:3000, z= 5001:6000 ) attach(d); c - (a+b)25; detach(d) d= subset(d, TRUE, select=c( a, b, c )) yes, I know I have made a mistake, in that the code does not do what I presumably would have wanted. it does seem like

Re: [R] extracting p-values from Anova objects (from the car library)

2010-08-23 Thread John Fox
Dear Johan and Dennis, I believe that the source of confusion is the difference between Anova.lm(), the Anova method for a linear-model object, which indeed has a summary method that returns an object from which you can extract p-values, and Anova.mlm(), which passes the multivariate-linear-model

Re: [R] trajectory plot (growth curve)

2010-08-23 Thread Stuart Luppescu
On Mon, 2010-08-23 at 15:58 -0400, Lei Liu wrote: That is, I will plot a growth curve for each subject ID, with y in the y axis, and time in the x axis. I would like to have all growth curves in the same plot. Is there a simple way in R to do it? Thanks a lot! This article, entitled,

Re: [R] unexpected subset select results?

2010-08-23 Thread Erik Iverson
ivo welch wrote: quizz---what does this produce? d=data.frame( a=1:1000, b=2001:3000, z= 5001:6000 ) attach(d); c - (a+b)25; detach(d) d= subset(d, TRUE, select=c( a, b, c )) yes, I know I have made a mistake, in that the code does not do what I presumably would have wanted.

Re: [R] unexpected subset select results?

2010-08-23 Thread ivo welch
I would not have wanted a data set with 1000 variables, but an error message. the intent was d=data.frame( a=1:1000, b=2001:3000, z= 5001:6000 ) attach(d); d$c - (a+b)25; detach(d) d= subset(d, TRUE, select=c( a, b, c )) -iaw On Mon, Aug 23, 2010 at 6:04 PM, Erik Iverson

Re: [R] extracting p-values from Anova objects (from the car library)

2010-08-23 Thread David Winsemius
On Aug 23, 2010, at 5:35 PM, Johan Steen wrote: Thanks for your replies, but unfortunately none of them seem to help. I do get p-values in the output, but can't seem to locate them anywhere in these objects via the str() function. That is because in the case of Anova.mlm objects ... they

Re: [R] unexpected subset select results?

2010-08-23 Thread David Winsemius
On Aug 23, 2010, at 5:51 PM, ivo welch wrote: quizz---what does this produce? d=data.frame( a=1:1000, b=2001:3000, z= 5001:6000 ) attach(d); c - (a+b)25; detach(d) d= subset(d, TRUE, select=c( a, b, c )) yes, I know I have made a mistake, in that the code does not do what I presumably

Re: [R] unexpected subset select results?

2010-08-23 Thread Henrique Dallazuanna
Try this: subset(d, TRUE, select=c( 'a', 'b', 'c' )) On Mon, Aug 23, 2010 at 7:15 PM, ivo welch ivo.we...@gmail.com wrote: I would not have wanted a data set with 1000 variables, but an error message. the intent was d=data.frame( a=1:1000, b=2001:3000, z= 5001:6000 ) attach(d); d$c -

Re: [R] easiest way to write an R dataframe to excel?

2010-08-23 Thread Erich Neuwirth
Search for an older message with the subject line [R] export tables to excel files on multiple sheets with titles for each table On 8/23/2010 11:41 PM, Erik Iverson wrote: In addition to the Wiki already mentioned, the following may be useful:

Re: [R] Aspect Ratio

2010-08-23 Thread Peter Ehlers
On 2010-08-19 16:36, r.ookie wrote: This example definitely clarified a situation where 'asp' is useful/helpful. Thanks! Ted's last example is a bit misleading. You don't get the same result from setting xlim and ylim equal as you do from using 'asp'. Indeed, this should help you to

Re: [R] trajectory plot (growth curve)

2010-08-23 Thread Kingsford Jones
Hi Lei, Hope you don't mind I'm moving this back to the list in case others may benefit. Answers below... On Mon, Aug 23, 2010 at 3:37 PM, Lei Liu liu...@virginia.edu wrote: Hi Kingsford, Thanks a lot! I got some help from my colleague by using the following code: xyplot(y~month,group=id,

Re: [R] Memory Issue

2010-08-23 Thread Dennis Murphy
Hi: Are you running 32-bit or 64-bit R? For memory-intensive processes like these, 64-bit R is almost a necessity. You might also look into more efficient ways to invert the matrix, especially if it has special properties that can be exploited (e.g., symmetry). More to the point, you want to

Re: [R] extracting p-values from Anova objects (from the car library)

2010-08-23 Thread Johan Steen
Thanks a lot! It sure helped. also thanks to all other repliers. kind regards Johan Op 23/08/2010 23:53, John Fox schreef: Dear Johan, -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Johan Steen Sent: August-23-10 3:02 PM To:

Re: [R] trajectory plot (growth curve)

2010-08-23 Thread Dennis Murphy
Hi: On Mon, Aug 23, 2010 at 4:19 PM, Kingsford Jones kingsfordjo...@gmail.comwrote: Hi Lei, Hope you don't mind I'm moving this back to the list in case others may benefit. Answers below... On Mon, Aug 23, 2010 at 3:37 PM, Lei Liu liu...@virginia.edu wrote: Hi Kingsford, Thanks a

Re: [R] 3D stariway plot

2010-08-23 Thread Ben Bolker
mauede at alice.it mauede at alice.it writes: Please, is there an R function /package that allows for 3D stairway plots like the attached one ? In addition, how can I overlay a parametric grid plot?? Not exactly, that I know of, but maybe you can adapt library(rgl) demo(hist3d) to

Re: [R] unexpected subset select results?

2010-08-23 Thread David Winsemius
On Aug 23, 2010, at 6:28 PM, David Winsemius wrote: On Aug 23, 2010, at 5:51 PM, ivo welch wrote: quizz---what does this produce? d=data.frame( a=1:1000, b=2001:3000, z= 5001:6000 ) attach(d); c - (a+b)25; detach(d) d= subset(d, TRUE, select=c( a, b, c )) yes, I know I have made a

Re: [R] unexpected subset select results?

2010-08-23 Thread Dennis Murphy
And, of course, there's transform, as David knows very well: d - transform(d, c = (a + b) 25) head(d) abzc 1 1 2001 5001 TRUE 2 2 2002 5002 TRUE 3 3 2003 5003 TRUE 4 4 2004 5004 TRUE 5 5 2005 5005 TRUE 6 6 2006 5006 TRUE As far as David's 'wrong way' is concerned, I think he may

Re: [R] trajectory plot (growth curve)

2010-08-23 Thread Kingsford Jones
On Mon, Aug 23, 2010 at 6:19 PM, Dennis Murphy djmu...@gmail.com wrote: This is an excellent idea - the only snag might occur if someone wants the mean line to be thicker :) fortunately, with your lattice solution this is easily accomplished by passing a vector to lwd: i - c(1, 1, 1, 3)

[R] generate random numbers from a multivariate distribution with specified correlation matrix

2010-08-23 Thread rusers.sh
Hi all, rmvnorm()can be used to generate the random numbers from a multivariate normal distribution with specified means and covariance matrix, but i want to specify the correlation matrix instead of covariance matrix for the multivariate normal distribution. Does anybody know how to generate

[R] Rotate x-axis label on log scale

2010-08-23 Thread Tim Elwell-Sutton
Hi I'd appreciate some help with plotting odds ratios. I want to rotate the labels on the x-axis by 45 degrees. The usual way of doing this, using text - e.g. text(1, par('usr')[3]-2.25..) - gives no result when the y-axis is a log scale. I guess this is because, as the par help says, for a

Re: [R] trajectory plot (growth curve)

2010-08-23 Thread Dennis Murphy
Hi: I think it would be tough to do that in qplot(), but it's easier in ggplot(), even if you don't add the mean information to the data frame. Here's one way - use the three person data frame (call it dat1) and the mean.y data frame that you created from aggregate() without adding the factor

Re: [R] generate random numbers from a multivariate distribution with specified correlation matrix

2010-08-23 Thread Ben Bolker
rusers.sh rusers.sh at gmail.com writes: rmvnorm()can be used to generate the random numbers from a multivariate normal distribution with specified means and covariance matrix, but i want to specify the correlation matrix instead of covariance matrix for the multivariate normal

Re: [R] Adding column to dataframe

2010-08-23 Thread Matt Cooper
Provide and 'str' and 'object.size' of the object so that we can see what you are working with. My rule of thumb is that no single object should take more than 25-30% of memory since copies may be made. So the reasons things are taking 20 minutes is you might be paging. It is always good

Re: [R] generate random numbers from a multivariate distribution with specified correlation matrix

2010-08-23 Thread rusers.sh
Hi, If you see the link http://www.stata.com/help.cgi?drawnorm, and you can see an example, #draw a sample of 1000 observations from a bivariate standard normal distribution, with correlation 0.5. #drawnorm x y, n(1000) corr(0.5) This is what Stata software did. What i hope to do in R should be

Re: [R] generate random numbers from a multivariate distribution with specified correlation matrix

2010-08-23 Thread David Winsemius
On Aug 23, 2010, at 11:05 PM, rusers.sh wrote: Hi, If you see the link http://www.stata.com/help.cgi?drawnorm, and you can see an example, #draw a sample of 1000 observations from a bivariate standard normal distribution, with correlation 0.5. #drawnorm x y, n(1000) corr(0.5) This is what

  1   2   >