Re: [R] is this an ANOVA ?

2011-04-13 Thread Lao Meng
You may try the following to perform anova: anova(lm(y~x)) or summary(aov(y~x)) 2011/4/13 Ubuntu Diego ubuntu.di...@gmail.com Hi all, I have a very easy questions (I hope). I had measure a property of plants, growing in three different substrates (A, B and C). The rest of the

[R] Dump the source code of data frame

2011-04-13 Thread C.H.
Dear R experts, I remember a similar function existed and have been mentioned in R-help before. I tried my best to search but I really can't find it out. suppose I have an data frame like this: somedata - data.frame(age.min = 1, age.max = 1.5, male = TRUE, l = -1.013, m=16.133, s=0.07656)

Re: [R] Dump the source code of data frame

2011-04-13 Thread Jorge Ivan Velez
Hi CH, Take a look at ?dput HTH, Jorge On Wed, Apr 13, 2011 at 3:09 AM, C.H. wrote: Dear R experts, I remember a similar function existed and have been mentioned in R-help before. I tried my best to search but I really can't find it out. suppose I have an data frame like this:

Re: [R] Compatibility with Work Load/Resource Managers

2011-04-13 Thread Philipp Pagel
I was wondering if anyone knew whether R is capable of integrating with the following work load/resource managers TORQUE, OpenPBS, PBS Pro, LSF, and SGE? I am running R scripts in our cluster under SGE on a regular basis and have also done that under Platform LSF in the past but I am not sure

Re: [R] forest + igraph ?

2011-04-13 Thread Viechtbauer Wolfgang (STAT)
Sure. Here is an example: library(metafor) data(dat.bcg) windows(height=8, width=6, pointsize=10) par(mfrow=c(2,1)) dat - escalc(measure=RR, ai=tpos, bi=tneg, ci=cpos, di=cneg, data=dat.bcg) res - rma(yi, vi, data=dat) forest(res, atransf=exp) title(Forest Plot of Relative Risks) dat -

[R] R 2.13.0 is released

2011-04-13 Thread Peter Dalgaard
I've rolled up R-2.13.0.tar.gz a short while ago. This is a development release which contains a number of new features. Also, a number of mostly minor bugs have been fixed (but notice that serious build issues were fixed in 2.12.2). See the full list of changes below. You can get it from

[R] R plots pdf() does not allow spotcolors?

2011-04-13 Thread Matthieu Stigler
Hi We are about to publish a book, which contains figures made with R plots. An important detail that we did not take into account is that the book will not be printed in 4 colors (cmyk mode), but only 2 (black +spotcolor). The spotcolor we use is part of the big Pantone family. The problem

Re: [R] MLE where loglikelihood function is a function of numerical solutions

2011-04-13 Thread Kristian Lind
Albyn and others, Thank you for your replies. In order to be more specific I've constructed my program. I know it's long and in some places quite messy. It works until the last part where the log-likelihood function has to be defined and maximized wrt the parameters. The log-likelihood has the

[R] strategy for writing out file with lines header initiated with comment sign

