Re: [R] installing Rgraphviz

2011-07-21 Thread Prof Brian Ripley
On Wed, 20 Jul 2011, Jeff Newmiller wrote: This is off-topic, and extremely easy to find an answer to using Google. It is also in the rw-FAQ. --- Jeff Newmiller The . . Go Live... DCN:jdnew...@dcn.davis.ca.us

[R] Getting Started

2011-07-21 Thread Varsha Agrawal
I am a new user and want to learn R from the most basic level. Suggest me a reading or a link. Thanks Varsha P.S. I would appreciate if you could also send me the link where I can read questions and answers posted by others. [[alternative HTML version deleted]]

Re: [R] Bounding ellipse for any set of points

2011-07-21 Thread Andy Lyons
The mvee() function is intended to be released under the BSD license. Copyright (c) 2009, Nima Moshtagh Copyright (c) 2011, Andy Lyons All rights reserved. http://www.opensource.org/licenses/bsd-license.php Redistribution and use in source and binary forms, with or without modification, are

[R] Latex Table Help on R

2011-07-21 Thread Jim Silverton
Hello everyone, Peter (see my earlier post) recommended the following script for finding the means and standard deviations and putting them in table form. However, I would like the standard deviations under the means in brackets. Can anyone check this code to see how this can be adjusted?

Re: [R] installing Rgraphviz

2011-07-21 Thread Søren Højsgaard
Hardly an R question, but a google search with the string change the path variable windows 7 gave quite a few hits, for example http://geekswithblogs.net/renso/archive/2009/10/21/how-to-set-the-windows-path-in-windows-7.aspx Regards Søren Fra:

[R] R versions and PostScript files

2011-07-21 Thread pilchat
Dear R users, I have a desktop computer and a laptop, both of them with Ubuntu Lucid. The former has R2.10 installed from Ubuntu repositories (this is the most recent version in the repositories), while the latter has R2.13 from the CRAN repositories. I noticed that postscript files generated

Re: [R] Latex Table Help on R

2011-07-21 Thread Mark Difford
On Jul 21, 2011 Jim Silverton wrote: However, I would like the standard deviations under the means in brackets. Can anyone check this code to see how this can be adjusted? Jim, You need to use underset, a LaTeX command. The bare-bones call is $\underset{}{}$, where the underset value goes in

Re: [R] Grouping columns

2011-07-21 Thread Geophagus
Hi @ all, both possibilities are working very fine. Thanks a lot for the fast help! Best Greetinx from the Earth Eater Geophagus -- View this message in context: http://r.789695.n4.nabble.com/Grouping-columns-tp3681018p3683076.html Sent from the R help mailing list archive at Nabble.com.

[R] add label attribute to objects?

2011-07-21 Thread Liviu Andronic
Dear all I know that the R way of documenting things is to work on your project in package development mode, and document each object (such as data frames) in a *.Rd files. This should work for gurus. What about a simpler way to document things, geared for mere mortals? I was thinking of a

Re: [R] Getting Started

2011-07-21 Thread Paul Hiemstra
On 07/21/2011 05:16 AM, Varsha Agrawal wrote: I am a new user and want to learn R from the most basic level. Suggest me a reading or a link. Googling 'R introduction' lead to a great number of interesting links. Also take a look at CRAN, primarily the documentation sections. Books related to

Re: [R] RES: Question about converting list items in matrix

2011-07-21 Thread Vickie S
Hi Filipe and David, Thanks both of you for the suggestion. It works perfect. best, - Vickie Subject: RES: [R] Question about converting list items in matrix Date: Wed, 20 Jul 2011 18:39:45 -0300 From: filipe.bote...@vpar.com.br To: is...@live.com; r-help@r-project.org This message and its

Re: [R] R on Multicore for Linux

2011-07-21 Thread Paul Hiemstra
I have good experiences with the foreach package, available on cran. It includes some tutorials which might help you. cheers, Paul On 07/20/2011 11:44 PM, Madana_Babu wrote: Hi all, I have R installed on a box, which is running on a machine with 16 core and Redhat - Linux. I am handling

Re: [R] Fwd: Help please

2011-07-21 Thread peter dalgaard
On Jul 20, 2011, at 13:33 , Rolf Turner wrote: On 20/07/11 21:08, Simon Knapp wrote: Hi All, This is not really an R question but a statistical one. If someone could either give me the brief explanation or point me to a reference that might help, I'd appreciate it. I want to estimate

Re: [R] Getting Started

