[R] how to improve summary.lm

2011-08-21 Thread Oliver Kullmann
Hello, I need a shorter summary.lm, instead of Call: lm(formula = E$t ~ E$cfs) Residuals: Min1QMedian3Q Max -0.239674 -0.007694 0.006430 0.014330 2.496551 Coefficients: Estimate Std. Error t value

Re: [R] AFT model time-dependent with weibull distribution

2011-08-21 Thread Göran Broström
On Sat, Aug 20, 2011 at 7:33 PM, JPF xpfen...@gmail.com wrote: Göran Broström wrote: Good. Do you still need answers to your other questions? Yes. Could answer the following two questions: 1- Can I use phreg function to estimate  a model with time-dependent covariates? In case of a

Re: [R] how to improve summary.lm

2011-08-21 Thread Jorge I Velez
Hi Oliver, For the the output you would like to have, you may take a look at names(summary(yourmodel)) str(summary(yourmodel)) The above will help you to extract the components you need from the lm object. Below is my attempt to do what you want. However, you will need to work a little

Re: [R] how to improve summary.lm

2011-08-21 Thread David Winsemius
On Aug 21, 2011, at 3:16 AM, Oliver Kullmann wrote: Hello, I need a shorter summary.lm, instead of Call: lm(formula = E$t ~ E$cfs) Residuals: Min1QMedian3Q Max -0.239674 -0.007694 0.006430 0.014330 2.496551

Re: [R] how to improve summary.lm

2011-08-21 Thread Oliver Kullmann
When you simply type summary.lm there is an implicit call to print.summary.lm but its code is not visible unless you use getAnywhere(print.summary.lm ). Aha, that's great -- now I see all the \n (and can get rid off them ;-)). Reading the code you find that the coefficient matrix and the

[R] How to navigate (zoom, pan) in a plot/graph

2011-08-21 Thread Eran Eidinger
Hello all, I need to zoom in and out and travel(pan) inside a plot, like you can do on a Matlab plot. If possible, I would also like the option to use the mouse to set a marker on the graph and get the (x,y) data for it, again, like in Matlab. Is this possible in R with the regular packages, or

Re: [R] Build a package - check error

2011-08-21 Thread Erich Neuwirth
On 8/20/2011 3:37 PM, Uwe Ligges wrote: ?.First.lib has an example: ## Suppose a package needs to call a DLL named 'fooEXT', ## where 'EXT' is the system-specific extension. Then you should use .First.lib - function(lib, pkg) library.dynam(foo, pkg, lib) Shouldn't the first line here

Re: [R] reshape a matrix

2011-08-21 Thread Michael Dewey
At 18:21 20/08/2011, Uwe Ligges wrote: On 20.08.2011 19:04, David Winsemius wrote: On Aug 20, 2011, at 12:32 PM, Uwe Ligges wrote: [snip original problem] David, I think there are some good examples on the help page. What is missing? What is not clearly explained? If a longer tutorial

Re: [R] val.surv

2011-08-21 Thread Salvo Mac
 I've   attached a sample of the data sets, this is my full code. #R 2.13 #library(survival) #library(Hmisc) #library(splines) library(rms) train-as.data.frame( train-read.csv(G:\\train.txt, header=T, sep=\t)) test-as.data.frame( test-read.table(G:\\test.txt, header=T, sep=\t))

Re: [R] I have a problem with R!!

2011-08-21 Thread Jim Lemon
On 08/21/2011 05:29 AM, nferr...@fceia.unr.edu.ar wrote: Dear all i´m working with a program i´ve made in R (using functions that others created) to run my program i need a sample. if i generate the sample using for example, rnorm(n, mu, sigma) i have no problem but if i obtain a sample from

Re: [R] reshape a matrix

2011-08-21 Thread Uwe Ligges
On 21.08.2011 12:54, Michael Dewey wrote: At 18:21 20/08/2011, Uwe Ligges wrote: On 20.08.2011 19:04, David Winsemius wrote: On Aug 20, 2011, at 12:32 PM, Uwe Ligges wrote: [snip original problem] David, I think there are some good examples on the help page. What is missing? What is

Re: [R] adding text to a plot created with strat.plot() from package rioja

2011-08-21 Thread Uwe Ligges
On 21.08.2011 01:01, Jason Paul Joines wrote: I completely missed that entering just the function name prints the code for that function making it even easier to copy and create a custom version. Better use the original code as you did before: It preserves the comments. Anyway, best way

Re: [R] How to navigate (zoom, pan) in a plot/graph

2011-08-21 Thread Uwe Ligges
On 21.08.2011 10:17, Eran Eidinger wrote: Hello all, I need to zoom in and out and travel(pan) inside a plot, like you can do on a Matlab plot. If possible, I would also like the option to use the mouse to set a marker on the graph and get the (x,y) data for it, again, like in Matlab.

