[R] using function instead of formula in plm

2008-09-12 Thread Erich STRIESSNIG
Hi all, I am trying to use plm to estimate coefficients in a model consisting of a system of equations. So far I used mle2 from the package "bbmle", but now I need to test for autocorrelation and mle2 does not provide for the necessary tests. mle2 needs a 'function' as input that might as well con

[R] Help with ARIMA seasonal time series

2008-09-12 Thread rkevinburton
I have a set of data that is basically 3+ years of data. It is daily sales for this year and then back 3 years so there are 3*365 + 231 days or 1326 days of data. Since this is a time series I have constructed it as: Start = c(1, 1) End = c(4, 231) Frequency = 365 In trying to ayalyze this d

Re: [R] Error in "[<-"(`*tmp*`, i, value = numeric(0)) :

2008-09-12 Thread Prof Brian Ripley
On Fri, 12 Sep 2008, sandsky wrote: I use "while" loop but it produces an errro. I have no idea about this. Error in "[<-"(`*tmp*`, i, value = numeric(0)) : nothing to replace with What version of R is this? I suspect not a recent one. I get Error in verpi[i] <- c(5^alpha[i - 1], 1

Re: [R] match and incomparables

2008-09-12 Thread Prof Brian Ripley
On Fri, 12 Sep 2008, Bert Gunter wrote: Looks like a bug to me. Compare: A bug fixed in the R-devel version of R (because of a related problem with duplicated). match (1:3,1:3,incom=3) [1] 1 2 3 match (1:3,1:3,incom=2:3) [1] 1 2 3 match (1:3,1:3,incom=1:2) [1] NA NA 3 match (1:3,1:3

Re: [R] bubble(circle) plot help.

2008-09-12 Thread Yihui Xie
The function symbols() is in the package 'graphics', so you don't need any add-on packages. For example: # similar code to the example you mentioned set.seed(1) symbols(x = rnorm(50), y = rnorm(50), circles = abs(rnorm(50)), main = "Circles Plot") Yihui On Sat, Sep 13, 2008 at 11:48 AM, Wen

Re: [R] bubble(circle) plot help.

2008-09-12 Thread Roy Mendelssohn
Hi: On Sep 12, 2008, at 8:35 PM, Wen Gu wrote: I need help creating a bubbleplot, like a simple pseudo three dimensional scatterplot of circles whose sizes index a 3rd variable. I initially came across this at http://addictedtor.free.fr/graphiques/graphcode.php?graph=73 but the circle

Re: [R] bubble(circle) plot help.

2008-09-12 Thread Yihui Xie
?symbols use the argument "circles" On Sat, Sep 13, 2008 at 11:35 AM, Wen Gu <[EMAIL PROTECTED]> wrote: > > I need help creating a bubbleplot, like a simple pseudo three dimensional > scatterplot of circles whose sizes index a 3rd variable.I initially > came across this at > http://add

[R] bubble(circle) plot help.

2008-09-12 Thread Wen Gu
I need help creating a bubbleplot, like a simple pseudo three dimensional scatterplot of circles whose sizes index a 3rd variable.I initially came across this at http://addictedtor.free.fr/graphiques/graphcode.php?graph=73 but the circleplot function does not exist in fbasic as listed

Re: [R] Help with 'spectrum'

2008-09-12 Thread David Stoffer
Kevin- this is a simple rescaling of the axes so that the "area under the curve" remains constant (and is half of the variance since you only look at the positive frequencies). In this case, freq(x) = 1/dx, where dx is the time between points. It is basically a graphic device so that you get p

[R] QCC - Change Background Color and Remove X Axis Text

2008-09-12 Thread Dean Yergens
Hi, I am working with QCC and would like help with the following: a) Change the color of the background. I tried bg="#FF" in par and also in qcc and it did not work. b) I want to remove the X Axis Text (i.e. 1, 2, 3 ... n) -- but xaxt="n" does not work in qcc. Thanks -- View this message

Re: [R] Error in solve.default(Hessian) : system is computationally singular

2008-09-12 Thread rkevinburton
I don't have a solution but I receive the same error when trying to fit a GARCH model using the garchFit in the fGarch package. Kevin Desislava Kavrakova <[EMAIL PROTECTED]> wrote: > Hello everyone, > I'm trying to estimate the parameters of the returns series attached using > the GARCH c

[R] Symbols on a Capsacale Object

2008-09-12 Thread Rodrigo Aluizio
Hi, I'm a beginner with R, but I'm getting excellent results with it. Well I've got an capscale object (vegan package) and I want to made a biplot with symbols representing six groups of areas. The plot.cca function and some par attributes (like 'labels') I was able to substitute the samples name

[R] Error in "[<-"(`*tmp*`, i, value = numeric(0)) :