2011-07-21 Thread Rainer Schuermann
cran.r-project.org/doc/manuals/R-intro.pdf cran.r-project.org/doc/contrib/Paradis-rdebuts_en.pdf cran.r-project.org/doc/contrib/Verzani-SimpleR.pdf cran.r-project.org/doc/contrib/Lemon-kickstart/kr_intro.html https://stat.ethz.ch/mailman/listinfo/r-help On Thursday 21 July 2011 10:46:43 Varsha

Re: [R] R on Multicore for Linux

2011-07-21 Thread Rainer M Krug
On Thu, Jul 21, 2011 at 1:44 AM, Madana_Babu madana_b...@infosys.comwrote: Hi all, I have R installed on a box, which is running on a machine with 16 core and Redhat - Linux. I am handling huge (size of dataset will be 5 GB) dataset. Lets assume that my data is in the form of structured

Re: [R] Coercing Logical array to Numeric array

2011-07-21 Thread Mitra, Sumona
Dear all, Thank you so much for your help. Best, Sumona __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal,

Re: [R] multiple plots in single frame: 2 upper, 1 lower

2011-07-21 Thread Gavin Simpson
On Wed, 2011-07-20 at 23:38 +1200, Rolf Turner wrote: On 20/07/11 11:07, DrCJones wrote: Hi, par(mfrow = c(2,2)) will create a 2x2 window that I can use to plot 4 diferent figures in: [plot1 plot2] [plot3 plot4] But how can do 3 so that the bottom spans the width of the upper

Re: [R] multiple plots in single frame: 2 upper, 1 lower

2011-07-21 Thread DrCJones
Layout did it! Thanks guys :) -- View this message in context: http://r.789695.n4.nabble.com/multiple-plots-in-single-frame-2-upper-1-lower-tp3679574p3683144.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

[R] Time Series Analysis and Mining with R - slides in PDF

2011-07-21 Thread Yanchang Zhao
Hi Slides of my talk on Time Series Analysis and Mining with R at Canberra R Users Group on 18 July are available at http://www.rdatamining.com/docs. It presents time series decomposition, forecasting, clustering and classification with R code examples. Regards -- Yanchang Zhao PhD, Data Miner

[R] Printing the loop number for each iteration

2011-07-21 Thread Bogaso Christofer
Hi all, I have a lengthy 'for' loop and for each loop I want to track the iteration number that is currently going on. For this, I have tried following: for (i in 1:10) { + DumDat - rnorm(1000) + cat(iteration:, i, \n) + } iteration: 1 iteration: 2 iteration: 3 iteration: 4

Re: [R] Printing the loop number for each iteration

2011-07-21 Thread Jim Holtman
if using the GUI, turn off buffering, or use 'flush.console()' after 'cat'. Sent from my iPad On Jul 21, 2011, at 7:34, Bogaso Christofer bogaso.christo...@gmail.com wrote: Hi all, I have a lengthy 'for' loop and for each loop I want to track the iteration number that is currently going on.

Re: [R] Grofit

2011-07-21 Thread Roland Sookias
Just to say, I got this solved. On Wed, Jul 20, 2011 at 7:55 PM, Roland Sookias r.sook...@gmail.com wrote: Hi Is it possible to use grofit to get the AIC of several (e.g. two) growth models and compare both these and model parameters? All I can get it to do so far is return parameters for a

Re: [R] R versions and PostScript files

2011-07-21 Thread Ted Harding
On 21-Jul-11 07:23:54, pilchat wrote: Dear R users, I have a desktop computer and a laptop, both of them with Ubuntu Lucid. The former has R2.10 installed from Ubuntu repositories (this is the most recent version in the repositories), while the latter has R2.13 from the CRAN repositories.

[R] How to convert 3-digits hours