Re: [R] Best way to setClass and setMethod for an R package?

2011-08-21 Thread Uwe Ligges
On 21.08.2011 00:48, Jonathan Greenberg wrote: Folks: I'm putting together an R package, and I was wondering where, specifically, I put both class definitions (via setClass) as well as setMethod calls? Is there a particular file name I need to use? No, any file name, e.g.

Re: [R] Build a package - check error

2011-08-21 Thread Uwe Ligges
On 21.08.2011 11:29, Erich Neuwirth wrote: On 8/20/2011 3:37 PM, Uwe Ligges wrote: ?.First.lib has an example: ## Suppose a package needs to call a DLL named 'fooEXT', ## where 'EXT' is the system-specific extension. Then you should use .First.lib- function(lib, pkg) library.dynam(foo,

Re: [R] How to navigate (zoom, pan) in a plot/graph

2011-08-21 Thread Uwe Ligges
On 21.08.2011 15:04, Eran Eidinger wrote: Thank you Uwe, That solves the second question. Still looking for some solution to zooming in and out dynamically. That is not implemented in standard R graphics. Packages rgl and iplots may be able to do that. Best, Uwe Eran. 2011/8/21 Uwe

[R] Dot plot with two grouping variables concurrently

2011-08-21 Thread markm0705
Dear R help(ers). I'm an R-learner (about 10 hours now) trying to make a ranked dot plot where the symbols are coded by two variables concurrently. I'm trying to use Deepanyan Sarkar's book 'Lattice' as a guide but get the feeling it is a bit advanced for my level of understanding. I have

[R] How can I divide an image and randomly plot the segements

2011-08-21 Thread Benson Kenduiywo
Hi! I would like to divide a 401 by 401 image into 20 equal blocks and then re-plot the image with the segments randomly distributed in it. How can I do this? . Regards, Kenduiywo Benson [[alternative HTML version deleted]] __

[R] Histogram from frequency data in pre-made bins

2011-08-21 Thread RobinLovelace
Dear R user, I am using UK census data on travel to work. The authorities have provided a breakdown in each area by mode (car, bicycle etc.) and distance travelled (0 – 2 km, 2 – 5 km etc). Therefore, after processing, the data for Sheffield look like this

Re: [R] How to navigate (zoom, pan) in a plot/graph

2011-08-21 Thread Eran Eidinger
Thank you Uwe, That solves the second question. Still looking for some solution to zooming in and out dynamically. Eran. 2011/8/21 Uwe Ligges lig...@statistik.tu-dortmund.de On 21.08.2011 10:17, Eran Eidinger wrote: Hello all, I need to zoom in and out and travel(pan) inside a plot, like

Re: [R] AFT model time-dependent with weibull distribution

2011-08-21 Thread JPF
thanks! -- View this message in context: http://r.789695.n4.nabble.com/AFT-model-time-dependent-with-weibull-distribution-tp3755079p3758267.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] Dot plot with two grouping variables concurrently

2011-08-21 Thread Weidong Gu
Q1. Right now I like to know how to get the dual coding working on the points on a dotplot and also annotate these in a key.  Specifically I'm attempting to code the fill of the points by a variable called 'Commodity' but would like have different symbols to refelect a second variable called

Re: [R] Best way to setClass and setMethod for an R package?

2011-08-21 Thread Martin Morgan
On 08/21/2011 05:56 AM, Uwe Ligges wrote: On 21.08.2011 00:48, Jonathan Greenberg wrote: Folks: I'm putting together an R package, and I was wondering where, specifically, I put both class definitions (via setClass) as well as setMethod calls? Is there a particular file name I need to use?

Re: [R] How to navigate (zoom, pan) in a plot/graph

2011-08-21 Thread Henrique Dallazuanna
See setGraphicsEventHandlers function. On Sun, Aug 21, 2011 at 10:04 AM, Eran Eidinger e...@taykey.com wrote: Thank you Uwe, That solves the second question. Still looking for some solution to zooming in and out dynamically. Eran. 2011/8/21 Uwe Ligges lig...@statistik.tu-dortmund.de On

Re: [R] How to navigate (zoom, pan) in a plot/graph

2011-08-21 Thread Liviu Andronic
On Sun, Aug 21, 2011 at 3:04 PM, Eran Eidinger e...@taykey.com wrote: Thank you Uwe, That solves the second question. Still looking for some solution to zooming in and out dynamically. Try package 'playwith'. Liviu __ R-help@r-project.org mailing

Re: [R] val.surv