2008-09-12 Thread sandsky
I use "while" loop but it produces an errro. I have no idea about this. Error in "[<-"(`*tmp*`, i, value = numeric(0)) : nothing to replace with The problem description is The likelihood includes two parameters to be estimated: lambda (=beta0+beta1*x) and alpha. The algorithm for the e

[R] Error in solve.default(Hessian) : system is computationally singular

2008-09-12 Thread Desislava Kavrakova
Hello everyone, I'm trying to estimate the parameters of the returns series attached using the GARCH code below, but I get the following error message: Error in solve.default(Hessian) : system is computationally singular: reciprocal condition number = 0 Error in diag(solve(Hessian)) : erro

Re: [R] Scatterplot with data grouped by color

2008-09-12 Thread hadley wickham
On Fri, Sep 12, 2008 at 5:29 PM, Amanda Young <[EMAIL PROTECTED]> wrote: > Hi, > I am a complete R rookie so this question is probably really simple > but I haven't found an answer on the web that I can understand. > > My data frame has 3 columns, A, B and C. A and B have numbers (about > 8000 rows

Re: [R] match and incomparables

2008-09-12 Thread Bert Gunter
Looks like a bug to me. Compare: > match (1:3,1:3,incom=3) [1] 1 2 3 > match (1:3,1:3,incom=2:3) [1] 1 2 3 > match (1:3,1:3,incom=1:2) [1] NA NA 3 > match (1:3,1:3,incom=1) [1] NA 2 3 Cheers, Bert -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Adam

Re: [R] Scatterplot with data grouped by color

2008-09-12 Thread Jorge Ivan Velez
Dear Amanda, Try this: # Data set set.seed(123) DF=data.frame(A=rnorm(10),B=rpois(10,10),C=sample(1:3,10,replace=T)) attach(DF) # Plot plot(A,B,pch=16,col=C) legend('topleft',paste('Group',1:3,sep=" "),col=1:3,pch=16) HTH, Jorge On Fri, Sep 12, 2008 at 6:29 PM, Amanda Young <[EMAIL PROTECTED

Re: [R] Scatterplot with data grouped by color