2011-07-21 Thread 이원재
Hi, all Here is what I try to do. strptime('20110101 0900',%Y%m%d %H%M) [1] 2011-01-01 09:00:00 strptime('20110101 900',%Y%m%d %H%M) [1] NA If I have a 3-digit hour like '900', please show me how to convert it to 9:00:00. Thank you in advance. Wonjae [[alternative HTML version

Re: [R] R versions and PostScript files

2011-07-21 Thread pilchat
Hi Ted, the two ps files are generated using exactly the same script. For example: -- setEPS() postscript (file=volc.eps,width=5,height=4) image(volcano) dev.off() -- With R2.10 I get a file with size 182K, while R2.13 gives a file of 186K. I am

Re: [R] R versions and PostScript files

2011-07-21 Thread Duncan Murdoch
On 11-07-21 3:23 AM, pilchat wrote: Dear R users, I have a desktop computer and a laptop, both of them with Ubuntu Lucid. The former has R2.10 installed from Ubuntu repositories (this is the most recent version in the repositories), while the latter has R2.13 from the CRAN repositories. I

[R] Changing Y axis in R

2011-07-21 Thread SamiC
Hi, So I am trying to plot my results of a model. what i have is the majority of the data between the values of 0 and 30, then one outlier at 80 and another at 130. the model plots a nice line through the data between 0 to 30, however given the outliers you cant seen this unless you change the

Re: [R] Changing a matrix based on eigen value

2011-07-21 Thread David Winsemius
On Jul 21, 2011, at 12:22 AM, B. Jonathan B. Jonathan wrote: Thanks David for your pointer. Here my original matrix is VCV matrix which is the utmost important matrix in finance. However in reality what happens is that due to incomplete data. lot of missing values (or some other problems)

Re: [R] Changing Y axis in R

2011-07-21 Thread David Winsemius
On Jul 21, 2011, at 9:42 AM, SamiC wrote: Hi, So I am trying to plot my results of a model. what i have is the majority of the data between the values of 0 and 30, then one outlier at 80 and another at 130. the model plots a nice line through the data between 0 to 30, however given the

Re: [R] Latex Table Help on R

2011-07-21 Thread Peter Ehlers
On 2011-07-20 23:50, Jim Silverton wrote: Hello everyone, Peter (see my earlier post) recommended the following script for finding the means and standard deviations and putting them in table form. However, I would like the standard deviations under the means in brackets. Can anyone check this

Re: [R] Different result of multiple regression in R and SPSS

2011-07-21 Thread David Winsemius
On Jul 19, 2011, at 7:19 PM, J. wrote: @Dimitri: I tried to enter it as numeric and still got the same outcome. I still wonder if there is any way to get the same result from both programs. @David, Bert: Yes, I found that the gender coefficient is R is exactly twice that of the one from

Re: [R] Bootstrap

2011-07-21 Thread Matt Shotwell
In order to apply the bootstrap, you must resample, uniformly at random from the independent units of measurement in your data. Assuming that these represent the rows of 'data', consider the following: est - function(y, x, obeta = c(1,1), verbose=FALSE) { n - length(x) X - cbind(rep(1,

[R] Error: bad index in plotmo functions for MARS model (package earth)

2011-07-21 Thread Cleber N.Borges
Hello all useRs, I am tring make a simple surface plot ( 2 by 2 terms of a MARS model (with earth package) but I get the follow error message: plotmo( mars ) Error: bad index (missing column in x?) I don't no how to workround this... :-( I thanks in advanced by some help! Thanks. Cleber

Re: [R] R versions and PostScript files

2011-07-21 Thread Ted Harding
On 21-Jul-11 13:24:32, Duncan Murdoch wrote: On 11-07-21 3:23 AM, pilchat wrote: Dear R users, I have a desktop computer and a laptop, both of them with Ubuntu Lucid. The former has R2.10 installed from Ubuntu repositories (this is the most recent version in the repositories), while the

[R] squared pie chart - is there such a thing?

2011-07-21 Thread Dimitri Liakhovitski
Hello! It's a shoot in the dark, but I'll try. If one has a total of 100 (e.g., %), and three components of the total, e.g., mytotal=data.frame(x=50,y=30,z=20), - one could build a pie chart with 3 sectors representing x, y, and z according to their proportions in the total. I am wondering if it's

Re: [R] squared pie chart - is there such a thing?

2011-07-21 Thread Sarah Goslee
It's more complex than what you describe, but what about a mosaic plot? http://conprogram.weebly.com/program-schedule.html They're very useful, and much better than pie charts because they don't rely on the visual estimation of angles, something people aren't very good at. Sarah On Thu, Jul 21,

Re: [R] squared pie chart - is there such a thing?

2011-07-21 Thread Hadley Wickham
This is called a squarified pie chart or a waffle chart (if you want to keep the food metaphor going): http://eagereyes.org/communication/Engaging-readers-with-square-pie-waffle-charts.html Hadley On Thu, Jul 21, 2011 at 10:29 AM, Dimitri Liakhovitski dimitri.liakhovit...@gmail.com wrote:

[R] Can you save an installed library to an .RData file?

2011-07-21 Thread Gene Leynes
It occurred to me that it would be nice to be able to save a library that I have installed an loaded into my workspace for easy sharing. I suppose it might not work if someone's on a different version of R, but usually since the library is just a collection of functions, it seems plausible that

Re: [R] Can you save an installed library to an .RData file?

2011-07-21 Thread Duncan Murdoch
On 21/07/2011 11:37 AM, Gene Leynes wrote: It occurred to me that it would be nice to be able to save a library that I have installed an loaded into my workspace for easy sharing. I suppose it might not work if someone's on a different version of R, but usually since the library is just a

Re: [R] squared pie chart - is there such a thing?

2011-07-21 Thread Dimitri Liakhovitski
I tried the mosaic chart: mytotal=data.frame(x=50,y=30,z=20) require(stats) mosaicplot(mytotal1) It's good, but it only creates rectangles that are stacked on top of each other, which is not exactly what I was looking for. Is there a R package for waffle chart? I tried help.search(waffle) and

Re: [R] Can you save an installed library to an .RData file?

2011-07-21 Thread Gene Leynes
Duncan, Makes perfect sense, thank you very much. Gene On Thu, Jul 21, 2011 at 10:46 AM, Duncan Murdoch murdoch.dun...@gmail.comwrote: On 21/07/2011 11:37 AM, Gene Leynes wrote: It occurred to me that it would be nice to be able to save a library that I have installed an loaded into my

Re: [R] squared pie chart - is there such a thing?

2011-07-21 Thread Sarah Goslee
On Thu, Jul 21, 2011 at 12:06 PM, Dimitri Liakhovitski dimitri.liakhovit...@gmail.com wrote: I tried the mosaic chart: mytotal=data.frame(x=50,y=30,z=20) require(stats) mosaicplot(mytotal1) It's good, but it only creates rectangles that are stacked on top of each other, which is not

Re: [R] squared pie chart - is there such a thing?

2011-07-21 Thread Dimitri Liakhovitski
Thanks a lot, Sarah. I am definitely going to explore. A quick question about mosaicplot(matrix(c(50, 30, 20, 0), 2, 2)) mosaicplot(matrix(c(0, 50, 20, 30), 2, 2)) What are the numbers that appear on the graphs (2.1, 2.2,1.1,1.2)? Dimitri On Thu, Jul 21, 2011 at 12:20 PM, Sarah Goslee

[R] About Validation of R

2011-07-21 Thread Daniel Ponce
Dear Sr. of R-project: In the document R: Regulatory Compliance and Validation Issues. A guidance Document for the Use of R in Regulated Clinical Trial Environments, in the point 6.3 say that exist a set of validation test, that are localized in the test subdirectory. I search the place in the

[R] nested loop for

2011-07-21 Thread paloma ruiz benito
Hi everyone, I have been working some days in a nested loop in R but I can't find the solution. I have a data.frame with an unique ID for individuals and unique ID for different stands, for each indiviadual I have a dbh record and a SBA (stand basal area) field. Pma-rep (1:40) P-seq(1,4,

[R] Lattice: place ticks only on y-axis

2011-07-21 Thread marcel
I am using lattice for a bar plot, having a little trouble removing ticks, tick labels from x-axis, but keeping them on the y-axis. I looked around quite a bit (http://tolstoy.newcastle.edu.au/R/e7/help/09/06/1733.html, help pages, etc), tried variations of scales = list(alternating = c(0,0),

[R] Survdiff for multiple comparisons

2011-07-21 Thread Danielle Zoellner
Hello all- I am doing a survival analysis for two species of invasive plants I outplanted to edges and interiors of island and mainland sites in a local reservoir. I am using the KM estimate and had no problem doing survdiff for my data using the following code: S4-Surv(outplant$SurvTime,

[R] How to set Color scale for color2D.matplot()

2011-07-21 Thread Youcheng Lin
Hello, everyone. I am trying to show the correlation matrix using color2D.matplot(). And I want to map (0,1) to (dark red to dark green). But by default color2D.matplot() will map(min element of given matrix, max element of given matrix) to (dark red to dark green). Can anyone help me with

[R] question about mosaicplot and/or mosaic

2011-07-21 Thread Dimitri Liakhovitski
Hello! I am trying to build a mosaic plot that has different colors for each entry (cell). My data that goes into the plot is NOT really a contingency table and I would like each shape to have its own color.Looks like mosaic and mosaicplot treat the data as a contingency table and seem to allow

[R] replacing duplicate rows

2011-07-21 Thread cassie jones
Hi all, I have a matrix which looks like the following, x=matrix(c(1,2,3,4,3,5,4,6,4,9),5,2,byrow=T) Now, I want to replace the 2nd columns of those 4 rows which have duplicate entries in the 1st column. For example, x[2,1]=x[3,1]=3 and I want to replace x[3,2] by x[2,2]. Similarly, I want to

Re: [R] squared pie chart - is there such a thing?

2011-07-21 Thread Sarah Goslee
On Thu, Jul 21, 2011 at 12:33 PM, Dimitri Liakhovitski dimitri.liakhovit...@gmail.com wrote: Thanks a lot, Sarah. I am definitely going to explore. A quick question about mosaicplot(matrix(c(50, 30, 20, 0), 2, 2)) mosaicplot(matrix(c(0, 50, 20, 30), 2, 2)) What are the numbers that appear

Re: [R] About Validation of R

2011-07-21 Thread Duncan Murdoch
On 11-07-21 10:36 AM, Daniel Ponce wrote: Dear Sr. of R-project: In the document R: Regulatory Compliance and Validation Issues. A guidance Document for the Use of R in Regulated Clinical Trial Environments, in the point 6.3 say that exist a set of validation test, that are localized in the

[R] simulation for equation with two variables

2011-07-21 Thread Benjamin Caldwell
Hi, I'm trying to run a basic simulation and sensitivity test by running an equation with two variables and then plotting the results against each of the vectors. R is running the vectors like this : 0 with 0, 1 with 1, etc. I would like it to run them like 0 for 1:100, 1 for 1:100, and then the

Re: [R] About Validation of R

2011-07-21 Thread Marc Schwartz
On Jul 21, 2011, at 9:36 AM, Daniel Ponce wrote: Dear Sr. of R-project: In the document R: Regulatory Compliance and Validation Issues. A guidance Document for the Use of R in Regulated Clinical Trial Environments, in the point 6.3 say that exist a set of validation test, that are

Re: [R] question about mosaicplot and/or mosaic

2011-07-21 Thread Achim Zeileis
On Thu, 21 Jul 2011, Dimitri Liakhovitski wrote: Hello! I am trying to build a mosaic plot that has different colors for each entry (cell). My data that goes into the plot is NOT really a contingency table and I would like each shape to have its own color.Looks like mosaic and mosaicplot treat

Re: [R] question about mosaicplot and/or mosaic

2011-07-21 Thread Dimitri Liakhovitski
Achim, this is great! Thanks a lot! Dimitri On Thu, Jul 21, 2011 at 1:09 PM, Achim Zeileis achim.zeil...@uibk.ac.at wrote: On Thu, 21 Jul 2011, Dimitri Liakhovitski wrote: Hello! I am trying to build a mosaic plot that has different colors for each entry (cell). My data that goes into the

Re: [R] simulation for equation with two variables

2011-07-21 Thread Benjamin Caldwell
That is, run all possible combinations of the two vectors through the equation. *Ben * On Thu, Jul 21, 2011 at 10:04 AM, Benjamin Caldwell btcaldw...@berkeley.edu wrote: Hi, I'm trying to run a basic simulation and sensitivity test by running an equation with two variables and then

Re: [R] squared pie chart - is there such a thing?

2011-07-21 Thread Gabor Grothendieck
On Thu, Jul 21, 2011 at 11:29 AM, Dimitri Liakhovitski dimitri.liakhovit...@gmail.com wrote: Hello! It's a shoot in the dark, but I'll try. If one has a total of 100 (e.g., %), and three components of the total, e.g., mytotal=data.frame(x=50,y=30,z=20), - one could build a pie chart with 3

Re: [R] comparing SAS and R survival analysis with time-dependent covariates

2011-07-21 Thread Abdullah OUESLATI
quote author=Göran Broström [...] I do not understand why you expect to get comparable results with SAS discrete and coxph exact. They are two different approaches to handling ties (as Terry explained; of course, some comparability should be expected in normal cases). [...] /quote I didn't know

Re: [R] simulation for equation with two variables

2011-07-21 Thread David Winsemius
On Jul 21, 2011, at 1:42 PM, Benjamin Caldwell wrote: That is, run all possible combinations of the two vectors through the equation. *Ben * For all combinations the usual route is data preparation with either expand.grid() or outer() On Thu, Jul 21, 2011 at 10:04 AM, Benjamin Caldwell

[R] Design Survplot performance

2011-07-21 Thread Chris Hane
Hi, I have a Cox PH model that's large for my server, 120K rows, ~300 factors with 3 levels each, so about 1000 columns. The 300 factors all pass a preliminary test of association with the outcome. Solving this with cph from Design takes about 3 hours. I have created the fit with x=T, y=T to save

Re: [R] Design Survplot performance

2011-07-21 Thread Frank Harrell
Replace the soon-to-be Design with rms. Specify surv=TRUE to cph so that approximate rather than fully correct standard errors will be computed by survplot/survest. Frank christopher.a.hane wrote: Hi, I have a Cox PH model that's large for my server, 120K rows, ~300 factors with 3 levels

Re: [R] R versions and PostScript files

2011-07-21 Thread peter dalgaard
This is due to the introduction of sRGB. Since this actually does something (Google for sRGB and you will be approximately as wise as me...), I don't think it is likely to be taken out. You can, however, always edit .ps.prolog. (I would expect that the line /setrgb { setrgbcolor } def instead

Re: [R] R on Multicore for Linux

2011-07-21 Thread Madana_Babu
Hi all, Currently i am trying to this on R which is running on multicore processor. I am not sure how to use mclapply() function on this task. Can anyone help me. # Setting up directory setwd(/XXX////2011/07/20) library(sqldf) # Data is available in the form of multiple

Re: [R] replacing duplicate rows

2011-07-21 Thread Peter Ehlers
On 2011-07-21 09:59, cassie jones wrote: Hi all, I have a matrix which looks like the following, x=matrix(c(1,2,3,4,3,5,4,6,4,9),5,2,byrow=T) Now, I want to replace the 2nd columns of those 4 rows which have duplicate entries in the 1st column. For example, x[2,1]=x[3,1]=3 and I want to

Re: [R] R versions and PostScript files

2011-07-21 Thread Ted Harding
Yes, Peter, your suggestion does the trick (at any rate with Gaetano's files). I edited his volc2.13.eps (the slow one) as follows (the original commented out with %%##) making just the following change: %%## /setrgb { srgb setcolor } def /setrgb { setrgbcolor } def %%## End of editing (at line

[R] Select Random Rows from a dataframe

2011-07-21 Thread Sean Bignami
Hi all, I have a dataframe of behavioral observations from 360 fish, each with 241 observation points(rows), which looks like this: head(d) fishtreatment tank trial video tid pid ang.chgabs.ac t lenvel d2p x y 1 1

Re: [R] Lattice: place ticks only on y-axis

2011-07-21 Thread Peter Ehlers
On 2011-07-21 08:56, marcel wrote: I am using lattice for a bar plot, having a little trouble removing ticks, tick labels from x-axis, but keeping them on the y-axis. I looked around quite a bit (http://tolstoy.newcastle.edu.au/R/e7/help/09/06/1733.html, help pages, etc), tried variations of

Re: [R] Select Random Rows from a dataframe

2011-07-21 Thread Joshua Wiley
Hi Sean, Here is one option that I believe does what you want. The logic is simple, 1) instatiate a test value that does not meet your criteria 2) use a while loop that will keep looping until your criteria is met (be sure you set a meetable criteria or this will continue ad nauseum!!!), 3)

Re: [R] score test for logistic regression

2011-07-21 Thread zlu
Hi Peter, Do you have any idea or codes of construct a score test based confidence interval for coefficients in logistic regression? James -- View this message in context: http://r.789695.n4.nabble.com/score-test-for-logistic-regression-tp3041899p3684784.html Sent from the R help mailing list

Re: [R] Changing Y axis in R

2011-07-21 Thread SamiC
Hi, couldn't find much in the archives. I had checked before posting. Anyway the plotrix package was a good hint. So anyone who reads this in future, i ended up using the gap.plot function in the plotrix package, which does the trick. Thanks -- View this message in context:

Re: [R] score test for logistic regression

2011-07-21 Thread David Winsemius
On Jul 21, 2011, at 3:38 PM, zlu wrote: Hi Peter, I'm not sure how many people still have 9 month old postings on their mail client and will know that Peter Dalgaard is the intended recipient. Do you have any idea or codes of construct a score test based confidence interval for

Re: [R] Changing Y axis in R

2011-07-21 Thread David Winsemius
Context added back in: SamiC wrote: Hi, So I am trying to plot my results of a model. what i have is the majority of the data between the values of 0 and 30, then one outlier at 80 and another at 130. the model plots a nice line through the data between 0 to 30, however given the

Re: [R] R versions and PostScript files

2011-07-21 Thread pilchat
thank you guys for your reply. i was sure that it was related to changes in the generation of ps files with the latest R release. now the question is: how can i restore the old behavior in R2.13? thanks gaetano On 7/21/11, Ted Harding ted.hard...@wlandres.net wrote: Yes, Peter, your

Re: [R] nested loop for

2011-07-21 Thread Dennis Murphy
Hi: I *think* this is what you're after, but I get dizzy trying to read convoluted loops. Try this instead; # Function to find the total SBA2 for all dbh2 larger than the given one: foo - function(d) { d - d[order(d$dbh2), ] d - transform(d, BAL2 = sum(SBA2) - cumsum(SBA2)) d }

[R] R with Multicore running on Linux

2011-07-21 Thread Madana_Babu
Hi all, Currently i am trying this on R which is running on multicore processor. I am not sure how to use mclapply() function on this task. Can anyone help me. # Setting up directory setwd(/XXX////2011/07/20) library(sqldf) # Data is available in the form of multiple

[R] Quantreg-rq crashing trouble

2011-07-21 Thread Steven R Corsi
Hi I am using the quantreg package for median regression for a large series of subsets of data. It works fabulously for all but one subset. When it reaches this subset, R takes the command and never responds. I end up having to kill R and restart it. It appears to be something with the

[R] User input(unknown name and number of files)

2011-07-21 Thread Bansal, Vikas
Dear all, I need your help as I was not able to find out the solution. The thing is- I am having a code which is reading file with this code- df=read.table(Case2.pileup,fill=T,sep=\t,colClasses=character) but as am making a tool so that user can use it and can do analysis on his file.But the

Re: [R] R versions and PostScript files

2011-07-21 Thread Duncan Murdoch
On 11-07-21 5:17 PM, pilchat wrote: thank you guys for your reply. i was sure that it was related to changes in the generation of ps files with the latest R release. now the question is: how can i restore the old behavior in R2.13? Peter told you. Duncan Murdoch thanks gaetano On

Re: [R] Quantreg-rq crashing trouble

2011-07-21 Thread Steven R Corsi
Brian Thanks for the quick response! You have found a solution. I tried this and it worked well. For my current purpose it is perfectly fine to use jitter and the result is just as useful. For the one problem subset (of 160 subsets) the actual regression won't be super useful, but at least it

[R] SpatialPolygonsDataFrame to map conversion?

2011-07-21 Thread Axel Urbiz
Dear list, I'd like to use the function smooth.map{maps} to smooth out aggregated spatial data. The first argument to this function must be a map object. I have a shape file which I read with readShapeSpatial{maptools} and I got an object of class SpatialPolygonsDataFrame. Is it possible to

Re: [R] Quantreg-rq crashing trouble

2011-07-21 Thread Brian S Cade
Steve: I would guess that the problem relates to the large number of tied values of -1 in your dependent y variable. You could randomly jitter these y = -1 by adding a random uniform number between, say, [ -0.01, 0.01] and see if the rq() converges to a solution. Then you would know that

[R] Random number generation

2011-07-21 Thread karena
Hi, I want to generate multiple sets of random numbers. The requirement is that: 1) each set have 3 random numbers; 2) the sum of the three number is always 1. how to do this? thank you, karena -- View this message in context:

[R] Find pattern in matrix

2011-07-21 Thread Q
Hello all, I'm trying to find all combinations of 4 numbers that satisfy 4 criteria, inside of a matrix (62 x 25). I've found a way to do this using for loops, but it is extremely slow because it involves checking every possible combination of numbers (567300) to see if the criteria are

[R] How to convert 3-digits hours

2011-07-21 Thread Wonjae Lee
Hi, all Here is what I tried to do. strptime('20110101 0900',%Y%m%d %H%M) [1] 2011-01-01 09:00:00 strptime('20110101 900',%Y%m%d %H%M) [1] NA If I have a 3-digit hour like '900', please show me how to convert it to 09:00:00. Thank you in advance. Wonjae -- View this message in context:

Re: [R] Random number generation

2011-07-21 Thread Jason Edgecombe
On 07/21/2011 07:18 PM, karena wrote: Hi, I want to generate multiple sets of random numbers. The requirement is that: 1) each set have 3 random numbers; 2) the sum of the three number is always 1. how to do this? Try this: df-data.frame(a=runif(10),b=runif(10)) df$c=df$a+df$b

Re: [R] Random number generation

2011-07-21 Thread Jason Edgecombe
On 07/21/2011 08:04 PM, Jason Edgecombe wrote: On 07/21/2011 07:18 PM, karena wrote: Hi, I want to generate multiple sets of random numbers. The requirement is that: 1) each set have 3 random numbers; 2) the sum of the three number is always 1. how to do this? Try this:

[R] Recoding Multiple Variables in a Data Frame in One Step

2011-07-21 Thread Anthony Damico
Hi, I can't for the life of me find how to do this in base R, but I'd be surprised if it's not possible. I'm just trying to replace multiple columns at once in a data frame. #load example data data(api) #this displays the three columns and eight rows i'd like to replace apiclus1[ apiclus1$meals

Re: [R] simple save question

2011-07-21 Thread cherron
Hi David and Tom I was having the same problem and was reading through your threads. I finally tried: summary(fit, rmean=TRUE)$table[5] This produced the mean. Hope this works for you as well. Casey -- View this message in context:

[R] for/if loop in R

2011-07-21 Thread financial engineer
hi, Can someone please help me figure out where I am making a mistake in my for/if loop: I have a data frame (112 rows) called pricedata with 3 columns: date, prices, return. Now, I want to add a 4th column, trend, which can have 2 values 0 or 1. if return1%, trend=1 else trend=0. so, this

Re: [R] Lattice: place ticks only on y-axis

2011-07-21 Thread marcel
Works perfectly, thank you. -- View this message in context: http://r.789695.n4.nabble.com/Lattice-place-ticks-only-on-y-axis-tp3684094p3685625.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] cv.glm and longer object length is not a multiple of shorter object length error

2011-07-21 Thread askantik
Hi, I've done some searching where others have had trouble with this error (or warning actually), but I'm unable to solve my problem. I have a data sheet with 13 columns and 36 rows. Each column has exactly the same number of rows. I've created glms and now want to do cross-validation on 2 of

Re: [R] Random number generation

2011-07-21 Thread Duncan Murdoch
On 21/07/2011 7:18 PM, karena wrote: Hi, I want to generate multiple sets of random numbers. The requirement is that: 1) each set have 3 random numbers; 2) the sum of the three number is always 1. how to do this? There are lots of ways. What is the context? It would determine the first

