[R] Determine restricted variable in SVAR and SVEC?

2009-10-09 Thread Arif Chandra
How to determine restricted variable in SVAR and SVEC? There are some values which set to be zero and others set to be NA.. How to determine values that set to be 0? Thanks Regards, Arif _

Re: [R] Plot nls line on plot?

2009-10-09 Thread Christian Ritz
Hi Doug, you can add the fitted curve using the following general paradigm: ## Plotting the data plot(p~z) ## Defining grid of z values ## (100 values ensures a smooth curve in your case) zValues - seq(min(z), max(z), length.out = 100) ## Adding predicted values corresponding to the grid

[R] problem with CPU usage

2009-10-09 Thread venkata kirankumar
Hi all, I have a problem with CPU usage while running the Rgui.exe problem is while I am running scripts on Rgui its taking 100% of CPU is there any posibility to reduce the cpu consumption are any package I can use to reduce CPU consumption can any one help me out from this problem because

Re: [R] Parameters of Beta distribution

2009-10-09 Thread Karl Ove Hufthammer
In article 5df5755d-a376-439a-b7f2-9901441db...@comcast.net, dwinsem...@comcast.net says... In insurance situation there is typically a cap on the covered losses and there is also typically an amount below which it would not make sense to offer a policy. So a minimum and a maximum are

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

2009-10-09 Thread 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 figured out some way of doing it: x - runif(1:20, 0, 10) y - 0.1*x^2 - rep(3, length(x)) + rnorm(length(x),

Re: [R] about function *lapply*

2009-10-09 Thread Duncan Murdoch
On 09/10/2009 12:42 AM, guangchuang yu wrote: I used *lapply* and *for* to call the function *GetC* respectively. The output is different!!! I can't figured out how this happen! It's so wierd. x=lapply(ipi.go,GetC, ont = BP, org=cell.cycle) unlist(x) *IPI00011654 IPI00013683 cell cycle cell

Re: [R] error message - unexpected input

2009-10-09 Thread Jim Lemon
On 10/09/2009 07:15 AM, David Winsemius wrote: On Oct 8, 2009, at 3:28 PM, Danielle Dandreaux wrote: ... The syntax line that appears to be causing problems is: dataname=Igt2model.txt and the error message is: Error: unexpected input in dataname= Hi Danielle, This sort of error often

Re: [R] Bringing dbf Data With SQL

2009-10-09 Thread Jim Lemon
On 10/09/2009 07:17 AM, Michael Yutzi wrote: I have a heavy DATA saved in dbf format. What I want is to bring that data to R with SQL statements. Like: I want columns 1, 4, 5 and only when column 4 30. Sorry asking it here instead of keep searching in manuals, but it seems that there are too

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] 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

[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

[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 61

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

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

[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

[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

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 pjlbra...@yahoo.com wrote: Hello, I am trying to run a for-loop in which I want to add glm output objects sequentially into

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 nbsp; or something else in the original dataset? And how can we easily group these NAs separately based on different reason (e.g. some NA

[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

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.

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 markmcdowa...@googlemail.com wrote: I want to select a subset of an array, but I want to make a function so that it can handle any

[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] 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

[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

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 www...@gmail.com: Try with predict: plot(x, y) lines(0:10, predict(yfit,

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] QQ

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 reg.line

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 rusers...@gmail.com

Re: [R] Trendline for a subset of data

2009-10-09 Thread Steve Murray
cb247343-29ec-495a-ba8e-d5a466bab...@comcast.net 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

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

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

[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) { #answer -1,right or

[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] 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:

[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:

[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

[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

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 mtechp...@gmail.com 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 10

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

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:

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 sahiils...@gmail.com 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:

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## ann3bu...@hotmail.com À: r-help@r-project.org Envoyé: Vendredi 9 Octobre 2009 17h36:34 GMT

[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) { #answer -1,right

[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){ #6

[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

Re: [R] Problems with code

2009-10-09 Thread Barry Rowlingson
On Fri, Oct 9, 2009 at 4:54 PM, Anne Buunk ann3bu...@hotmail.com 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

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 ann3bu...@hotmail.com wrote: Hi. With your help, I've fixed the errors in my for loops. But now, the for loop isn't working correctly. There

[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

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

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

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?. What commands

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

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:

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:

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

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))) # z and lag(z) have

Re: [R] Trendline for a subset of data

2009-10-09 Thread Steve Murray
b2a99330-1d1d-49cc-b287-81f37c16b...@comcast.net 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

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] 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 murdoch

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

[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

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 mudiver1...@yahoo.com 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

Re: [R] Satellite ocean color palette?

2009-10-09 Thread Barry Rowlingson
On Fri, Oct 9, 2009 at 7:51 PM, Tim Clark mudiver1...@yahoo.com 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)

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 out

[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 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 b.rowling...@lancaster.ac.uk wrote: From: Barry Rowlingson b.rowling...@lancaster.ac.uk Subject: Re: [R] Satellite ocean color palette? To:

[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

[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

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

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 lanc...@fns.uniba.sk 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

[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] 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] 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

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

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,17)

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

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 it

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 wht_...@yahoo.com wrote: From: carol white wht_...@yahoo.com

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

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] 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] 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

[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

[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 -

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

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] 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 mudiver1...@yahoo.com 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

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 jrkrid...@yahoo.ca 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

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

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

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 between

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

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.

[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

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