2008-09-12 Thread Henrik Bengtsson
See argument 'col' to plot()/points(). Setup a 'col' vector of length equal to the number of data points and have the 'C' variable specify the colors of the individual elements. Then call plot()/points() with argument 'col'. My $.02 /HB On Fri, Sep 12, 2008 at 3:29 PM, Amanda Young <[EMAIL PRO

Re: [R] Power PC with a linux distribution and R

2008-09-12 Thread Adam D. I. Kramer
Hi El, As does my PowerBook G4 with 2GB of RAM. The iBook shipped with 256MB, however, which Leopard does not run well on. My point was more that Linux was superior to MacOS in the case of very low memory...not that the chip was somehow the problem. ...but now I am solidly off-topic! Cheers, Ad

[R] Scatterplot with data grouped by color

2008-09-12 Thread Amanda Young
Hi, I am a complete R rookie so this question is probably really simple but I haven't found an answer on the web that I can understand. My data frame has 3 columns, A, B and C. A and B have numbers (about 8000 rows), C is a factor which is either true or false. So I can plot A vs B with plot

Re: [R] Power PC with a linux distribution and R

2008-09-12 Thread Dr Eberhard W Lisse
Adam, I (or rather the kids and the wife) got two iMinis and one iBook with G4. They all run 10.5.4 happily on their 1GB of RAM... greetings, el On 12 Sep 2008, at 23:43 , Adam D. I. Kramer wrote: To Stephen's credit, Apple will no longer support PowerPC chips (such as his G4) in the next op

Re: [R] match and incomparables

2008-09-12 Thread Adam D. I. Kramer
I can replicate this and also do not understand it. match(1:3,1:3,incomparables=5) [1] NA 2 3 match(1:3,1:3,incomparables=4) [1] 1 2 3 match(1:3,1:3,incomparables=3) [1] 1 2 3 match(1:3,1:3,incomparables=2) [1] 1 2 3 match(1:3,1:3,incomparables=1) [1] NA 2 3 ...every other integer

Re: [R] Power PC with a linux distribution and R

2008-09-12 Thread Adam D. I. Kramer
To Stephen's credit, Apple will no longer support PowerPC chips (such as his G4) in the next operating system (Snow Leopard), so some sort of switchover will be necessary in order to maintain SOME sort of state-of-the-art software packaging for PPC-based Mac users in the near future. Also, it is

Re: [R] Power PC with a linux distribution and R

2008-09-12 Thread Dirk Eddelbuettel
On 12 September 2008 at 16:30, stephen sefick wrote: | This is an operating system question, but it is with the intent of | using R on that operating system. I have an ibook G4 Power PC that I | am going to install linux on. Is there a better, worse, or perhaps | easier (I am a linux newby migra

Re: [R] Power PC with a linux distribution and R

2008-09-12 Thread Dr Eberhard W Lisse
Yes, of course. That's why the :-)-O was there el On 12 Sep 2008, at 23:01 , Doran, Harold wrote: Are you aware that a BSD unix OS runs on the mac already? __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do

Re: [R] Power PC with a linux distribution and R

2008-09-12 Thread stephen sefick
yes, but the os now is 10.3.9 and I am starting to have a couple of troubles with some things, and the os boxed with my mac mini are intel specific, so they won't install on my poor old booger ppc. So, it has precipitated this move. I can always go back if I don't like it. it's just time right?

Re: [R] Power PC with a linux distribution and R

2008-09-12 Thread Doran, Harold
Are you aware that a BSD unix OS runs on the mac already? -Original Message- From: [EMAIL PROTECTED] on behalf of Dr Eberhard W Lisse Sent: Fri 9/12/2008 4:38 PM To: stephen sefick Cc: R-help Mailing List; Dr Eberhard W Lisse Subject: Re: [R] Power PC with a linux distribution and R Yes

Re: [R] Power PC with a linux distribution and R

2008-09-12 Thread Dr Eberhard W Lisse
Yes, I'd install the OS X Leopard (10.5.4) distribution on it :-)-O el On 12 Sep 2008, at 22:30 , stephen sefick wrote: This is an operating system question, but it is with the intent of using R on that operating system. I have an ibook G4 Power PC that I am going to install linux on. Is th

[R] Power PC with a linux distribution and R

2008-09-12 Thread stephen sefick
This is an operating system question, but it is with the intent of using R on that operating system. I have an ibook G4 Power PC that I am going to install linux on. Is there a better, worse, or perhaps easier (I am a linux newby migrating from mac) distribution that I should look at. I apprecia

[R] match and incomparables

2008-09-12 Thread McGehee, Robert
Hello, I was playing around with the newly implemented 'incomparables' argument in 'match' and realized the argument does not behave anything like I expected. Can someone explain what is going on here? Sorry if I'm misreading the documentation. > match(1:3, 1:3, incomparables=1) [1] NA 2 3 # Th

Re: [R] tryCatch question

2008-09-12 Thread Henrik Bengtsson
On Fri, Sep 12, 2008 at 6:02 AM, Antje <[EMAIL PROTECTED]> wrote: > Hi there, > > I have a nested call of lapply in which I do a tryCatch statement like this > > lapply(1:length(p_names), function(w_idx) { >r <- as.numeric(pos_r[[w_idx]][1]) >c <- as.numeric(pos_c[[w_idx]][1]) >

Re: [R] Join data by minimum distance

2008-09-12 Thread Roy Mendelssohn
Hi Monica: On Sep 12, 2008, at 11:59 AM, Monica Pisica wrote: I am wondering if there is a function which will do a join between 2 data.frames by minimum distance, as it is done in ArcGIS for example. For people who are not familiar with ArcGIS here it is an explanation: Suppose you ha

[R] Join data by minimum distance

2008-09-12 Thread Monica Pisica
I am wondering if there is a function which will do a join between 2 data.frames by minimum distance, as it is done in ArcGIS for example. For people who are not familiar with ArcGIS here it is an explanation: Suppose you have a data.frame with x, y, coordinates called track, and a second data

Re: [R] trouble printing from graphics device in R 2.7.2

2008-09-12 Thread Prof Brian Ripley
I've tracked this down to the clipping bug fix reported in the CHANGES file. There is another bug fix in R-devel that does not affect printing, so your first option is to use one of the R-devel snapshots on CRAN. I'll move the R-devel fix to R-patched shortly, so tonight's R-patched snapshot

Re: [R] reading in results from system(). There must be an easier way...

2008-09-12 Thread Prof Brian Ripley
Why not use con <- pipe(COMMAND) foo <- read.delim(con, colClasses="numeric") close(con) ? See the 'R Data Input/Output Manual'. On Fri, 12 Sep 2008, Michael A. Gilchrist wrote: Hello, I am currently using R to run an external program and then read the results the external program sends to

Re: [R] subsetting of factor

2008-09-12 Thread Hui-Yi Chu
Hi Adai, It works!! Thanks a lot!! Hui-Yi On Fri, Sep 12, 2008 at 11:26 AM, Adaikalavan Ramasamy < [EMAIL PROTECTED]> wrote: > help(rowttests) says that fac needs to be a factor. So how about ? > > m <- matrix( rnorm(30), nc=6 ) > genotype <- c("a", "a", "b", "b", "c", "c") > > w1 <- which(

Re: [R] reading in results from system(). There must be an easier way...

2008-09-12 Thread Henrik Bengtsson
Hi, a few comments below. On Fri, Sep 12, 2008 at 9:34 AM, Michael A. Gilchrist <[EMAIL PROTECTED]> wrote: > Hello, > > I am currently using R to run an external program and then read the results > the external program sends to the stdout which are tsv data. > > When R reads the results in it con

Re: [R] reading in results from system(). There must be an easier way...

2008-09-12 Thread Gabor Grothendieck
The conversion to a data frame and the transpose might be time consuming. In addition to other comments you have received, try this: matrix(rawinput, ncol = 6, byrow = TRUE) and if you don't really need a data frame eliminate the conversion from matrix to data.frame. You might time this against

Re: [R] reading in results from system(). There must be an easier way...

2008-09-12 Thread Marc Schwartz
on 09/12/2008 11:34 AM Michael A. Gilchrist wrote: > Hello, > > I am currently using R to run an external program and then read the > results the external program sends to the stdout which are tsv data. > > When R reads the results in it converts it to to a list of strings which > I then have to

[R] reading in results from system(). There must be an easier way...

2008-09-12 Thread Michael A. Gilchrist
Hello, I am currently using R to run an external program and then read the results the external program sends to the stdout which are tsv data. When R reads the results in it converts it to to a list of strings which I then have to maniuplate with a whole slew of commands (which, figuring out

Re: [R] Truncating dates (and other date-time manipulations)

2008-09-12 Thread Jeff Ryan
Not really the ceiling and floor, though I haven't tried your code (and my brain isn't at 100% capacity today to simply parse the code in my head :) ) Though I think ?firstof and ?lastof as well as startof/endof might be something along those lines. ?to.period has the ability to change periodici

Re: [R] Truncating dates (and other date-time manipulations)

2008-09-12 Thread hadley wickham
On Fri, Sep 12, 2008 at 10:53 AM, Jeff Ryan <[EMAIL PROTECTED]> wrote: > > I'm still not entirely sure I follow the desired usage, as the original post > made no reference to ggplot2, but as Gabor mentioned the yearmon etc stuff > is quite useful. Well, I said "I need to be able to correct draw da

Re: [R] Truncating dates (and other date-time manipulations)

2008-09-12 Thread Jeff Ryan
One last item that could be of use: ?timeBasedSeq Lets you create ranges in any standard format, with simple ISO style formatting. The level of detail you specify is interpreted as the resolution that is desired. e.g. > timeBasedSeq(2000/2008) [1] "2000-01-01" "2001-01-01" "2002-01-01" "2003-01

Re: [R] Truncating dates (and other date-time manipulations)

2008-09-12 Thread Jeff Ryan
I'm still not entirely sure I follow the desired usage, as the original post made no reference to ggplot2, but as Gabor mentioned the yearmon etc stuff is quite useful. If you are formatting arbitrary precision dates, take a look at axTicksByTime in xts. Both xts and quantmod use it for plotting

Re: [R] making spearman correlation cor() call fail with log(0) as input

2008-09-12 Thread Timur Shtatland
I am more used to getting an error if you try to take the log of 0, like this (in Perl): perl -le 'for my $num (1, 0, -1, -2) { print log $num; }' 0 Can't take log of 0 at -e line 1. R is different. With R, you do not even get a *warning* about log(0). Only log() of negative number produces a war

Re: [R] Again, about boxplot

2008-09-12 Thread Marc Schwartz
on 09/12/2008 10:36 AM Marc Schwartz wrote: > on 09/12/2008 10:07 AM cathelf wrote: >> Thank you for your guys reply for my previous question. But I got one more >> question about the boxplot. With the code in the R-help: >> >> boxplot(len ~ dose, data = ToothGrowth, >> boxwex = 0.25, at =

Re: [R] Again, about boxplot

2008-09-12 Thread stephen sefick
?factor On Fri, Sep 12, 2008 at 11:33 AM, Adaikalavan Ramasamy <[EMAIL PROTECTED]> wrote: > I just changed the 'at' argument and added an 'xlim' option. > > boxplot(len ~ dose, data = ToothGrowth, > boxwex = 0.25, at = 1:3, > subset = which(supp == "VC"), col = "yellow", >

Re: [R] Again, about boxplot

2008-09-12 Thread Adaikalavan Ramasamy
I just changed the 'at' argument and added an 'xlim' option. boxplot(len ~ dose, data = ToothGrowth, boxwex = 0.25, at = 1:3, subset = which(supp == "VC"), col = "yellow", main = "Guinea Pigs' Tooth Growth", xlab = "Vitamin C dose mg", ylab = "t

Re: [R] Again, about boxplot

2008-09-12 Thread Marc Schwartz
on 09/12/2008 10:07 AM cathelf wrote: > Thank you for your guys reply for my previous question. But I got one more > question about the boxplot. With the code in the R-help: > > boxplot(len ~ dose, data = ToothGrowth, > boxwex = 0.25, at = 1:3 - 0.2, > subset = supp == "VC", col =

Re: [R] subsetting of factor

2008-09-12 Thread Adaikalavan Ramasamy
help(rowttests) says that fac needs to be a factor. So how about ? m <- matrix( rnorm(30), nc=6 ) genotype <- c("a", "a", "b", "b", "c", "c") w1 <- which( genotype %in% c("a", "b") ) w2 <- which( genotype %in% c("a", "c") ) w3 <- which( genotype %in% c("b", "c") ) list( ab = rowttes

Re: [R] how to plot monthly mean data showing missing months

2008-09-12 Thread Richard . Cotton
> As per my attached script I am ploting monthly mean data which has missing > months. > But in the plot missing months are not shown (plot attached). > Kindly help how to show complete plot (Jan-Dec) with missing months. I don't accept scripts from strangers, but I guess the problem looks like

[R] Again, about boxplot

2008-09-12 Thread cathelf
Thank you for your guys reply for my previous question. But I got one more question about the boxplot. With the code in the R-help: boxplot(len ~ dose, data = ToothGrowth, boxwex = 0.25, at = 1:3 - 0.2, subset = supp == "VC", col = "yellow", main = "Guinea Pigs' Tooth Grow

Re: [R] making spearman correlation cor() call fail with log(0) as input

2008-09-12 Thread Greg Snow
Just out of curiosity, why do you want the spearman rank correlation to error in this case? One of the advantages of the spearman correlation is that it is invariant to monotone transformations, so most people that use it see the fact that corr(x,y, method='spearman') gives the same answer as c

Re: [R] Odp: Help with 'spectrum'

2008-09-12 Thread stephen sefick
1/(x-axis value) = frequency in time (the x-axis is in cycles per time) 2008/9/12 Petr PIKAL <[EMAIL PROTECTED]>: > Hi > > [EMAIL PROTECTED] napsal dne 09.09.2008 18:44:34: > >> For the command 'spectrum' I read: >> >> The spectrum here is defined with scaling 1/frequency(x), following > S-PLUS. >

Re: [R] Loop to fill in array skips over certain columns

2008-09-12 Thread Greg Snow
FAQ 7.31 -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [EMAIL PROTECTED] (801) 408-8111 > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of [EMAIL PROTECTED] > Sent: Friday, September 12, 2008 7:36 AM > To: r-help@r-

Re: [R] Fw: Complex sampling survey _ Use of survey package

2008-09-12 Thread Ahoussou Sylvie
Hi Tobias, Thanks for your answer but it doesn't change the error message clustot <- svydesign(id=~num+Id_An, fpc=~fpc1+Totanim, data=tab1) Erreur dans as.fpc(fpc, strata, ids) : FPC implies >100% sampling in some strata Maybe the probleme is that in some farms all the animals were examined

Re: [R] Calculate mean/var by ID

2008-09-12 Thread Adaikalavan Ramasamy
AFAIK, tapply() only works for one variable (apart from the grouping variable). It might be perhaps better to use split() here: df <- data.frame(ID = c(111, 111, 111, 178, 178, 138, 138, 138, 138), value = c(5, 6, 2, 7, 3, 3, 8, 7, 6), Seg = c(2, 2, 2,

Re: [R] Greyed text in the background of a plot

2008-09-12 Thread Mark Difford
Hi Yihui, That's good, I like it! Very nice site. Regards, Mark. Yihui Xie wrote: > > Well, his talk seems to have attracted a lot of people... You may > simply use gray text in your plot. Here is an example: > > ## > x = runif(10) > y = runif(

Re: [R] Greyed text in the background of a plot

2008-09-12 Thread Prof Brian Ripley
An alternative is to use semi-transparency, which can be helpful if you want to do more than one such annoation. E.g. add text(1, 1, "More", col=rgb(0,0,0,0.2), cex=3) to this example. (I'd say it was closer to what "ghosted" might mean.) On Fri, 12 Sep 2008, Mark Difford wrote: Hi Agust

Re: [R] arima and xreg

2008-09-12 Thread Jose Capco
Thats nice thanks =) .. I can trick R to do multivariate armax with lagged inputs as well and I bet R people didnt designed it that way (but the idea is the same when doing MLE, it must work).. anyway.. I wrote a small code (you can change it if you want) that does armax with multiple inputs in ma

Re: [R] Greyed text in the background of a plot

2008-09-12 Thread Yihui Xie
Well, his talk seems to have attracted a lot of people... You may simply use gray text in your plot. Here is an example: ## x = runif(10) y = runif(10) z = runif(10, 0.1, 0.3) cl = rgb(runif(10), runif(10), runif(10), 0.5) # transparent colors! par(m

Re: [R] Greyed text in the background of a plot

2008-09-12 Thread Mark Difford
Hi Agustin, >> Is there any way of having a greyed ("ghosted") text... Yes! ## plot(1, type="n") text(1, "Old Grey Whistle Test", col="slategray4", cex=2) text(1, y=1.2, "OH!", col="grey95", cex=4) Then plot what you want on top. If you export or plot to a PDF/ps device the last-plotted items

[R] Fw: Complex sampling survey _ Use of survey package

2008-09-12 Thread Ahoussou Sylvie
-- From: "Ahoussou Sylvie" <[EMAIL PROTECTED]> Sent: Friday, September 12, 2008 9:48 AM To: "Thomas Lumley" <[EMAIL PROTECTED]> Subject: Re: [R] Complex sampling survey _ Use of survey package Thanks for your answer I think I made a mistake when

Re: [R] Calculate mean/var by ID

2008-09-12 Thread Julia Liu
Adai, Thank you so much for your help. I like your code the best. :) So simple. I have another question though, if you don't mind. I'd like to include another variable in "res". This variable defines the segmentation of each person (ranges, say, from 1 to 4). ID value Seg 111 5 2

[R] how to plot monthly mean data showing missing months

2008-09-12 Thread Yogesh Tiwari
Dear R users, As per my attached script I am ploting monthly mean data which has missing months. But in the plot missing months are not shown (plot attached). Kindly help how to show complete plot (Jan-Dec) with missing months. Regards, Yogesh file<-read.csv("CRI-run109-run110.csv") names(file) a

[R] Greyed text in the background of a plot

2008-09-12 Thread Agustin Lobo
Hi! Is there any way of having a greyed ("ghosted") text (i.e, 2006) in the background of a plot? I'm making a dynamic plot and would like to show the year of each time step as a big greyed text in the background. (the idea comes from Hans Rosling video: http://video.google.com/videoplay?docid=4

[R] Loop to fill in array skips over certain columns

2008-09-12 Thread poastpd
Hello, Below is a simple loop that should place a 3 in the first row of each column in the array "List". iterations<-3 tweaksize<-0.00 ii <-1 List=array(-1000, dim=c(iterations,11)) colnames(List) <- c("orig", "0.05", "0.10", "0.15","0.20","0.25","0.30","0.35","0.40","0.45","0.50") Entry=3

[R] for posterior distribution for Gamma GLM

2008-09-12 Thread 93354504
Dear all, There are some R package that provide posterior distribution of logit, probit models. Does anyone know any R package that can provide posterior distribution for Gamma-GLM ? Thank you. Alex __ R-help@r-project.org mailing list https://stat.

[R] R for data mining remotely

2008-09-12 Thread Ajay ohri
Hi, I have looked at packages like SNOW and FF , for distributed computing but got overwhelmed a bit. I need to know how to put a R GUI (like Rattle) on say a Hadoop backed platform on remote computing (like Amazon Web Services). Please let me know regarding any help in this. -- Regards, Ajay O

Re: [R] plotCI -- multiple plots on same graph

2008-09-12 Thread bioinformatics_guy
Thank you all for the help! I had a friend look at it and basically what he did was do an initial plot() of the line (which was all the mean values) and then use ylower and yupper to plot 2 addition line() which he set lyt=3 to so they would look like points. I know its a dirty hack but it worke

Re: [R] From time-strings to Unix-Epoche-time?

2008-09-12 Thread Prof Brian Ripley
On Fri, 12 Sep 2008, Oliver Bandel wrote: Hello, I have strings with date-/time-data from a logfile. For a sort-by-time (and other time-related analysis) I need something to convert the times to the Unix-epoche-time (better also with parts of seconds). Is there something that does that job (

Re: [R] From time-strings to Unix-Epoche-time?

2008-09-12 Thread jim holtman
If you are using POSIXct, just 'unclass' the value: > x <- as.POSIXct('2008-09-12 09:00') > str(x) POSIXct[1:1], format: "2008-09-12 09:00:00" > unclass(x) [1] 122121 attr(,"tzone") [1] "" On Fri, Sep 12, 2008 at 9:15 AM, Oliver Bandel <[EMAIL PROTECTED]> wrote: > Hello, > > > I have string

Re: [R] Truncating dates (and other date-time manipulations)

2008-09-12 Thread Jeffrey J. Hallman
d secondly(n) -> 4000 + n. If 'n' divides evenly into 3600 for 'secondly(n)', the return code will be the same as 'hourly(n/3600)'. For 'secondly(n)' and 'minutely(n)', if 'n' divides evenly into 60, the return code

Re: [R] point with change of tendecy

2008-09-12 Thread Petr PIKAL
[EMAIL PROTECTED] napsal dne 12.09.2008 15:24:17: > Dear Ramon, > > I don´t know anything about time series, but if you are looking for to > identify thresholds (i.e. breaking points ; broken stick ; piece-wise > regression) segmented package may help you. Or maybe strucchange. Regards Petr >

[R] Odp: Help with 'spectrum'

2008-09-12 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 09.09.2008 18:44:34: > For the command 'spectrum' I read: > > The spectrum here is defined with scaling 1/frequency(x), following S-PLUS. > This makes the spectral density a density over the range (-frequency(x)/2, > +frequency(x)/2], whereas a more common sca

Re: [R] point with change of tendecy

2008-09-12 Thread milton ruser
Dear Ramon, I don´t know anything about time series, but if you are looking for to identify thresholds (i.e. breaking points ; broken stick ; piece-wise regression) segmented package may help you. Cheers, miltinho astronauta brazil On Fri, Sep 12, 2008 at 9:39 AM, Ramon Hidalgo <[EMAIL PROTECTE

[R] Odp: subscript out of bounds

2008-09-12 Thread Petr PIKAL
Hi [EMAIL PROTECTED] napsal dne 11.09.2008 19:11:55: > I'm working on Human Exon Array 1.0 ST. I'm getting normalized data > fine but I'm running into problems with QC. QCReport gives me the > following error: > > > load(file= "huex10stv2cdf.rda") > > [EMAIL PROTECTED] <- "huex10stv2cdf"

[R] From time-strings to Unix-Epoche-time?

2008-09-12 Thread Oliver Bandel
Hello, I have strings with date-/time-data from a logfile. For a sort-by-time (and other time-related analysis) I need something to convert the times to the Unix-epoche-time (better also with parts of seconds). Is there something that does that job (or a similar conversion) in R? TIA, Olive

[R] tryCatch question

2008-09-12 Thread Antje
Hi there, I have a nested call of lapply in which I do a tryCatch statement like this lapply(1:length(p_names), function(w_idx) { r <- as.numeric(pos_r[[w_idx]][1]) c <- as.numeric(pos_c[[w_idx]][1]) pos <- c(r,c) lapply(1:length(p_names[[w_idx]]), function(p_idx,

[R] Installing R Project on a PS3 - Success

2008-09-12 Thread John Murray
I've been trying to install R on a PS3 for several weeks now without success and have read various posts here, and elsewhere, on this and installing R on other PPC64 architecture machines which have given me some pointers. Yesterday, after much frustration, I finally succeeded and it runs well. A

Re: [R] Splitting column into multiple columns

2008-09-12 Thread Henrique Dallazuanna
Try this: t(sapply(strsplit(gsub("a", "", ln), "(,)|(,0+)"), as.numeric)) On Fri, Sep 12, 2008 at 9:55 AM, Ajay ohri <[EMAIL PROTECTED]> wrote: > Hi Henrique , > > Thanks for this. An additional problem is that each row begins and ends > with a " > > So when i try and copy and paste (94 rows) ,

Re: [R] Splitting column into multiple columns

2008-09-12 Thread Ajay ohri
Hi Henrique , Thanks for this. An additional problem is that each row begins and ends with a " So when i try and copy and paste (94 rows) , it does not work with the last value within a row. Each row has some 50 x1,y1,0 values. How to modify the code for this? Regards, Ajay _

Re: [R] plotCI -- multiple plots on same graph

2008-09-12 Thread hadley wickham
> I have a bunch of lines I want to plot using plotCI() > > What Id like to know is, how can I connect the points with a line and how > can I print multiple lines on the same graph? You might want to have a look at ggplot2, e.g. http://had.co.nz/ggplot2/geom_errorbar.html, for an alternative way t

[R] point with change of tendecy

2008-09-12 Thread Ramon Hidalgo
Hi, As I can obtain, of a temporary series, if it has some point where a significant change of tendency takes place. Tank's Ramón Hidalgo [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/li

Re: [R] sink file type and Latex (Lyx)

2008-09-12 Thread Joanne Demmler
Thanks very much! options(useFancyQuotes=FALSE) did the trick! Joanne P.S.: For reference I'm running R on Linux Fedora 8: > Sys.getlocale() [1] "LC_CTYPE=en_US.UTF-8;LC_NUMERIC=C;LC_TIME=en_US.UTF-8;LC_COLLATE=en_US.UTF-8;LC_MONETARY=C;LC_MESSAGES=en_US.UTF-8;LC_PAPER=en_US.UTF-8;LC_NAME=C;LC

Re: [R] Splitting column into multiple columns

2008-09-12 Thread Henrique Dallazuanna
Try this: lines <- "77.56787,22.09909,0 73.26787,21.09909,0 76.53487,23.09909,0 75.56787,22.09909,0 76.54587,22.09909,0 76.56787,22.03509,0 75.56457,22.05609,0 76.56787,22.05609,0" ln <- readLines(textConnection(lines)) t(sapply(strsplit(ln, "(,)|(,0+)"), as.numeric)) On Fri, Sep 12, 2008 at 9

[R] Splitting column into multiple columns

2008-09-12 Thread Ajay ohri
Hi All, I have the following data in one column for each row , (each value is like x1,y1,z1 space x2,y2,z2 space) 77.56787,22.09909,0 73.26787,21.09909,0 76.53487,23.09909,0 75.56787,22.09909,0 76.54587,22.09909,0 76.56787,22.03509,0 75.56457,22.05609,0 76.56787,22.05609,0 Note all z valu

Re: [R] sink file type and Latex (Lyx)

2008-09-12 Thread Prof Brian Ripley
On Fri, 12 Sep 2008, Joanne Demmler wrote: Does anyone know what file type sink is outputting to? To be pedantic, whatever the connection you diverted to is using. For a default file() connection, this is a plain text file in the encoding of the current locale. I've been reverting output

Re: [R] Finding a vector position using names rather than values

2008-09-12 Thread Jonsson, Pall
Thanks, that's very helpful! Also, many thanks to Dimitris Rizopoulos and Robin Williams who both came up with good solutions to my problem. Pall -Original Message- From: Henrique Dallazuanna [mailto:[EMAIL PROTECTED] Sent: 12 September 2008 12:26 To: Jonsson, Pall Cc: r-help@r-project

[R] Skewness

2008-09-12 Thread Arun Kumar Saha
I would like to know about the skewness function bundled in fBasics package. Is it population measure of skewness or sample estimate? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo

Re: [R] Finding a vector position using names rather than values

2008-09-12 Thread Henrique Dallazuanna
Try this: order(row_median)[names(row_median) == "R3"] On Fri, Sep 12, 2008 at 5:22 AM, Jonsson, Pall <[EMAIL PROTECTED] > wrote: > Dear R gurus, > > I have been struggling with this for a while and thought you might be able > to give me some guidance. > > I have a data frame, on which I apply a

[R] sink file type and Latex (Lyx)

2008-09-12 Thread Joanne Demmler
Does anyone know what file type sink is outputting to? I've been reverting output from R using sink and wanted to add it to my Appendix in LaTex (Lyx) using "Verbatiminput". However, I get an error message as LaTex is expecting an ASCII file. Can I set sink somehow to ASCII or is there another

Re: [R] plotCI -- multiple plots on same graph

2008-09-12 Thread Jim Lemon
bioinformatics_guy wrote: I have a bunch of lines I want to plot using plotCI() What Id like to know is, how can I connect the points with a line and how can I print multiple lines on the same graph? At the moment, plotCI doesn't accept a type="b" argument. I'll see if I can fix it. You migh

Re: [R] request: most repeated component of a list

2008-09-12 Thread Jim Lemon
Muhammad Azam wrote: Thanks for the effort but still we are far from the desired result. May be this example will help you to understand the situation. Example a1=c(1:12); a1=array(a1,dim=c(3,4)); a2=c(1:12); a2=array(a2,dim=c(3,4)); a3=c(1:16) a3=array(a3,dim=c(4,4)); a=list(a1,a2,a3);

[R] library instal

2008-09-12 Thread gaurav1983
I am finding real trouble in installing evd library in R for linux -- View this message in context: http://www.nabble.com/library-instal-tp19453453p19453453.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing

Re: [R] Finding a vector position using names rather than values

2008-09-12 Thread Dimitris Rizopoulos
try this: dframe <- data.frame( Col1 = c(10,20,30), Col2 = c(2,4,6), Col3 = c(5,10,7), row.names = c("R1","R2","R3") ) mat <- data.matrix(dframe) rowMedians <- apply(mat, 1, median) rowMedians[names(rowMedians) %in% "R3"] I hope it helps. Best, Dimitris > Dear

Re: [R] Save object summary to file

2008-09-12 Thread pgseye
Thanks Yihui and to others who replied privately. Very helpful information. Regards, Paul pgseye wrote: > > Hi, > > Am wanting to save the summary of a PCA to file. > > Have tried: > >> write.table(summary(PCA), file="PCAvar.txt", sep="\t") > > but receive: > > Error in as.data.frame.de

[R] Finding a vector position using names rather than values

2008-09-12 Thread Jonsson, Pall
Dear R gurus, I have been struggling with this for a while and thought you might be able to give me some guidance. I have a data frame, on which I apply a row function. The result looks to me like a vector that retains the old row names. I then sort the vector and subsequently need to be abl

Re: [R] Plot qnorm

2008-09-12 Thread Uwe Ligges
Ah, homework! Uwe Ligges Talina Ruiz wrote: Hi, I have this problem: X is hazardous variable N(mean 2, sd=3) question 1) Find the c value, so that P(X>c)=0.10. using R question 2) Graph the function N(2,3) and with this graph, explain what you do in question number 1. I just found que

Re: [R] Creating data frame from existing data frame

2008-09-12 Thread Dimitris Rizopoulos
well, first you could have a look at ?"[.data.frame" ?subset and then check the following: dat <- data.frame(year = sample(seq(2000, 2008, 2), 100, TRUE), y = rnorm(100)) subset(dat, year == 2002) dat[dat$year == 2002, ] # or subset(dat, year > 2002) dat[dat$year > 2002, ] I hope it helps.

  1   2   >