[R] Summing values by weekday and weekend - based on daily dates

2011-07-21 Thread Hu, Yinghua
Hi, all Here I created a data frame like mydates- seq(as.Date(2010-05-29), length = 43, by = day) myvalues-runif(43,0,1) myframe-data.frame(dates=mydates, day=weekdays(dates), value=myvalues) dates day value 1 2010-05-29 Saturday 0.14576143 2 2010-05-30Sunday

Re: [R] for/if loop in R

2011-07-21 Thread Rainer Schuermann
For me, this works: Now, I want to add a 4th column, trend pricedata$trend - 0 which can have 2 values 0 or 1. if return1%, trend=1 else trend=0. pricedata$trend - ifelse( pricedata$return .01, 1, 0 ) Rgds, Rainer On Thursday 21 July 2011 19:39:15 financial engineer wrote: hi, Can

[R] Summing values by weekday and weekend - based on daily dates

2011-07-21 Thread Hu, Yinghua
Hi, all Here I created a data frame like mydates- seq(as.Date(2010-05-29), length = 43, by = day) myvalues-runif(43,0,1) myframe-data.frame(dates=mydates, day=weekdays(dates), value=myvalues) dates day value 1 2010-05-29 Saturday 0.14576143 2 2010-05-30Sunday

[R] Summing values by weekday and weekend

