Re: [R] Display more than one plot

2009-10-09 Thread emkayenne
Nobody? :-( emkayenne wrote: > > Hello, I'm pretty new to R and I am having a hrd time getting a grip. Just > a question: can someone tell me how to have more than one graphics windown > open at the same time? I want to look at some plote at the same time..., > how is this done? If someone has a

[R] how to make the tick character in Y-axis to be horizontal?

2009-10-09 Thread Jie TANG
hello ,every one , I draw a figure as shown in appendix A, The tick characters in the Y-axis is arranged in the vertical direction.Now I want to arranged the Y-axis tick in the horizontal direction. How could I do ,then? Thank you . -- TANG Jie Email: totang...@gmail.com Tel: 0086-2154896104

[R] Matching Dates Closest without going over

2009-10-09 Thread ampc
Hi, I have 2 date vectors d1 and d2. d1 <- structure(c(14526, 14495, 14464, 14433, 14402, 14371, 14340, 14309, 14278, 14247, 14216, 14185), class = "Date") d2 <- structure(c(14526, 14509, 14488, 14466, 14453, 14441, 14396, 14388, 14343, 14333, 14310, 14281), class = "Date") I would like to cre

Re: [R] plotting points in random but different colors based on condition

2009-10-09 Thread Jonathan Bleyhl
On a similar note, I'm trying to plot continuous values on the y vs. categorical (dates) on the x and I want to color by date, but I want the colors to be random so points close to each other are easily distinguishable. Any thoughts? Thanks, Jon per freem-2 wrote: > > hi all, > > suppose I ha

[R] Setting a mirror "permanently" on R on ubuntu

2009-10-09 Thread Lazarus Mramba
Dear all, I seem to have many problems as I run R on my ubuntu system. want to set a mirror so that anytime I use the command "install.packages", it does not ask me for which mirror to use but go direct. This is because of the error I keep on getting below and I dont know how to solve it. Please

[R] rJava downloads but cannot load, when I run R as root

2009-10-09 Thread Lazarus Mramba
> library(rJava) Error in library(rJava) : there is no package called 'rJava' > install.packages("rJava") Warning in install.packages("rJava") : argument 'lib' is missing: using '/usr/local/lib/R/site-library' --- Please select a CRAN mirror for use in this session --- Loading Tcl/Tk interface ..

[R] Display more than one plot

2009-10-09 Thread emkayenne
Hello, I'm pretty new to R and I am having a hrd time getting a grip. Just a question: can someone tell me how to have more than one graphics windown open at the same time? I want to look at some plote at the same time..., how is this done? If someone has a suggestion for a (good) introductory gui

[R] Bayesian Belief Networks in R

2009-10-09 Thread Ziad.Elmously
Hello All, Is anyone aware of an R package for Bayesian Belief Networks (BBN) that can handle latent (hidden) nodes? I am referring to process learning the structure and the parameters of the model. Based on the documentation, the "bnlearn" package does not provide for such capability. In ad

[R] Help from Bill Liao

2009-10-09 Thread Xianchun Liao
Dear Matthieu or other friends, I want to select two unknown thresholds with the following function: grid<- selectSETAR(x1, m=1, thDelay=0, criterion=C("AIC","SSR"), nthresh=2) print(grid) plot(grid) where x1 is a price time series. However, it always shows the following error. Er

[R] variance ratio tests

2009-10-09 Thread amira akl
Hello I am a new user of R software. I benefit from using vrtest-package. However, the codes provided by the aforementioned package, for example, calculate the test statistics for Lo and Mackinlay (1988) under the assumptions of homoscedasticity and heteroscedasticity without computing the value

[R] Kernel Canonical correlation analysis (KCCA)

2009-10-09 Thread Guru Ananda
Hi, Does anybody know a good package/function for performing nonlinear/kernel canonical correlation analysis in R? I tried the kcca() function in 'kernlab' package, but it requires both datasets to contain equal number of variables, which isn't the case with my datasets. I'm therefore looking for

[R] Errors in installing package "rJava" on Ubuntu

2009-10-09 Thread Lazarus Mramba
*Hello, I have had this serious problem while trying to install package rJava. It is a requirement by the package JGR and it cannot be downloaded due to the error indicated below. I have googled and looked at the FAQ but no solution yet. Please advise. Kind regards, Lazarus > install.packages("r

Re: [R] celebrating revision 50000

2009-10-09 Thread Yihui Xie
I extracted the data for hours of a day and created some graphs here: http://yihui.name/en/2009/10/5-revisions-committed-to-r/ Certainly our R core gods are so very hard-working and devoted that some even commit revisions to R at 3am in the morning! Regards, Yihui -- Yihui Xie Phone: 515-294

Re: [R] How to get "last status change", ctime on Windows?

2009-10-09 Thread Prof Brian Ripley
On Fri, 9 Oct 2009, Duncan Murdoch wrote: On 09/10/2009 5:05 PM, johannes rara wrote: Hi, file.info is producing data.frame with ctime variable. Help file says that on Unix this is 'last status change' and on Windows 'creation time'. No, that is not what it says. It actually says What

[R] Running R scripts from a GUI interface

2009-10-09 Thread Jason Rupert
It appears several that of my scripts are beginning to reaching maturity, so I am curious if it is possible to add an external GUI to run the scripts from this simplified GUI interface. The scripts are fairly rudimentary so the GUI only needs a few radial buttons and a could of numeric fields

Re: [R] lm output

2009-10-09 Thread Daniel Malter
No, actually it does better to not suppress all output, because it tells you where the trouble comes from by just showing the NA for the slope. The intercept the regression gives you is the mean of y in this case. As for the slope, Ted's graphic is illustrative as to why no slope can be estimated.

Re: [R] Help with printing fixed width

2009-10-09 Thread Jim Lemon
On 10/09/2009 11:36 PM, sahil seth wrote: Hello R users, I am writing a summary() for a custom class, and am to display the integers right justified, Say where x is the vector with integers, I am using the following: cat("\t",format(x),"\t"...other columns) this way I am trying to pass the forma

Re: [R] Creating a Clustered-Stacked Column Chart

2009-10-09 Thread David Winsemius
library(lattice) barchart(Titanic, scales = list(x = "free"), auto.key = list(title = "Survived")) Or if you prefer vertical: barchart(Titanic, scales = list(x = "free"), auto.key = list(title = "Survived"), horizontal=FALSE) There are adjustments available to the space betwe

[R] Fwd: Creating a Clustered-Stacked Column Chart

2009-10-09 Thread Khanh Nguyen
-- Forwarded message -- From: Khanh Nguyen Date: Fri, Oct 9, 2009 at 10:10 PM Subject: Re: [R] Creating a Clustered-Stacked Column Chart To: zhijie zhang May be you can try to look into ggplot2 http://had.co.nz/ggplot2/position_fill.html -k On Fri, Oct 9, 2009 at 9:57 PM, zh

Re: [R] Creating a Clustered-Stacked Column Chart

2009-10-09 Thread zhijie zhang
Thanks a lot. Maybe someone else has the method to solve that. 2009/10/9 John Kane > I don't think I've seen an R version, probably because the technique is not > very good for displaying data. > > Have a look at http://chartsgraphs.wordpress.com/tag/r-and-excel/ for an > alternative method of

Re: [R] Satellite ocean color palette?

2009-10-09 Thread Pedro Mardones
tim.colors() in library fields On Fri, Oct 9, 2009 at 2:51 PM, Tim Clark wrote: > Dear List, > > Is there a color palette avaliable similar to what is used in satellite ocean > color imagery?  I.e. a gradient with blue on one end and red on the other, > with yellow in the middle?  I have tried

Re: [R] odfWeave & XML error in post-processing

2009-10-09 Thread Rob James
Just so we complete (partially) the web-record... Some further hunting determined that the &apos was an apostrophe - obvious only in retrospect! Removal of this character has resolved the Entity errors, but not the xmlParseStartTag: invalid element name errors. I had assumed that the two

Re: [R] user input in R

2009-10-09 Thread David Winsemius
On Oct 9, 2009, at 6:36 PM, Sharon Beckett wrote: I'm just learning R (I don't know any other programming languages), and I have a question. I am trying to figure out how to ask for user input (say, a set of 3 numbers) then put those numbers into an array. I've looked around, but I have

[R] regressions on large dataframe: speed?

2009-10-09 Thread Georg Ehret
Dear R Helpers, I have a pretty large dataframe (150,000 variables, 10,000 entries for each) and have to run a regression on each of the variables. Recorded are the pvals. I wrote a function and use sapply. The function looks something like this: calcpval<-function(x){ modela <- lm(appl

[R] user input in R

2009-10-09 Thread Sharon Beckett
I'm just learning R (I don't know any other programming languages), and I have a question. I am trying to figure out how to ask for user input (say, a set of 3 numbers) then put those numbers into an array. I've looked around, but I haven't been able to find any answers that I understa

Re: [R] How to get "last status change", ctime on Windows?

2009-10-09 Thread Duncan Murdoch
On 09/10/2009 5:05 PM, johannes rara wrote: Hi, file.info is producing data.frame with ctime variable. Help file says that on Unix this is 'last status change' and on Windows 'creation time'. Is there a way to get 'last status change' on Windows using some R function? What does "last status ch

Re: [R] plot the same types of graphics on the same R graphic device

2009-10-09 Thread Sarah Goslee
Hi Carol, It isn't at all clear exactly what you are trying to do, but you might want to read the help for either points() and lines() [to put more than one data pair on a single plot], or for par, specifically mfrow and mfcol, or for layout [to put more than one plot on a single device window].

Re: [R] lm output

2009-10-09 Thread Brecknock, Peter
Fair point. Thanks. -Original Message- From: David Winsemius [mailto:dwinsem...@comcast.net] Sent: Friday, October 09, 2009 5:02 PM To: Brecknock, Peter Cc: Daniel Malter; r-help@r-project.org Subject: Re: [R] lm output On Oct 9, 2009, at 5:45 PM, Brecknock, Peter wrote: > Daniel > >

Re: [R] lm output

2009-10-09 Thread David Winsemius
On Oct 9, 2009, at 5:45 PM, Brecknock, Peter wrote: Daniel Thanks very much for the reply. If the data fails the underlying assumptions of regression wouldn't it make sense to suppress all the output and not just the slope coefficient? Incidently, if I run this simple example in Excel i

Re: [R] plot the same types of graphics on the same R graphic device

2009-10-09 Thread John Kane
?lines ?points Something like : x <- 1:10 y1 <- rnorm(10, 4, 3) y2 <- rnorm(5,5,2) ymax <- max(c(y1,y2)) ymin <- min(c(y1,y2)) plot(x, y1, col='red',ylim = c(ymin,ymax)) lines(y2, col='green') --- On Fri, 10/9/09, carol white wrote: > From: carol white > Subject: [R] plot the same types

Re: [R] lm output

2009-10-09 Thread Ted Harding
On 09-Oct-09 21:45:04, Brecknock, Peter wrote: > Daniel > Thanks very much for the reply. > > If the data fails the underlying assumptions of regression wouldn't it > make sense to suppress all the output and not just the slope > coefficient? > > Incidently, if I run this simple example in Excel

Re: [R] lm output

2009-10-09 Thread Brecknock, Peter
Daniel Thanks very much for the reply. If the data fails the underlying assumptions of regression wouldn't it make sense to suppress all the output and not just the slope coefficient? Incidently, if I run this simple example in Excel it returns the slope as 0. Intuitively, this makes sense to

Re: [R] lm output

2009-10-09 Thread Ted Harding
On 09-Oct-09 21:12:18, Brecknock, Peter wrote: > Hi All > I am running a linear regression using the lm object. > > In the event that my independent variable is the same across all > observations the regression slope is returned as an NA. > > For example, if I have the following > > y=c(10,12,1

Re: [R] lm output

2009-10-09 Thread Daniel Malter
That comes out as an NA because X'X is not invertible because it is not full rank (one row/column is a linear combination of the other(s)). And that means there is no unique solution to the system. y=c(10,12,17) x=c(5,5,5) X=cbind(1,x) X t(X)%*%X solve(t(X)%*%X) Therefore, nope, there is now way

[R] lm output

2009-10-09 Thread Brecknock, Peter
Hi All I am running a linear regression using the lm object. In the event that my independent variable is the same across all observations the regression slope is returned as an NA. For example, if I have the following y=c(10,12,17) x=c(5,5,5) lm = lm(y~x) produces the following Coefficient

[R] plot the same types of graphics on the same R graphic device

2009-10-09 Thread carol white
Hi, How to plot the same types of graphics on the same R graphic device? Suppose that we want to plot a vector y against x (using plot for instance). How is it possible to plot y against x for different values of these two vectors on the same device so that the plots could be compared? Cheers,

[R] How to get "last status change", ctime on Windows?

2009-10-09 Thread johannes rara
Hi, file.info is producing data.frame with ctime variable. Help file says that on Unix this is 'last status change' and on Windows 'creation time'. Is there a way to get 'last status change' on Windows using some R function? Thanks, Johannes __ R-help@

Re: [R] different time series in one plot

2009-10-09 Thread Giovanni Petris
> Date: Fri, 09 Oct 2009 18:18:05 +0200 > From: Tomas Lanczos > Sender: r-help-boun...@r-project.org > Precedence: list > > Hello, > > I need to put 2 or more different time series to one plot for comparison > each other. The problem is that the time series are irregular, moreover > the time le

Re: [R] gregmisc library (Mandriva)

2009-10-09 Thread Paul Bivand
Hi You may find that you need to use the compilation tools. I gave up on using R from Mandriva repositories as the R base is usually out of date and the selection of packages available depends on the interests of those who produced them. If I knew how rpm spec files worked I might do something abo

[R] R CMD --meetup=Chicago --when=Oct 29 --where=Jak'sTap

2009-10-09 Thread Jeff Ryan
Chicagoland R Users: We are pleased to announce a Fall meetup for Chicagoland R users. This is open to anyone with an interest in R: practioners, researchers, casual users and other interested parties. WHEN: October 29, 2009 @5:30 WHERE: Jak's Tap www.jakstap.com A short series of so-called ligh

[R] Placing text in a ggplot

2009-10-09 Thread John Kane
I am attempting to graph 12 months of temperatures, delineate the months with a vline and place the names of the months at the top of the graph. So far I have gotten everything to work except the names, despite getting a similar graph to work yesterday the day before yesterday with Baptise A's h

Re: [R] Satellite ocean color palette?

2009-10-09 Thread Tim Clark
Thanks! The colorRampPalette() did just what I need. Tim Tim Clark Department of Zoology University of Hawaii --- On Fri, 10/9/09, Barry Rowlingson wrote: > From: Barry Rowlingson > Subject: Re: [R] Satellite ocean color palette? > To: "Tim Clark" > Cc: r-help@r-project.org > Date: Frida

[R] "Use R" -- term and logo copyright?

2009-10-09 Thread Marianne Promberger
Dear list, I would like to start some R workshops at King's College London, and to do so, I would like to use the "Use R!" logo at http://www.agrocampus-ouest.fr/math/useR-2009//useR%21%202008_fichiers/useR-middle.png Since it seems to be difficult to get a shell account at KCL, I also went ahead

Re: [R] Satellite ocean color palette?

2009-10-09 Thread Bernardo Rangel Tura
On Fri, 2009-10-09 at 11:51 -0700, Tim Clark wrote: > Dear List, > > Is there a color palette avaliable similar to what is used in satellite ocean > color imagery? I.e. a gradient with blue on one end and red on the other, > with yellow in the middle? I have tried topo.colors(n) but that comes

Re: [R] Satellite ocean color palette?

2009-10-09 Thread Barry Rowlingson
On Fri, Oct 9, 2009 at 7:51 PM, Tim Clark wrote: > Dear List, > > Is there a color palette avaliable similar to what is used in satellite ocean > color imagery?  I.e. a gradient with blue on one end and red on the other, > with yellow in the middle?  I have tried topo.colors(n) but that comes ou

Re: [R] Satellite ocean color palette?

2009-10-09 Thread Henrique Dallazuanna
See ?colorRampPallete On Fri, Oct 9, 2009 at 3:51 PM, Tim Clark wrote: > Dear List, > > Is there a color palette avaliable similar to what is used in satellite ocean > color imagery?  I.e. a gradient with blue on one end and red on the other, > with yellow in the middle?  I have tried topo.col

[R] Satellite ocean color palette?

2009-10-09 Thread Tim Clark
Dear List, Is there a color palette avaliable similar to what is used in satellite ocean color imagery? I.e. a gradient with blue on one end and red on the other, with yellow in the middle? I have tried topo.colors(n) but that comes out more yellow on the end. I am looking for something simi

Re: [R] k-modes (Huang) in package klaR?

2009-10-09 Thread Uwe Ligges
Uwe Ligges wrote: Uwe Ligges wrote: Kim Vanselow wrote: Dear R-Users and Developers, I want to calculate something like k-means clustering, but with ordinal data (Braun-Blanquet) to combine this classification technique with a NMDS-Ordination. I found an algorithm especially developed f

Re: [R] celebrating revision 50000

2009-10-09 Thread Romain Francois
Thanks to Dirk for pointing it out in my blog : "thomas" and "tlumley" are the same person. Also "martyn" and "plummer", and "paul" and "murrell" ... updated number of commits per author below > sort( table( simple$author ), decreasing=T ) ripleymaechler hornik pd mu

Re: [R] Re place many rows in a table with new rows in one step

2009-10-09 Thread David Winsemius
On Oct 9, 2009, at 6:42 AM, Zhen Lin wrote: I tried this: (c is the column vector with indices of those rows I want to replace) table[c,]<-replace(table[c,],c,newRows) but it does not work and the error is: new columns would leave holes after existing columns replace() is supposed to work

Re: [R] Trendline for a subset of data

2009-10-09 Thread Steve Murray
Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Thanks Mark=2C the reg.line trick seemed to work really well. David - hopefully the hex-text will have gone now - if not=2C please accept= my apologies as=2C this is=2C as far as I kn

Re: [R] different time series in one plot

2009-10-09 Thread Gabor Grothendieck
plot.zoo and xyplot.zoo in the zoo package can both do that: library(zoo) z <- zoo(c(21, 34, 33, 41, 39, 38, 37, 28, 33, 40), as.Date(c("1992-01-10", "1992-01-17", "1992-01-24", "1992-01-31", "1992-02-07", "1992-02-14", "1992-02-21", "1992-02-28", "1992-03-06", "1992-03-13"))) #

Re: [R] row selection

2009-10-09 Thread David Winsemius
On Oct 9, 2009, at 12:41 PM, Ashta wrote: Hi all, Thank you for your help. Now I am able to select every 5th row of the data from the main data set (x) using sub1<- x[seq(1, nrow(x), by=5), ] So sub1 contains one fith of the data set X. I want also create another data set that will c

Re: [R] Trendline for a subset of data

2009-10-09 Thread David Winsemius
You are emitting weird hex-stuff from your mail client. And from what I can tell that is not a reproducible example even if hex-ation problem gets fixed. There is a worked example in segments. On Oct 9, 2009, at 10:45 AM, Steve Murray wrote: Content-Type: text/plain; charset="iso-8859-1"

Re: [R] row selection

2009-10-09 Thread Nutter, Benjamin
sub3 <- x[-seq(1, nrow(x), by=5), ] Notice the '-' in front of the seq() command. This will select everything but what is in the sequence. From: Ashta [mailto:sewa...@gmail.com] Sent: Friday, October 09, 2009 12:42 PM To: Nutter, Benjamin Cc: r-help@r-proje

Re: [R] variogram

2009-10-09 Thread jim holtman
It probably means that your data is not in the right format. PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. If you show the data, it might help. It sounds like something is empty, but it is hard to te

Re: [R] distr package

2009-10-09 Thread Peter Ruckdeschel
Thanks David, for answering this question. > On Oct 8, 2009, at 4:33 AM, msig...@yahoo.com wrote: > >> Dear all >> when I try to install "distr", the following error appears, I am using >> R in windows. can u suggest me? >> > > I'm not a Windows user, but the obvious questions would be "How?".

Re: [R] row selection

2009-10-09 Thread Ashta
Hi all, Thank you for your help. Now I am able to select every 5th row of the data from the main data set (x) using sub1<- x[seq(1, nrow(x), by=5), ] So sub1 contains one fith of the data set X. I want also create another data set that will contain the remaining data set from X (ie., four f

Re: [R] Any reference to Tukeyline algorithm?

2009-10-09 Thread Bert Gunter
Google is your friend! (search on "Tukey median line fit"); e.g. http://www.amstat.org/publications/jse/v14n2/morrell.html Bert Gunter Genentech Noclinical Statistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of shanmukha patel

[R] wrong plot with fda or lda?

2009-10-09 Thread Alejo C.S.
Hi, I have a strange behavior of plot function when trying to plot a discriminant analysis obtained by fda. I'd attached the data for reproduction. I made the same analysis (linear discriminant analysis) but using lda and fda (default args, using "polyreg"). The resulting coefficients and trace pro

Re: [R] For loop isn't working correctly

2009-10-09 Thread jim holtman
It plots on my system just fine. You might want to check what directory (getwd()) that you are plotting in. On Fri, Oct 9, 2009 at 12:17 PM, Anne Buunk wrote: > > Hi. With your help, I've fixed the errors in my for loops. > > But now, the for loop isn't working correctly. There should be a plot,

Re: [R] Problems with code

2009-10-09 Thread Barry Rowlingson
On Fri, Oct 9, 2009 at 4:54 PM, Anne Buunk wrote: >                          text(0.5,0.5, text = paste(letters[i], "+", > numbers[j],"=", letters [i+j+k]) Missing ) on the end there. You have one ( for text( and one for paste( but only one ")". Use an editor that matches parentheses, and read

[R] different time series in one plot

2009-10-09 Thread Tomas Lanczos
Hello, I need to put 2 or more different time series to one plot for comparison each other. The problem is that the time series are irregular, moreover the time lenghts and periods are not the same. Is there a way to manage it in R? Many thanks for any hint and advice in advance Tomas _

[R] For loop isn't working correctly

2009-10-09 Thread Anne Buunk
Hi. With your help, I've fixed the errors in my for loops. But now, the for loop isn't working correctly. There should be a plot, but there's no plot when I run the for loop.. This is the code: letters = c("A","B","C","D","E","F","G","H","I","J") numbers = 1:3 for(i in 1:6){

[R] Problems with code

2009-10-09 Thread Anne Buunk
The following code isn't working and we can't figure out why.. letters = c("A","B","C","D","E","F","G","H","I","J") numbers = 1:3 for(i in 1:6){ #6 letters for (j in 1:3) { #3 numbers for (k in -1:1) {

Re: [R] Problems with code containing a for loop

2009-10-09 Thread xavier . chardon
A parenthesis is missing. You can figure that out easily watching the first error. text(0.5,0.5, text = paste(letters[i], "+", numbers[j],"=", letters [i+j+k])) Xavier - Mail Original - De: "Antje##" À: r-help@r-project.org Envoyé: Vendredi 9 Octobre 2009 17h36:34 GMT +01:00 Amsterdam

Re: [R] Help with printing fixed width

2009-10-09 Thread jim holtman
try using 'sprintf' On Fri, Oct 9, 2009 at 8:36 AM, sahil seth wrote: > Hello R users, > I am writing a summary() for a custom class, and am to display the integers > right justified, > Say where x is the vector with integers, I am using the following: > cat("\t",format(x),"\t"...other columns) >

Re: [R] Handling missing data

2009-10-09 Thread Erik Iverson
1) No need to post multiple times to the list 2) use the is.na function to test if a value is missing, not == or != > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of premmad > Sent: Friday, October 09, 2009 5:05 AM > To: r-help@

Re: [R] Problems with code containing a for loop

2009-10-09 Thread Erik Iverson
Because you missed your closing parens in the "text" function call. The closing parens is closing the "paste" function, you need one more. I don't know what you're trying to do here, but I am guessing there's a faster way? > -Original Message- > From: r-help-boun...@r-project.org [mai

Re: [R] Handling missing data

2009-10-09 Thread jim holtman
What you want is: book$r<-ifelse(is.na(book$r), 10,book$x+20) On Fri, Oct 9, 2009 at 5:46 AM, premmad wrote: > > I have one column > x > 97 > 94 > 91 > 90 > NA > NA > NA > NA > I tried > book$r<-ifelse(book$x!=NA,book$x+20,10) > I expect to get the result as follows > 107 > 104 > 91 > 90 > 10 >

[R] Help with printing fixed width

2009-10-09 Thread sahil seth
Hello R users, I am writing a summary() for a custom class, and am to display the integers right justified, Say where x is the vector with integers, I am using the following: cat("\t",format(x),"\t"...other columns) this way I am trying to pass the format(x), to the cat function to display it, but

[R] Help producing plot for assessing forecasting accuracy

2009-10-09 Thread Jay Ulfelder
Dear colleagues, I'm trying (and failing) to write the script required to generate a chart that would help me assess the forecasting accuracy of a logistic regression model by plotting the cumulative proportion of observed events occurring in cases across the range of possible predicted probabilit

[R] Re place many rows in a table with new rows in one step

2009-10-09 Thread Zhen Lin
I tried this: (c is the column vector with indices of those rows I want to replace) table[c,]<-replace(table[c,],c,newRows) but it does not work and the error is: new columns would leave holes after existing columns Can anyone help please? Thanks -- View this message in context: http://www.n

Re: [R] Handling missing data

2009-10-09 Thread premmad
I have one column x 97 94 91 90 NA NA NA NA I tried book$r<-ifelse(book$x!=NA,book$x+20,10) I expect to get the result as follows 107 104 91 90 10 10 10 10 But what i was getting is empty column of variable r.How to solve this -- View this message in context: http://www.nabble.com/Handlin

[R] Problems with code containing a for loop

2009-10-09 Thread Antje##
The following code isn't working and we can't figure out why.. letters = c("A","B","C","D","E","F","G","H","I","J") numbers = 1:3 for(i in 1:6){ #6 letters for (j in 1:3) { #3 numbers for (k in -1:1) { #a

[R] Tobit model

2009-10-09 Thread mrsilva
Hi all, I'm from Brazil. I fit a Tobit model to FLUID MILK CONSUMPTION (DEPENDENT VARIABLE) data using survreg (attached). I am confused about the output interpretation and I would like yours explanations. Thanks, Marcio Roberto Silva __

Re: [R] odfWeave & XML error in post-processing

2009-10-09 Thread Duncan Temple Lang
Hi Rob. Without the file content_1.xml or any information from the R call stack (e.g. options(error = recover) and then run the command and dynamically explore the state of affairs when the error occurs), there is no way for us to know what the problem might be. Somehow, the XML parser appears t

Re: [R] proto and get()

2009-10-09 Thread Gabor Grothendieck
In further offline discussion with the poster it was explained that the purpose of this is to display the icon object and not to return an instantiatedProtoMethod which was what the code was attempting to do. That is in proto, g$icon is not the icon object. It is the icon method instantiated with t

Re: [R] Trendline for a subset of data

2009-10-09 Thread Steve Murray
Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Thanks for flagging up the 'segments' command. However=2C I'm having troubl= e getting it to work - this is probably due to me misunderstanding the docu= mentation for this command. Th

Re: [R] Creating a Clustered-Stacked Column Chart

2009-10-09 Thread John Kane
I don't think I've seen an R version, probably because the technique is not very good for displaying data. Have a look at http://chartsgraphs.wordpress.com/tag/r-and-excel/ for an alternative method of displaying the data using lattice. --- On Fri, 10/9/09, zhijie zhang wrote: > From: zhiji

Re: [R] Trendline for a subset of data

2009-10-09 Thread Mark Difford
Hi Steve, >> However, I am finding that ... the trendline ... continues to run beyond >> this data segment >> and continues until it intersects the vertical axes at each side of the >> plot. Your "best" option is probably Prof. Fox's reg.line function in package car. ## library(car) ?reg.line

Re: [R] QQ plot

2009-10-09 Thread John Fox
Dear Madan, Please see the qq.plot() function in the car package. I hope this helps, John > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of Madan Sigdel > Sent: October-09-09 8:54 AM > To: r-help@r-project.org > Subject: [R]

Re: [R] Substituting the extracted coefficients into the formula, exctracted from the result of nls()

2009-10-09 Thread Henrique Dallazuanna
If you want curve with substitute(...), you can try something about like this: f <- eval(parse(text = paste("substitute(", formula(yfit)[3], ", as.list(coef(yfit)))", sep = ""))) curve(f, ...) 2009/10/9 Henrique Dallazuanna : > Try with predict: > > plot(x, y) > lines(0:10, predict(yfit, list(x =

[R] celebrating revision 50000

2009-10-09 Thread Romain Francois
Hello, Today, Brian Ripley commited the revision 5 of R's svn repository. I took this as an opportunity to do some data analysis of the log and posted some code and graphics on my blog: http://romainfrancois.blog.free.fr/index.php?post/2009/10/09/celebrating-R-commit-5 The plots of t

Re: [R] Substituting the extracted coefficients into the formula, exctracted from the result of nls()

2009-10-09 Thread Henrique Dallazuanna
Try with predict: plot(x, y) lines(0:10, predict(yfit, list(x = 0:10))) 2009/10/9 Primoz PETERLIN : > Dear all, > > Here I come with another stupid question.  Suppose I want to use nls() > to fit a series of data (here modelled by generated points), then plot > the points and the fitting curve. I

Re: [R] Trendline for a subset of data

2009-10-09 Thread David Winsemius
On Oct 9, 2009, at 5:50 AM, Steve Murray wrote: Dear all, I am using abline(lm ...) to insert a linear trendline through a portion of my data (e.g. dataset[,36:45]). However, I am finding that whilst the trendline is correctly displayed and representative of the data portion I've chosen

[R] Any reference to Tukeyline algorithm?

2009-10-09 Thread shanmukha patel
Hi, I am using "line" function to plot the line. And I would like to understand "Tukeyline" algorithm. Since, the line function is calling the Tukeyline algorithm(which is compiled code) using foreign function interface, I am not able to look into the source code of this algorithm. Can somebody

Re: [R] Get subset of n dimensional matrix

2009-10-09 Thread Henrique Dallazuanna
Try this: x <- array(1:1000, rep(10, 3)) vList <- list(i = 4:6, j = 4:6, ... = 4:6) do.call('[', c(list(x), vList)) On Fri, Oct 9, 2009 at 7:18 AM, Mark McDowall wrote: > I want to select a subset of an array, but I want to make a function so that > it can handle any number of dimensions. > > Th

Re: [R] Plot with CART results

2009-10-09 Thread Terry Therneau
-begin included message --- With "rpart" we can get several terminals and draw it in the TREE plot. Now I am trying to draw a plot like this: x-axis is each terminal's value, and y-axis is those observe values. Does anyone has idea what gramma should I use? Thanks in advance. -

[R] QQ plot

2009-10-09 Thread Madan Sigdel
Dear list   I want to plot the QQ plot with some distributions like geometrical , lognormal and truncated normal  with confidence bands. does this options available. Iam new to R. If you have any scripts and examples please kindly suggest me.   thank you madan   [[alternative H

Re: [R] About finding NA values sources

2009-10-09 Thread Rene
Dear All, In R, is there a way (or a function) I can quickly check whether all the NA values in one new created numerical variable happened are because of   or something else in the original dataset? And how can we easily group these NAs separately based on different reason (e.g. some NA are

Re: [R] Naming objects in a list

2009-10-09 Thread jim holtman
A couple of ways: List.glm <- list() for(i in 1:n) list.glm[[i]] <-glm(,,,) OR List.glm <- lapply(1:n, function(x) glm(,,,)) On Fri, Oct 9, 2009 at 7:54 AM, P.Branco wrote: > > Hello, > > I am trying to run a for-loop in which I want to add glm output objects > sequentially into a list. I d

[R] Naming objects in a list

2009-10-09 Thread P.Branco
Hello, I am trying to run a for-loop in which I want to add glm output objects sequentially into a list. I do not know how to give names to each object in a list. I tried this : List.glm <- list() for(i in 1:n) list.glm <- list(list.glm, glm(,,,)) but it is obviously unsuited… Best rega

[R] svy / weighted regression

2009-10-09 Thread Laust
Dear list, I am trying to set up a propensity-weighted regression using the survey package. Most of my population is sampled with a sampling probability of one (that is, I have the full population). However, for a subset of the data I have only a 50% sample of the full population. In previous work

Re: [R] I can not install DAAG package . help

2009-10-09 Thread Yanyuan Zhu
Hello joris, when i type the command: > ?installed.packages seems it works fine and shows me the man page of install.packages() Then i followed ur instructions by first removing DAAG > remove.packages("DAAG") Warning in remove.packages("DAAG") : argument 'lib' is missing: using /home/simon/R/i48

Re: [R] I can not install DAAG package . help

2009-10-09 Thread Yanyuan Zhu
Hello David, seems there's sth wrong with my R. I used to start R with Emacs+ESS, so i didn't find the error message till today i ran R in an terminal : si...@simon-t400:~$ R R version 2.9.2 (2009-08-24) Copyright (C) 2009 The R Foundation for Statistical Computing ISBN 3-900051-07-0 R is free s

[R] Get subset of n dimensional matrix

2009-10-09 Thread Mark McDowall
I want to select a subset of an array, but I want to make a function so that it can handle any number of dimensions. This is probably best described with an example > x <- 1:100 > dim(x) <- c(10,10) > x [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,]1 11 21 31 41 51

[R] Trendline for a subset of data

2009-10-09 Thread Steve Murray
Dear all, I am using abline(lm ...) to insert a linear trendline through a portion of my data (e.g. dataset[,36:45]). However, I am finding that whilst the trendline is correctly displayed and representative of the data portion I've chosen, the line continues to run beyond this data segment an

[R] Creating a Clustered-Stacked Column Chart

2009-10-09 Thread zhijie zhang
Hi all, In R, is there some functions or ways to create a Clustered-Stacked Column Chart as the example in the following page http://peltiertech.com/Excel/ChartsHowTo/ClusterStack.html? I have browsed the R Graph Gallery (http://addictedtor.free.fr/graphiques/) and searched the R site, and di

Re: [R] problem with CPU usage

2009-10-09 Thread Paul Hiemstra
Hi, If you work on Windows you can reduce the priority of the Rgui.exe process. You can do this in the task manager, right click > Priority. cheers, Paul venkata kirankumar wrote: Hi all, I have a problem with CPU usage while running the Rgui.exe problem is while I am running scripts on R

  1   2   >