2011-04-13 Thread Mao Jianfeng
Dear all, I have data.frame object in R. I want to export it in tab-delimited file with several lines of header initiated with comment sign (#). I do not know how to do that in R. Could you please give helps on this problem? Thanks in advance. Best, Jian-Feng,

Re: [R] Is there a better way to parse strings than this?

2011-04-13 Thread Dennis Murphy
Hi: Here's one approach: strings - c( A5.Brands.bought...Dulux, A5.Brands.bought...Haymes, A5.Brands.bought...Solver, A5.Brands.bought...Taubmans.or.Bristol, A5.Brands.bought...Wattyl, A5.Brands.bought...Other) slist - strsplit(strings, '\\.\\.\\.') # Conversion to data frame: library(plyr)

Re: [R] The three routines in R that calculate the wilcoxon signed-rank test give different p-values.......which is correct?

2011-04-13 Thread Peter Ehlers
On 2011-04-12 16:57, Michael G Rupert wrote: I have a question concerning the Wilcoxon signed-rank test, and specifically, which R subroutine I should use for my particular dataset. There are three different commands in R (that I'm aware of) that calculate the Wilcoxon signed-rank test;

Re: [R] The three routines in R that calculate the wilcoxon signed-rank test give different p-values.......which is correct?

2011-04-13 Thread peter dalgaard
On Apr 13, 2011, at 01:57 , Michael G Rupert wrote: I have a question concerning the Wilcoxon signed-rank test, and specifically, which R subroutine I should use for my particular dataset. There are three different commands in R (that I'm aware of) that calculate the Wilcoxon signed-rank

Re: [R] Layout within levelplot from the lattice package

2011-04-13 Thread Ian Renner
Hi Dieter, Thank you for that! Your post helped me on my way by introducing me to the padding settings within lattice, and I'm nearly there now. My new problem related to this graph is that I would like to add a polygon to one of the panels, but it seems that my code also adds the

[R] AR(1)

2011-04-13 Thread Alaios
Dear all, I would like to ask you if you know any AR(1) function that can create a sequence of values for different time lags. The AR(1) based on a starting value and with the gaussian error can produce this time lags. Could you please help me find a function that can do and does not depend

[R] FW: [r] how to enclose two xyplot

2011-04-13 Thread Francesco Nutini
Dear R-users, I have to plot two xyplot, and I wish to enclose this two graphs with just one headline, the same x scale, the same grid etc. These parameters should tie in, in order to obtain, visually, a unique graph formed by two xyplot. I try to give an idea: xyplot1: |_|_|_|

Re: [R] How to set the dimension of a matrix correctly?

2011-04-13 Thread Ben Bolker
Lin Pei-Ling barthealin at hotmail.com writes: Hi all, I use kriging to interpolate the precipitation from stations, but the map of this results show lots of stripes. (please see the attachment)I think there's something wrong with the setting of the dimension of this matrix, however, I have

Re: [R] R plots pdf() does not allow spotcolors?

2011-04-13 Thread Ben Bolker
Matthieu Stigler matthieu.stigler at gmail.com writes: Hi We are about to publish a book, which contains figures made with R plots. An important detail that we did not take into account is that the book will not be printed in 4 colors (cmyk mode), but only 2 (black +spotcolor). The

Re: [R] Is there a better way to parse strings than this?

2011-04-13 Thread Hadley Wickham
On Wed, Apr 13, 2011 at 5:18 AM, Dennis Murphy djmu...@gmail.com wrote: Hi: Here's one approach: strings - c( A5.Brands.bought...Dulux, A5.Brands.bought...Haymes, A5.Brands.bought...Solver, A5.Brands.bought...Taubmans.or.Bristol, A5.Brands.bought...Wattyl, A5.Brands.bought...Other)

Re: [R] Is there a better way to parse strings than this?

2011-04-13 Thread Gabor Grothendieck
On Wed, Apr 13, 2011 at 12:07 AM, Chris Howden ch...@trickysolutions.com.au wrote: Hi Everyone, I needed to parse some strings recently. The code I've wound up using seems rather clunky, and I was wondering if anyone had any suggestions on a better way? Basically I do the following: 1)

[R] BackCast and Forecast with stats.arima and forecast.Arima

2011-04-13 Thread Paolo Rossi
Hello everyone, I am experiencng some problems in producing forecasts and backcast from an ARIMA(1,0,0) model. I need to produce an insample backcast and a seasonal normal backcast and forecast. I have a seasonal consumption function. By using actual data I get actual demand. By passing Seasonal

Re: [R] strategy for writing out file with lines header initiated with comment sign

2011-04-13 Thread jim holtman
Here is an outline of how to do it using connections: con - file('/temp/mytemp.txt', 'w') writeLines(c(#comment, # lines, # in the file), con = con) # create some data to be output as 'tab' separated myData - as.data.frame(matrix(letters[1:25], 5)) write.table(myData, file = con, sep = '\t')

Re: [R] R plots pdf() does not allow spotcolors?

2011-04-13 Thread Ted Harding
On 13-Apr-11 12:30:26, Ben Bolker wrote: Matthieu Stigler matthieu.stigler at gmail.com writes: Hi We are about to publish a book, which contains figures made with R plots. An important detail that we did not take into account is that the book will not be printed in 4 colors (cmyk mode),

Re: [R] strategy for writing out file with lines header initiated with comment sign

2011-04-13 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 13/04/11 15:15, jim holtman wrote: Here is an outline of how to do it using connections: con - file('/temp/mytemp.txt', 'w') writeLines(c(#comment, # lines, # in the file), con = con) # create some data to be output as 'tab' separated myData

Re: [R] R plots pdf() does not allow spotcolors?

2011-04-13 Thread Prof Brian Ripley
On Wed, 13 Apr 2011, Ben Bolker wrote: Matthieu Stigler matthieu.stigler at gmail.com writes: Hi We are about to publish a book, which contains figures made with R plots. An important detail that we did not take into account is that the book will not be printed in 4 colors (cmyk mode), but

Re: [R] strategy for writing out file with lines header initiated with comment sign

2011-04-13 Thread Mao Jianfeng
Dear Jim and Rainer, I learned much from you all. It is my first time to experience the functions, like file(), writeLines(), close(). Thanks a lot. Best, Jian-Feng, 2011/4/13 Rainer M Krug r.m.k...@gmail.com: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 13/04/11 15:15, jim holtman

Re: [R] R plots pdf() does not allow spotcolors?

2011-04-13 Thread Ben Bolker
Prof Brian Ripley ripley at stats.ox.ac.uk writes: On Wed, 13 Apr 2011, Ben Bolker wrote: Matthieu Stigler matthieu.stigler at gmail.com writes: Hi We are about to publish a book, which contains figures made with R plots. An important detail that we did not take into account is

Re: [R] MLE where loglikelihood function is a function of numerical solutions

2011-04-13 Thread Berend Hasselman
Questions: 1. why are you defining Bo within a loop? 2. Why are you doing library(nleqslv) within the loop? Doing both those statements outside the loop once is more efficient. In your transdens function you are not using the function argument parameters, why? Shouldn't there be a

Re: [R] R plots pdf() does not allow spotcolors?

2011-04-13 Thread Hadley Wickham
Even so, this would depend on what your publisher/printer requires in what you submit. It would be important to obtain from them a full and exact specification of what they require for colour printing in files submitted to them for printing. No one else has mentioned this, but the publisher

Re: [R] Quiz: Who finds the nicest form of X_1^\prime?

2011-04-13 Thread Karl Ove Hufthammer
Marius Hofert wrote: Haha, I found a hack (using the letter l): plot(0,0,main=expression(italic(X)[1]^bolditalic(l))) Why cheat when you can use a *real* prime character: plot(0, 0, main=expression(paste(italic(X)[1],\u2032))) -- Karl Ove Hufthammer

Re: [R] Merge matrix

2011-04-13 Thread Pankaj Barah
Hi Kevin, Sorry.it is not Bt ? A and B are two independent Matrices with equal number rows and different number of columns. dim (A) [1] 30380 104 dim(B) [1] 3038063 I want to combine both A and B to matrix C wheredim(C) [1] 30380 167 So I got the answer C-cbind(A,B) Thanks and

[R] iterative method in R software

2011-04-13 Thread rvohen
In confirmatory factor analysis,we need to estimate unknown parameters . I read a book about it,which needs iterative method to estimate parameters,but I don't know it.Does someone konw it?Thank u! -- View this message in context:

Re: [R] split string into individual valus while reading in R

2011-04-13 Thread Ram H. Sharma
Sorry NULL in V8 should be corrected as NA On Wed, Apr 13, 2011 at 7:33 AM, Ram H. Sharma sharma.ra...@gmail.comwrote: It looks like my question is not clear, I have not get any suggestion, yet let me reiterate my problem: My data looks like this to be read from a text file. As I provided

Re: [R] 1 continuous non-normal variable ~ 4 factors + 1 continuous covariate (with interactions)

2011-04-13 Thread Alal
Thanks, I guess I can do that, and it actually seem appropriate for one of my variable. But can you do post-hoc tests on a survival analysis? Use contrasts or something? -- View this message in context:

[R] Find characters in a matrix and return a TRUE-FALSE vector

2011-04-13 Thread Vitrifizierung
I have the following problem: My data is a matrix of multiple columns and rows. The column I am interested in looks like that (I think it is a column in a matrix that contains a vector each?): [[1]] [1] A B C [4] D E [[2]] [1] A D E [[3]] [1] C E F [4] G I now want to look for a special word

Re: [R] split string into individual valus while reading in R

2011-04-13 Thread Ram H. Sharma
It looks like my question is not clear, I have not get any suggestion, yet let me reiterate my problem: My data looks like this to be read from a text file. As I provided earlier the A, B, and H in V4 column has much longer chain. V1 V2 V3V4 1_1ch1 0.0 AHAH 1_2

[R] ddply and nlminb

2011-04-13 Thread Robert Clement
Hello I'm new to R (one week) so please excuse any obvious mistakes in my code or posting. I am attempting to fit a non linear function defining the relationship between dependent variable A and the variables PAR and T grouped by the condition Di. The following steps are taken in the

[R] Boxplot with two or more Y vectors

2011-04-13 Thread Håvard Wahl Kongsgård
Hi, for a simple boxplot in R, in the formula is it possible to include two or more Y vectors directly. Or is that only possibility by aggregating the data first? -- Håvard Wahl Kongsgård Peace Research Institute Oslo (PRIO) http://havard.security-review.net/ [[alternative HTML

[R] ordinal predictor in anova

2011-04-13 Thread Vincent Staszewski
Hi, I have a dataset with a continuous response variable and, among other predictors, an ordinal variable. Here is what it could look like treatment - factor(rep(c(AA, AC, AD,AE, AB), each = 10)) length - c(75, 67, 70, 75, 65, 71, 67, 67, 76, 68, 57, 58, 60, 59, 62, 60,

Re: [R] Find characters in a matrix and return a TRUE-FALSE vector

2011-04-13 Thread Jorge Ivan Velez
Hi Nina, You might try sapply(yourdata, function(x) any(x == C)) See ?sapply for more details. HTH, Jorge On Wed, Apr 13, 2011 at 7:17 AM, Vitrifizierung wrote: I have the following problem: My data is a matrix of multiple columns and rows. The column I am interested in looks like

[R] Overcoming warning in package zoo

2011-04-13 Thread Rita Carreira
Dear R users,I have a long program that I am trying to run--I am using RStudio as my interface with R. The pieces of the program run well individually but when I try to run everything in sequence it bogs down because of a warning after using rollmax from package zoo. Here is the warning: In

Re: [R] Overcoming warning in package zoo

2011-04-13 Thread Gabor Grothendieck
On Wed, Apr 13, 2011 at 10:38 AM, Rita Carreira ritacarre...@hotmail.com wrote: Dear R users,I have a long program that I am trying to run--I am using RStudio as my interface with R. The pieces of the program run well individually but when I try to run everything in sequence it bogs down

Re: [R] Removing objects and clearing memory

2011-04-13 Thread Jim Silverton
Hey guys thanks very much for al your responses. It was very helpful. Jim On Tue, Apr 12, 2011 at 6:59 PM, Peter Ehlers ehl...@ucalgary.ca wrote: On 2011-04-12 15:52, seeliger.c...@epamail.epa.gov wrote: How do I remove all objects except one in R? rm(list=ls()) #will remove ALL objects

[R] Wilcoxon rank sum in unbalanced design

2011-04-13 Thread netrunner
Hi everyone! I need to perform a Wilcoxon rank sum test, but I have some ties and the groups have different size also. When I deal with ties I use the wilcox.exact function, how can I solve the different size problem using this function? thanks net -- View this message in context:

[R] Decimals in R/SQL

2011-04-13 Thread Rachel Licata
Hello, When I am writing in sqldf or RSQLite I lose the decimals in my matrix. The only way I can get decimals is by multiplying by 1.0, etc. I have tried manipulating the options, but it is only effective once I multiply by 1.. I appreciate any suggestions! Thanks! Example: z -

[R] glmnet

2011-04-13 Thread Janina Hemmersbach
Hello, I´m trying to in install the package 'glmnet' but I get always the error massage package ‘Matrix’ is not available. I search on you site, but I coundn´t find the package there either. Is their still a package called Matrix? Or how can I use glmnet? Thank You in advance. Kind regards

Re: [R] split string into individual valus while reading in R

2011-04-13 Thread Upton, Stephen (Steve) (CIV)
Hi Ram, Try this on your V4: d - yourdf$V4 unlist(lapply(1:nchar(d),function(x) substr(d,x,x))) HTH steve -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Ram H. Sharma Sent: Wednesday, April 13, 2011 7:34 AM To:

Re: [R] R plots pdf() does not allow spotcolors?

2011-04-13 Thread Matthieu Stigler
Jim Thanks for your feedback! The problem is that the people those responsible for layout are us... We are doing the book in Latex, and till now did not need any other software. But I am scared we will need use kind of Indesign co softwares to be able to use our R plots, since R can't

Re: [R] glmnet

2011-04-13 Thread Ben Bolker
Janina Hemmersbach janina.hemmersbach at scai.fraunhofer.de writes: Hello, I´m trying to in install the package 'glmnet' but I get always the error massage package ‘Matrix’ is not available. I search on you site, but I coundn´t find the package there either. Is their still a package

[R] plotting line graphs for output from crosstabs function

2011-04-13 Thread taby gathoni
Hi R-users, This is a generic question, is there a way to plot a line graph for the output from crosstable function? one of the inputs to the crosstab function is categorical. Taby -- [[alternative HTML version deleted]] __

Re: [R] glmnet

2011-04-13 Thread Alexander Engelhardt
Am 13.04.2011 16:58, schrieb Janina Hemmersbach: Hello, I´m trying to in install the package 'glmnet' but I get always the error massage package ‘Matrix’ is not available. I search on you site, but I coundn´t find the package there either. Is their still a package called Matrix? Or how can I

[R] How to get the names of all the packages that depend on a give package?

2011-04-13 Thread thmsfuller...@gmail.com
Dear All, I want to check what packages depends on a given package. For example, glmnet depends on Matrix. I want get the names of all the packages that depend on Matrix on CRAN. Is there a way to do so? Thanks! library(glmnet) Loading required package: Matrix Loading required package: lattice

Re: [R] Decimals in R/SQL

2011-04-13 Thread jim holtman
You at least have to provide a subset of 'ss09' so we can see what the original data looks like. I have not had any problems with decimals in using sqldf. x - as.data.frame(matrix(runif(100)*100, 10)) x$key - sample(1:3, 10, TRUE) require(sqldf) xsum - sqldf(' + select key, sum(V1 * V2)

Re: [R] R plots pdf() does not allow spotcolors?

2011-04-13 Thread Barry Rowlingson
2011/4/13 Matthieu Stigler matthieu.stig...@gmail.com: Jim Thanks for your feedback! The problem is that the people those responsible for layout are us... We are doing the book in Latex, and till now did not need any other software. But I am scared we will need use kind of Indesign co

Re: [R] R plots pdf() does not allow spotcolors?

2011-04-13 Thread Jeremy Hetzel
Scribus claims to be able to convert RGB/CMYK colors to spot colors: http://documentation.scribus.net/index.php/Spot_Colors I've never used Scribus, but it's floss. Jeremy __ R-help@r-project.org mailing list

Re: [R] Decimals in R/SQL

2011-04-13 Thread Rachel Licata
Thanks Jim. It appears the issue may only be in SQLite. SS09 is a large table and here is a subset of the variables I am working with. SS09 ST AGEPPWGTP 33323130 130 33324110

Re: [R] R plots pdf() does not allow spotcolors?

2011-04-13 Thread Barry Rowlingson
On Wed, Apr 13, 2011 at 5:26 PM, Jeremy Hetzel jthet...@gmail.com wrote: Scribus claims to be able to convert RGB/CMYK colors to spot colors: http://documentation.scribus.net/index.php/Spot_Colors I've never used Scribus, but it's floss. Scribus can import output from R's svg driver (with at

Re: [R] Decimals in R/SQL

2011-04-13 Thread jim holtman
The problem is that you data is 'integer' and I assume that the database is keeping everything integer. You can do what you are doing, or convert to 'numeric': x - read.table(textConnection( ST AGEP PWGTP + 33323130

Re: [R] How to get the names of all the packages that depend on a give package?

2011-04-13 Thread Dennis Murphy
Hi: Here's one way, assuming Matrix (or whichever package you want to investigate) is installed on your system: u - installed.packages() u['Matrix', 'Depends'] [1] R (= 2.10.0), stats, methods, utils, lattice HTH, Dennis On Wed, Apr 13, 2011 at 8:57 AM, thmsfuller...@gmail.com

Re: [R] How to get the names of all the packages that depend on a give package?

2011-04-13 Thread Gabor Grothendieck
On Wed, Apr 13, 2011 at 11:57 AM, thmsfuller...@gmail.com thmsfuller...@gmail.com wrote: Dear All, I want to check what packages depends on a given package. For example, glmnet depends on Matrix. I want get the names of all the packages that depend on Matrix on CRAN. Is there a way to do so?

Re: [R] B %*% t(B) = R , then solve for B

2011-04-13 Thread Doran, Harold
Correct. In the example I gave you yesterday, I used a different matrix, but showed this solution because it also answered the other question you had about doing it on non-square matrices. Of course, Spencer Graves also gave a very useful answer suggesting QR decomposition. I also gave you

Re: [R] R plots pdf() does not allow spotcolors?

2011-04-13 Thread Jeremy Hetzel
By the way, I had trouble importing PDFs into Scribus 1.3.3. However, Scribus 1.4.0rc3 had no problem opening multi-page PDFs, assuming the appropriate Ghostscript was also installed (I'm on Windows 7 at the moment). So Matthieu might be able to combine all of his figures into a single PDF,

[R] latex, eps graphics and transparent colors

2011-04-13 Thread Michael Friendly
I have a diagram to be included in latex, where all my figures are .eps graphics (so pdflatex is not an option) and I want to achieve something like the following: three concentric filled circles varying in lightness or saturation. It is easiest to do this using transparency, but in my test

Re: [R] Fwd: CRAN problem with plyr-1.4.1

2011-04-13 Thread Uwe Ligges
On 12.04.2011 17:29, Hadley Wickham wrote: Then, can we have the ERROR message, please? Otherwise the only explanation I can guess is that a mirror grabs the contents of a repository exactly in the second the repository is updated and that is unlikely, particularly if more than one mirror is

Re: [R] Previously attainable fisher's exact test

2011-04-13 Thread Jim Silverton
I have a matrix say, 1 4 23 30 and I want to find the previously attainable fisher's exact test p-value. Is there a way to do this in R? -- Thanks, Jim. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] How to get the names of all the packages that depend on a give package?

2011-04-13 Thread Ben Bolker
Dennis Murphy djmuser at gmail.com writes: Hi: Here's one way, assuming Matrix (or whichever package you want to investigate) is installed on your system: u - installed.packages() u['Matrix', 'Depends'] [1] R (= 2.10.0), stats, methods, utils, lattice HTH, Dennis Or, if it's

Re: [R] Wilcoxon rank sum in unbalanced design

2011-04-13 Thread peter dalgaard
On Apr 13, 2011, at 17:07 , netrunner wrote: Hi everyone! I need to perform a Wilcoxon rank sum test, but I have some ties and the groups have different size also. When I deal with ties I use the wilcox.exact function, how can I solve the different size problem using this function? What

Re: [R] Removing objects and clearing memory

2011-04-13 Thread Jim Silverton
On Wed, Apr 13, 2011 at 11:12 AM, Jim Silverton jim.silver...@gmail.comwrote: Hey guys thanks very much for al your responses. It was very helpful. Jim On Tue, Apr 12, 2011 at 6:59 PM, Peter Ehlers ehl...@ucalgary.ca wrote: On 2011-04-12 15:52, seeliger.c...@epamail.epa.gov wrote: How

[R] Data with different time lines for one analysis

2011-04-13 Thread Oliver
Hello I have one data set that is in the range from 1950 to 2009 with yearly values (one value per year), and another one from 1959 to 1983 with 364 values, which means 15 values per year. Now I want to use both sets in some analysis, one for example ccf, but also other analyses. What would you

Re: [R] R plots pdf() does not allow spotcolors?

2011-04-13 Thread baptiste auguie
Hi, I may be wrong, but I have the impression that tikz (a LaTeX drawing package) can handle spot colors (that's what Google seemed to tell me [*]). If this is the case you could output R graphics using the tikzDevice package, post-process the output (readable, plain text file), and eventually

Re: [R] R plots pdf() does not allow spotcolors?

2011-04-13 Thread mat
Barry, thanks a lot for checking for this!! Find below answers. Le 13. 04. 11 18:26, Barry Rowlingson a écrit : 2011/4/13 Matthieu Stiglermatthieu.stig...@gmail.com: Jim Thanks for your feedback! The problem is that the people those responsible for layout are us... We are doing the book in

[R] Line plots in base graphics

2011-04-13 Thread Hadley Wickham
Am I missing something obvious on how to draw multi-line plots in base graphics? In ggplot2, I can do: data(Oxboys, package = nlme) library(ggplot2) qplot(age, height, data = Oxboys, geom = line, group = Subject) But in base graphics, the best I can come up with is this: with(Oxboys,

Re: [R] latex, eps graphics and transparent colors

2011-04-13 Thread Ben Bolker
Michael Friendly friendly at yorku.ca writes: I have a diagram to be included in latex, where all my figures are .eps graphics (so pdflatex is not an option) and I want to achieve something like the following: three concentric filled circles varying in lightness or saturation. It is

Re: [R] Line plots in base graphics

2011-04-13 Thread Ben Bolker
Hadley Wickham hadley at rice.edu writes: Am I missing something obvious on how to draw multi-line plots in base graphics? In ggplot2, I can do: data(Oxboys, package = nlme) library(ggplot2) qplot(age, height, data = Oxboys, geom = line, group = Subject) But in base graphics, the

Re: [R] latex, eps graphics and transparent colors

2011-04-13 Thread Thomas Lumley
On Thu, Apr 14, 2011 at 5:30 AM, Michael Friendly frien...@yorku.ca wrote: I have a diagram to be included in latex, where all my figures are .eps graphics (so pdflatex is not an option) You could use the pdf() device and then use pdf2ps to convert to PostScript. and I want to achieve

Re: [R] Decimals in R/SQL

2011-04-13 Thread Rachel Licata
Thanks again Jim - that is really helpful and I apologize that I am new to R. How can I convert to numeric in SQL and when I am working on a table in a database? The file is huge so that is why I am using SQL and the database to work through it. Thanks! -Original Message- From: jim

Re: [R] Decimals in R/SQL

2011-04-13 Thread Gabor Grothendieck
On Wed, Apr 13, 2011 at 4:34 PM, Rachel Licata rach...@kff.org wrote: Thanks again Jim - that is really helpful and I apologize that I am new to R.  How can I convert to numeric in SQL and when I am working on a table in a database?  The file is huge so that is why I am using SQL and the

Re: [R] problem with all/all.equal

2011-04-13 Thread MacQueen, Don
The help pages for identical() and all.equal() have information that will make it clear why they don't do what you want. In the meantime, I tend to use a construct such as: length(unique(x))==1 But be careful if x is not a vector. No doubt there are other ways. -Don -- Don MacQueen

Re: [R] FW: [r] how to enclose two xyplot

2011-04-13 Thread baptiste auguie
Hi, Have you tried ?c.trellis in the latticeExtra package? HTH, baptiste On 13 April 2011 23:36, Francesco Nutini nutini.france...@gmail.com wrote:  Dear R-users, I have to plot two xyplot, and I wish to enclose this two graphs with just one headline, the same x scale, the same grid etc.

Re: [R] latex, eps graphics and transparent colors

2011-04-13 Thread Ben Bolker
Thomas Lumley tlumley at uw.edu writes: On Thu, Apr 14, 2011 at 5:30 AM, Michael Friendly friendly at yorku.ca wrote: I have a diagram to be included in latex, where all my figures are .eps graphics (so pdflatex is not an option) You could use the pdf() device and then use pdf2ps to

Re: [R] Line plots in base graphics

2011-04-13 Thread Hadley Wickham
On Wed, Apr 13, 2011 at 2:58 PM, Ben Bolker bbol...@gmail.com wrote: Hadley Wickham hadley at rice.edu writes: Am I missing something obvious on how to draw multi-line plots in base graphics? In ggplot2, I can do: data(Oxboys, package = nlme) library(ggplot2) qplot(age, height, data =

Re: [R] Decimals in R/SQL

2011-04-13 Thread Seth Falcon
On Wed, Apr 13, 2011 at 1:34 PM, Rachel Licata rach...@kff.org wrote: Thanks again Jim - that is really helpful and I apologize that I am new to R.  How can I convert to numeric in SQL and when I am working on a table in a database?  The file is huge so that is why I am using SQL and the

Re: [R] File Save As...

2011-04-13 Thread Duncan Murdoch
On 13/04/2011 5:20 PM, Gene Leynes wrote: as of right now x = function(a) print(a) attr(x, srcref) returns NULL in 2.13, am I doing something wrong? There's a limitation to the debug information: it can't be attached to a function whose body consists of a single simple expression

[R] for loop performance

2011-04-13 Thread Barth B. Riley
Dear list I am running some simulations in R involving reading in several hundred datasets, performing some statistics and outputting those statistics to file. I have noticed that it seems that the time it takes to process of a dataset (or, say, a set of 100 datasets) seems to take longer as

Re: [R] File Save As...

2011-04-13 Thread Gene Leynes
That's very interesting. It's not what I was thinking about or expecting, but I'm glad to know about it (and it will probably be useful at some point). Initially, I was asking for a method to find out the name of the current script. I mean, the current script that you're editing / running.

Re: [R] area under roc curve

2011-04-13 Thread Frank Harrell
ROC area does not measure goodness of prediction but does measure pure predictive discrimination. The generalization of the ROC area is the C-index for continuous or censored Y. See for example the rcorr.cens function in the Hmisc package. Frank agent dunham wrote: Dear all, I want to

Re: [R] is this an ANOVA ?

2011-04-13 Thread Bill.Venables
You probably want to do something like this: fm - lm(y ~ x, MD) anova(fm) Analysis of Variance Table Response: y Df Sum Sq Mean Sq F valuePr(F) x 2250 125.0 50 1.513e-06 Residuals 12 30 2.5 Answers to questions: 1. No. 2. Yes. (whoever you are).

Re: [R] Line plots in base graphics

2011-04-13 Thread Ben Bolker
Hadley Wickham hadley at rice.edu writes: On Wed, Apr 13, 2011 at 2:58 PM, Ben Bolker bbolker at gmail.com wrote: Hadley Wickham hadley at rice.edu writes: Am I missing something obvious on how to draw multi-line plots in base graphics? [snip] But in base graphics, the best I can

Re: [R] Line plots in base graphics

2011-04-13 Thread baptiste auguie
On 14 April 2011 07:51, Hadley Wickham had...@rice.edu wrote: Am I missing something obvious on how to draw multi-line plots in base graphics? In ggplot2, I can do: It appears you've been infected with what I like to call the Dijkstra syndrome [*], quoting The tools we use have a profound

Re: [R] Previously attainable fisher's exact test

2011-04-13 Thread Ted Harding
On 13-Apr-11 17:40:53, Jim Silverton wrote: I have a matrix say, 1 4 23 30 and I want to find the previously attainable fisher's exact test p-value. Is there a way to do this in R? -- Thanks, Jim. I do not understand what you mean by previously attainable. As far as that

Re: [R] Density estimation and plots

2011-04-13 Thread Jim Silverton
I have two columns of data, one is a subset of the other. All the data lie beteen 0 and 1 inclusive. I want to fit both densities on the same graph. I would also like the ability to extract the fitted values of both smoothed density (using the best method of course). For example, if h = c(

[R] add names to data frame

2011-04-13 Thread Radhouane Aniba
Hi, I have a vector V of values I used to create a distance matrix using dist() function with diag=TRUE and upper=TRUE parameters. I would like to assign names in another vector on top of each column instead of 1 2 3 4 ... How can we do that ? is the distance matrix generated a data frame or a

[R] any package for Heckman selection model when the outcome equation also probit ?

2011-04-13 Thread Yong Wang
Hi, all Can anybody hint if there is extant package or function to deal with Heckman selection model where the outcome model is also probit? In stata, it is called heckprob. Thank you yong __ R-help@r-project.org mailing list