2011-07-21 Thread Hu, Yinghua
Sorry for reposting. The previous message not showing up. Hi, all Here I created a data frame like mydates- seq(as.Date(2010-05-29), length = 43, by = day) myvalues-runif(43,0,1) myframe-data.frame(dates=mydates, day=weekdays(dates), value=myvalues) dates day value 1

[R] Summing daily values by weekday and weekend

2011-07-21 Thread Hu, Yinghua
(Sorry for reposting. Please delete previous msgs. Thanks!) Hi, all Here I created a data frame like mydates- seq(as.Date(2010-05-29), length = 43, by = day) myvalues-runif(43,0,1) myframe-data.frame(dates=mydates, day=weekdays(dates), value=myvalues) dates day value 1

Re: [R] Summing daily values by weekday and weekend

2011-07-21 Thread Jeff Newmiller
Clue: make a column representing the desired classification, and then use any of the methods you considered to do the summarizing. One possible approach: myframe$wend - as.factor(ifelse(weekday( myframe$dates) %in% c(Saturday,Sunday), Weekend, Weekday))

[R] 3d plotting with cloud and wireframe

2011-07-21 Thread Benjamin Caldwell
Hi, I'm trying to plot an equation in two variables to get a feel for sensitivity to its parameters. I've run expand.grid to get made-up vectors of the combinations of the two independent variables, and am trying to plot the output of the dependent, M, against both the dependent in a 3d space.

  1   2   >