2011-08-21 Thread David Winsemius
On Aug 21, 2011, at 7:03 AM, Salvo Mac wrote: I've attached a sample of the data sets, this is my full code. #R 2.13 #library(survival) #library(Hmisc) #library(splines) library(rms) train-as.data.frame( train-read.csv(G:\\train.txt, header=T, sep=\t)) test-as.data.frame(

[R] Sweave doesn't work

2011-08-21 Thread danielepippo
Hi R users. I've got a problem in producing the pdf file from Latex with R code. When I run the code Sweave(example.Rtex) in R it seems working, but when I run the Latex file it doesn't. The code error shown to me is below: *Runaway argument? {echo=FALSE} data-

Re: [R] val.surv

2011-08-21 Thread Frank Harrell
I welcome a trivial self-contained set of code, not using frailties, that generates its own data and which fails. Then I'll debug. Frank David Winsemius wrote: On Aug 21, 2011, at 7:03 AM, Salvo Mac wrote: I've attached a sample of the data sets, this is my full code. #R 2.13

[R] rank analysis - reinventing the wheel?

2011-08-21 Thread Ben qant
Hello, I have two data frames. One is my dependent variable and the other is my independent variable. For each row I'd like to split the independent variable into fractiles (25 or more) and calculate the average value of the dependent variable. Then I would like to plot the average of the

Re: [R] Raw epoch time from XTS

2011-08-21 Thread Noah Silverman
Josh, Good point about including an example. calling xcoredata() does work, but only for a *single* row of the data at a time. In R, I'm used to passing an entire data structure or vector to a function and automatically getting back a vector of all the results. In this case, it doesn't work

[R] Compile on Fedora

2011-08-21 Thread Noah Silverman
Hi, I want to create a custom build of R, for my particular machine that will run as fast as possible. CPU: Dual cora AMD 64 bit OS: Fedora 15 I know there are a lot of options for compile time flags, lapack, blas, atlas, etc. Not sure what the best combination is. Has someone already

Re: [R] Compile on Fedora

2011-08-21 Thread Peter Langfelder
On Sun, Aug 21, 2011 at 10:18 AM, Noah Silverman noahsilver...@ucla.edu wrote: Hi, I want to create a custom build of R, for my particular machine that will run as fast as possible. CPU: Dual cora AMD 64 bit OS: Fedora 15 I know there are a lot of options for compile time flags, lapack,

Re: [R] rank analysis - reinventing the wheel?

2011-08-21 Thread Frank Harrell
This is close: require(Hmisc); ?xYplot and see method='quantile' Frank Ben qant wrote: Hello, I have two data frames. One is my dependent variable and the other is my independent variable. For each row I'd like to split the independent variable into fractiles (25 or more) and calculate

Re: [R] Raw epoch time from XTS

2011-08-21 Thread Joshua Wiley
Noah, For me xcoredata() returns a vector of the results, which makes me wonder if you are using an old version of R or your data is somehow stored differently. Cheers, Josh On Sun, Aug 21, 2011 at 10:15 AM, Noah Silverman noahsilver...@ucla.edu wrote: Josh, Good point about including an

Re: [R] Sweave doesn't work

2011-08-21 Thread Joshua Wiley
Hi, You would probably be better off providing us with the code you weave rather than the TeX code. Also, the problem is quite possibly not near where the error occurred. In my (admittedly limited) experience, runaway argument issues tend to mean at some earlier point I: A) did not choose the

Re: [R] Compile on Fedora

2011-08-21 Thread Dirk Eddelbuettel
On 21 August 2011 at 10:18, Noah Silverman wrote: | Hi, | | I want to create a custom build of R, for my particular machine that will run as fast as possible. | | CPU: Dual cora AMD 64 bit | | OS: Fedora 15 | | I know there are a lot of options for compile time flags, lapack, blas,

Re: [R] trouble installing packages on OpenSuse 11.4

2011-08-21 Thread Steven Kennedy
I have similar problems when trying to install packages while at work. It might have something to do with your firewall settings. On Wed, Aug 17, 2011 at 4:38 AM, Dinesh din...@milkorwater.com wrote: Hi, I am trying to install a bunch of packages via command line and can use some help in

[R] Split split plot analysis for unbalanced data using lmer

2011-08-21 Thread Stephen Gosnell
Hello, I'm attempting to analyze a split-split plot model, currently using lmer. My design is similar to that used in Casella's Experimental Designs Ozone Example (example 5.7, p 197), but I have been unable to find any coding help for split-split plot models through searches of several

Re: [R] Sweave doesn't work

2011-08-21 Thread Philipp Pagel
On Sun, Aug 21, 2011 at 09:18:25AM -0700, danielepippo wrote: Sweave(example.Rtex) in R it seems working [...] * ...le/Desktop/dati/LaTeX1.Rtex* Sounds like you are first running sweave on the file 'example.Rtex' and later LaTex on 'LaTeX1.Rtex' Two points: 1) why do these files have

[R] pooled hazard model with aftreg and time-dependent variables

2011-08-21 Thread JPF
Dear R-users, I have two samples with individuals that are in more than one of the samples and individuals that are only in one sample. I have been trying to do a pooled hazard model, stacking one sample below the other, with aftreg and time-dependent covariates. The idea behind is to see

Re: [R] Error message: object of type 'closure' is not subsettable

2011-08-21 Thread Newbie
Thank you for your help, even though there was such an obvious mistake, Im sorry for that I have now tried to incorporate your suggested solution, but just as last time (the other post that you referred to), I get the values of the initial parameters when I run nlminb. I have changed the code a

[R] Increase the size of the boxes but not the text in a legend

2011-08-21 Thread Jürgen Biedermann
HI there, I want to add a legend to a plot using the density and angle argument, so patterns with lines in different angles are used in the plot and should be referred to. When I use default settings, the filled boxes are too small. With the cex argument I can enlarge the whole legend, but

[R] Time series plot shift

2011-08-21 Thread Andrey A
I have a plot and my x axis is Time in days, I need to shift it by +15 days, how do i do it? Thanks. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] Time series plot shift

2011-08-21 Thread R. Michael Weylandt michael.weyla...@gmail.com
Depending on the time series object you are using, the lag() function will do it. Read the documentation ?lag for details on your specific ts class. Michael Weylandt On Aug 21, 2011, at 3:04 PM, Andrey A ava...@gmail.com wrote: I have a plot and my x axis is Time in days, I need to shift it

[R] Multiple R linear models into one Latex table

2011-08-21 Thread Alex Ruiz Euler
Dear community, I had been looking for an easy way to produce latex tables from R output. xtable() and the package apsrtable produce good outputs but they are not exactly what I was looking for. I wrote this code that generates regression tables from multiple R linear models. I want to share

[R] Changing data scales

2011-08-21 Thread Jim Silverton
I have data that ranges from 0.3 to 2 and I want to change the scale to be from 0 to 1. Can this be done in R? -- Thanks, Jim. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] Changing data scales

2011-08-21 Thread Jorge I Velez
On 8/21/11 8:04 PM, Jim Silverton wrote: I have data that ranges from 0.3 to 2 and I want to change the scale to be from 0 to 1. Can this be done in R? Take a look at ?scale HTH, Jorge __ R-help@r-project.org mailing list

Re: [R] Quadratic equation

2011-08-21 Thread Brad Patrick Schneid
these guys wont help you with your homework. But have you ever heard of Google?... if so, R has plenty of online manuals and cheat sheets. -- View this message in context: http://r.789695.n4.nabble.com/Quadratic-equation-tp3758790p3759239.html Sent from the R help mailing list archive at

Re: [R] How can I divide an image and randomly plot the segements

2011-08-21 Thread Rolf Turner
On 21/08/11 23:06, Benson Kenduiywo wrote: Hi! I would like to divide a 401 by 401 image into 20 equal blocks and then re-plot the image with the segments randomly distributed in it. How can I do this? For a 401 x 401 pixellation --- I don't know. If you use a 400 x 400 pixellation, then

Re: [R] Changing data scales

2011-08-21 Thread Joshua Wiley
On Sun, Aug 21, 2011 at 5:50 PM, Jorge I Velez jorgeivanve...@gmail.com wrote: On 8/21/11 8:04 PM, Jim Silverton wrote: I have data that ranges from 0.3 to 2 and I want to change the scale to be from 0 to 1. Can this be done in R? Take a look at ?scale Which leads one to: scale(x, .3,

[R] CovMMest

2011-08-21 Thread mazlina Abu Bakar
Dear experts, I'm having problem in using CovMMest (for MM estimates of location and scale) I have installed robustbase, robust. Unfortunately I could not run the command. It says CovMMest is not a function. What is wrong? Thx. -Mag [[alternative HTML version deleted]]

Re: [R] CovMMest

2011-08-21 Thread David Winsemius
On Aug 21, 2011, at 9:56 PM, mazlina Abu Bakar wrote: Dear experts, I'm having problem in using CovMMest (for MM estimates of location and scale) I have installed robustbase, robust. Unfortunately I could not run the command. It says CovMMest is not a function. What is wrong? Thx. Who can

[R] Wiki/revision control to management of CRAN package repository

2011-08-21 Thread Etienne Low-Décarie
I propose the following humbly, with little know how as to how to implement, and realize it may have been proposed many times. It is just something I had on my mind. Would it be possible/desirable to have the whole CRAN package repository accessible through a public wiki, forge or version