Re: [R] Recurrence plot in package "tseriesChaos"

2006-10-24 Thread pucicu
Hello! As far as I know, there is not yet any package for R, which can compute the RQA measures you mentioned. I can only suggest to use the Matlab toolbox "CRP Toolbox", which computes almost everything regarding recurrence plots. For those, who don't know what is RQA or even a recurrence plot:

Re: [R] [ggplot] trouble with ggabline and log-log-plots

2006-10-24 Thread hadley wickham
> Well, my data does not start at 0 either (no log-log plot starts at 0). > I think the line should start where the data-points start at. So, one > can should be able to get this from the range where the values are > plotted. Yes, but for abline (the way it is currently written) to work out where

Re: [R] Agnes Help

2006-10-24 Thread Henric Nilsson
Den 2006-10-23 16:59, Vinicius Placco skrev: > Hi > > I'm trying to use the cluster package and I'm having some trouble... I > always get the message: > > > myagnes <- agnes("datafile.dat") > > Error: could not find function "agnes" Have you tried loading the package, i.e. `library("cluster")'

Re: [R] How to start R with a file loaded?

2006-10-24 Thread Grateful Frog
Thanks! It works! I'm so sorry for my ignorance of R. I took no offense, of course not! You're trying to help me! I can only thank you! So, it's midnight my time, and I succeeded, although I was about to give up and go to bed in despair, now I can sleep peacefully thinking of my R program running

Re: [R] Progress Monitor in R

2006-10-24 Thread Clint Bowman
Or change the \n to \r so that the lines overwrite one another rather than producing a list that scrolls off the top. Clint BowmanINTERNET: [EMAIL PROTECTED] Air Dispersion Modeler INTERNET: [EMAIL PROTECTED] Air Quality Program VOICE:

[R] multiple consoles for R?

2006-10-24 Thread Weiwei Shi
hi, I am using JGR these days and I am wondering if there is some good IDE for R which allows me to open multiple consoles or there is a way around it? > version _ platform i386-apple-darwin8.6.1 arch i386 os darwin8.6.1 system i386, darwin8.6.1

Re: [R] Progress Monitor in R

2006-10-24 Thread Weiwei Shi
the way i do is like this for (i in 1:1000){ if (i %% 100){ # you can change this number cat("process monitor: i =", i, "\n"); } } hth, w. On 10/24/06, Xiaofan Cao <[EMAIL PROTECTED]> wrote: > Hi there, > > I'm writing a program in R that has a few nested loops. I'd like to > monitor

Re: [R] How to start R with a file loaded?

2006-10-24 Thread Gabor Grothendieck
Read the ?Startup help file. On 10/24/06, Grateful Frog <[EMAIL PROTECTED]> wrote: > Hi! > > Thanks for your reply. > > Indeed, I'm on Linux. > > I tried to do what you said, but nothing happened. > > I made a file called First.R in my work directory. It contains this code > > .First<-function(){

Re: [R] [ggplot] trouble with ggabline and log-log-plots

2006-10-24 Thread Sebastian Weber
Hi! > > pl1 <- qplot(correlFunc, correlFunc.ref, data=all, log=c("xy")) > > pl1 <- ggabline(pl1, slope=1, intercept=0) > > print(pl1) ## no line in plot :( > > I'm not really sure what the correct behaviour is here. What do you > expect this line to look like? It has intercept 0, which is -infi

Re: [R] Installing stats4 package

2006-10-24 Thread Himanshu Ardawatia
Hi, Problem solved (installing stats4 package). Thanks Himanshu On 10/24/06, Himanshu Ardawatia <[EMAIL PROTECTED]> wrote: > > Hi, > > I wantto use 'mle' function in R on linux. As I see its been integrated > into the stats4 package. Am I correct ? If yes, Can anyone suggest how to > install th

Re: [R] Installing stats4 package

2006-10-24 Thread Himanshu Ardawatia
On 10/24/06, Himanshu Ardawatia <[EMAIL PROTECTED]> wrote: > > Hi, > > I wantto use 'mle' function in R on linux. As I see its been integrated > into the stats4 package. Am I correct ? If yes, Can anyone suggest how to > install the stats4 package to be able to run 'mle' function in R on linux ? >

[R] Installing stats4 package

2006-10-24 Thread Himanshu Ardawatia
Hi, I wantto use 'mle' function in R on linux. As I see its been integrated into the stats4 package. Am I correct ? If yes, Can anyone suggest how to install the stats4 package to be able to run 'mle' function in R on linux ? Otherwise how to sort out this problem ? Thanks Himanshu [[al

[R] Help needed

2006-10-24 Thread cherub
I tried to use "paneliperf" in package SensoMinR, I imported my data "Choco" , my data looked like exactly same with data "sensochoc" in this package. the only difference is the value. I tried to run the code, res<-paneliperf(choco, formul = "~Product+Panelist+Session+ Product:Panelist+P

[R] Progress Monitor in R

2006-10-24 Thread Xiaofan Cao
Hi there, I'm writing a program in R that has a few nested loops. I'd like to monitor the progress when the program is running and be able to estimate the remaining time. I'd highly appreciate it if anyone can shed a light on this issue. Thanks for your time! Best Regards, Martha Cao ___

Re: [R] avoiding a loop

2006-10-24 Thread Leeds, Mark \(IED\)
christos : change your vector to 1.0,1.0,0.5,2.0,0.2,0.4,4.0,5.0 You should get 1.00 1.00 0.50 2.00 0.40 0.16 4.00 5.00 But your function gives : 1.00 1.00 0.50 2.00 0.40 0.08 4.00 5.00 I think it doesn't work when there are two in a row elements that are less than 1.0. Again, I do apprecia

Re: [R] extract certain values from a ts

2006-10-24 Thread Gabor Grothendieck
There was still a typo in this so here it is again: # Consider the builtin in nhtemp "ts" series # Then the runs below above and below the mean are r <- rle(as.vector(nhtemp > mean(nhtemp))) r # with the first and last indexes of each # runs being given by: idx.last <- cumsum(r$lengths) idx.firs

Re: [R] How to start R with a file loaded?

2006-10-24 Thread Grateful Frog
Hi! Thanks for your reply. Indeed, I'm on Linux. I tried to do what you said, but nothing happened. I made a file called First.R in my work directory. It contains this code .First<-function(){ source("First.R") source("client.r") cat("it worked.") } I then source("First.R"), ok. and qui

Re: [R] Mixed conditional logit model

2006-10-24 Thread Ryuichi Tamura
Hi, Sven Müller tu-dresden.de> writes: > i wonder whether it is possible to estimate a mixed (random parameters) > logit model in R. I wrote a collection of R functions for estimating discrete choice models by simulated maximum likelihood. It includes: - likelihood and gradient functions for

Re: [R] avoiding a loop

2006-10-24 Thread Leeds, Mark \(IED\)
thanks duncan. I think you are right. There are very smart people on this list but there were very smart people on The splus list 3 years ago so that's why I presented my question with caution. I'll just keep it as is for now. Thanks again. -Original Message- From: Duncan Murdoch [ma

Re: [R] extract certain values from a ts

2006-10-24 Thread Gabor Grothendieck
On 10/24/06, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > # Consider the builtin in nhtemp "ts" series > # Then the runs below above and below the mean are > r <- rle(as.vector(nmtemp > mean(nhtemp))) > r > > # with the first and last indexes of each > # runs being given by: > > idx.last <- cums

Re: [R] extract certain values from a ts

2006-10-24 Thread Gabor Grothendieck
# Consider the builtin in nhtemp "ts" series # Then the runs below above and below the mean are r <- rle(as.vector(nmtemp > mean(nhtemp))) r # with the first and last indexes of each # runs being given by: idx.last <- cumsum(r$lengths) idx.first <- idx.last - r$lengths + 1 # and the first and la

Re: [R] avoiding a loop

2006-10-24 Thread Leeds, Mark \(IED\)
I appreciate your effort but I'm fairly certain that won't work. The loop I have written is pseudo "recursive" in the sense that outvector depends on its previous value and this previous value may have changed because it depnds on the previous value of itself. The fact that there is no outvector

Re: [R] avoiding a loop

2006-10-24 Thread Christos Hatzis
Try this (essentially the trick is to shift the invector to get the y[i-i] effect): constructLt<-function(invector, a=1) { invector[invector aa <- c(1,1,0.5,2,3,0.4,4,5) > aa [1] 1.0 1.0 0.5 2.0 3.0 0.4 4.0 5.0 > constructLt(aa) [1] 1.0 1.0 0.5 2.0 3.0 1.2 4.0 5.0 -Christos -Original Mes

Re: [R] extract certain values from a ts

2006-10-24 Thread antonio rodriguez
Leeds, Mark (IED) escribió: > zoo is pretty neat. If you have time, print out the zoo documentation. There > are some useful function described. > It seems to be pretty useful for my specific task at this moment. I should take a look on it Antonio > > -Original Message- > From: anto

Re: [R] extract certain values from a ts

2006-10-24 Thread antonio rodriguez
Leeds, Mark (IED) escribió: > maybe subset works. I'm not familiar with that. > neither me > > -Original Message- > From: antonio rodriguez [mailto:[EMAIL PROTECTED] > Sent: Tuesday, October 24, 2006 2:49 PM > To: Leeds, Mark (IED); R-Help > Subject: Re: [R] extract certain values fro

Re: [R] avoiding a loop

2006-10-24 Thread Duncan Murdoch
On 10/24/2006 2:53 PM, Jerome Asselin wrote: > On Tue, 2006-10-24 at 14:36 -0400, Leeds, Mark (IED) wrote: >> I think I asked a similar question 3 years ago to the Splus list and I >> think the answer was no or noone answered so noone should spend more >> than 5 minutes on this >> because it coul

Re: [R] extract certain values from a ts

2006-10-24 Thread antonio rodriguez
Leeds, Mark (IED) escribió: > take your ts object and convert it to a zoo object ( you need to have the zoo > package and chron which it depends on installed) > using > > WS<-as.zoo(WS). > > Then , use the command the I gave you earlier. I think that should retain the > dates. > If that doesn't

Re: [R] avoiding a loop

2006-10-24 Thread Jerome Asselin
On Tue, 2006-10-24 at 14:36 -0400, Leeds, Mark (IED) wrote: > I think I asked a similar question 3 years ago to the Splus list and I > think the answer was no or noone answered so noone should spend more > than 5 minutes on this > because it could definitely be a waste of time. > > My question

Re: [R] extract certain values from a ts

2006-10-24 Thread John Kane
--- antonio rodriguez <[EMAIL PROTECTED]> wrote: > Hi, > > Having several daily wind speed time series I want > to extract those > consecutive days over and below certain values (i.e. > 5 < x <8) Don't > know which funtion to use (aggregate, lapply?) and > how to do it. > > Thanks in advance

[R] avoiding a loop

2006-10-24 Thread Leeds, Mark \(IED\)
I think I asked a similar question 3 years ago to the Splus list and I think the answer was no or noone answered so noone should spend more than 5 minutes on this because it could definitely be a waste of time. My question is whether the function below can be rewritten without a for loop. apply

Re: [R] [ggplot] trouble with ggabline and log-log-plots

2006-10-24 Thread hadley wickham
> I'm trying to generate a log-log plot with ggplot. Within this plot, I > would like to draw a straight line with the help of ggabline which does > not work. The code is > > pl1 <- qplot(correlFunc, correlFunc.ref, data=all, log=c("xy")) > pl1 <- ggabline(pl1, slope=1, intercept=0) > print(pl1) ##

Re: [R] extract certain values from a ts

2006-10-24 Thread antonio rodriguez
Leeds, Mark (IED) escribió: > I don't think it matters whether it's a ts or a vector. > > WS<-WS[ ( WS > 5 ) & ( WS < 8 ) ] > > Check to make sure it works. > Dear Mark, Yes it works. But I think that it matters for a ts since I want to know the days when those values where observed. The abov

Re: [R] Trellis Conditional contourplot

2006-10-24 Thread Deepayan Sarkar
On 10/24/06, Marco LO <[EMAIL PROTECTED]> wrote: > Hello All, > > I've problems to interpret the contourplot for a binary response dependent > variable. For example, I ploted the survived probability for the titanic3 > dataset, > > http://www.geocities.com/useebi/data/CondenContour.jpeg > >

[R] (no subject)

2006-10-24 Thread Rachel Davidson
Is it possible to fit a truncated Poisson or Negative Binomial regression model in R? If so, how? Thanks. __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/po

[R] extract certain values from a ts

2006-10-24 Thread antonio rodriguez
Hi, Having several daily wind speed time series I want to extract those consecutive days over and below certain values (i.e. 5 < x <8) Don't know which funtion to use (aggregate, lapply?) and how to do it. Thanks in advance Antonio __ R-help@stat.ma

[R] How to start R with a file loaded?

2006-10-24 Thread Grateful Frog
Hi! I've made great progress in my R programming, but I am again stuck on a beginner's problem. I would like to start R with a command line that loads a file, and if possible, executes a function. Can anyone give me an example of how to do this? For example, in lisp, I would say: $ lisp -load

[R] [ggplot] trouble with ggabline and log-log-plots

2006-10-24 Thread Sebastian Weber
Hello, I'm trying to generate a log-log plot with ggplot. Within this plot, I would like to draw a straight line with the help of ggabline which does not work. The code is pl1 <- qplot(correlFunc, correlFunc.ref, data=all, log=c("xy")) pl1 <- ggabline(pl1, slope=1, intercept=0) print(pl1) ## no l

Re: [R] r error

2006-10-24 Thread Marc Schwartz
On Tue, 2006-10-24 at 11:54 -0400, Stanfield, Les (MNR) wrote: > I hope you can help me. I am new to "R" and am working through the > example of quantile regression analysis in the paper by Roger Koenker > (quantile regression in R: a Vignette. I got to page 6 and in trying to > execute the follo

Re: [R] Plotmath expression

2006-10-24 Thread Mark Lyman
Christos Hatzis nuverabio.com> writes: > > Hello, > > I've been trying to plot a subscript in a text formula using plotmath but I > haven't been able to do so. > > In my example below I would like the text label to show > X[min] = 10.1 +/- 5.5 > > Here is the code: > > ll <- c(x=10.1, sde=5

Re: [R] Plotmath expression

2006-10-24 Thread Christos Hatzis
Excellent! Thank you. I am reading now your article in R-News (2/3 p.32-34) to understand the logic behind substitute in the expression. -Christos -Original Message- From: Uwe Ligges [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 24, 2006 12:27 PM To: [EMAIL PROTECTED] Cc: r-help@stat

Re: [R] marks to sepearat bars

2006-10-24 Thread Marc Schwartz
On Tue, 2006-10-24 at 16:04 +0200, David Graf wrote: > I'd like to insert always after 3 bars a small mark, so the groups of > three can be distinguished easier. > > Thanks for your help! > David It would be helpful if you provide a reproducible example of what you are attempting to do. I can on

Re: [R] for help

2006-10-24 Thread Petr Pikal
Hi On 24 Oct 2006 at 10:03, Aimin Yan wrote: Date sent: Tue, 24 Oct 2006 10:03:08 -0500 To: r-help@stat.math.ethz.ch From: Aimin Yan <[EMAIL PROTECTED]> Subject:[R] for help > I have a question in R. > > In directory H:/Delta_an

Re: [R] Unable to load foreign after upgrade on ubuntu

2006-10-24 Thread Dirk Eddelbuettel
On 24 October 2006 at 16:30, Prof Brian Ripley wrote: | On Tue, 24 Oct 2006, Dirk Eddelbuettel wrote: | > There are interdependencies between the R binary and the dynamically loaded | > libraries it loads. By upgrading R, you have agreed to the Faustian bargain | > of potentially having to upgrad

Re: [R] for help

2006-10-24 Thread Charles C. Berry
This question (paraphrase: How do I process a lot of homologous files?) or something similar has been asked (and answered) a lot lately. For example, look at this thread from today's posting to r-help: http://news.gmane.org/find-root.php?group=gmane.comp.lang.r.general&article=72254 Chuck p.

[R] Error when naming rows of dataset

2006-10-24 Thread yongchuan
I get the following error when I try reading in a table. How are 1.1, 1.2, 1.3 duplicate row names? Thx. > table <- read.table('latestWithNumber.txt', header=T) Error in "row.names<-.data.frame"(`*tmp*`, value = c("1.1", "1.2", "1.3", : duplicate 'row.names' are not allowed Yongchuan _

Re: [R] Plotmath expression

2006-10-24 Thread Uwe Ligges
Christos Hatzis wrote: > Hello, > > I've been trying to plot a subscript in a text formula using plotmath but I > haven't been able to do so. > > In my example below I would like the text label to show > X[min] = 10.1 +/- 5.5 > > Here is the code: > > ll <- c(x=10.1, sde=5.5) > plot(1:10)

Re: [R] Size problem with two dotcharts side by side

2006-10-24 Thread Martin Maechler
> "jim" == jim holtman <[EMAIL PROTECTED]> > on Fri, 20 Oct 2006 08:53:08 -0400 writes: jim> It appears that dotchart is not restoring some of the 'par' jim> parameters. It only saves some specific one: Indeed. Thank you, Jim and Jean, for the well reproducible example. This

[R] Plotmath expression

2006-10-24 Thread Christos Hatzis
Hello, I've been trying to plot a subscript in a text formula using plotmath but I haven't been able to do so. In my example below I would like the text label to show X[min] = 10.1 +/- 5.5 Here is the code: ll <- c(x=10.1, sde=5.5) plot(1:10) text(x=9, y=2, pos=2, expression(paste(X[min], "=

Re: [R] Bayesian Information Criterion

2006-10-24 Thread Martyn Plummer
On Mon, 2006-10-23 at 20:59 +0200, Alexander Geisler wrote: > Hello! > > I calculate a Bayesian logistic regression with the function MCMClogit > from the package MCMCpack. > > After the calculation I use the package CODA to test the model in > respect to convergence. > > Is there a compatible

Re: [R] Problem reading non-ISO data via read.csv2

2006-10-24 Thread Gregor Gorjanc
Prof Brian Ripley wrote: ... >> There are some "strange" characters in it, but I never experienced such >> behaviour. Actually, this file was produced with R (2.4.0) on Windows! > > Well, then it cannot be a UTF-8 file (there are no UTF-8 locales on > Windows, not any means to write a UTF-8 file h

[R] r error

2006-10-24 Thread Stanfield, Les \(MNR\)
I hope you can help me. I am new to "R" and am working through the example of quantile regression analysis in the paper by Roger Koenker (quantile regression in R: a Vignette. I got to page 6 and in trying to execute the following code I received the error below. I have searched on the web and wh

Re: [R] Unable to load foreign after upgrade on ubuntu

2006-10-24 Thread Prof Brian Ripley
On Tue, 24 Oct 2006, Dirk Eddelbuettel wrote: > > On 24 October 2006 at 15:47, Van Campenhout Bjorn wrote: > | I am running R on ubuntu dapper. The version that is in the ubuntu > | repos is 2.2.1, so I decided to upgrade by adding > | > | deb http://cran.R-project.org/bin/linux/ubuntu dapper/ >

Re: [R] Plotting Text on a graph

2006-10-24 Thread Earl F. Glynn
"Dan Chan" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > > I plotted 12 graphs on a page and output to a png file. I wanted to > have an overall title for all 12 graphs. What command can I use to do > this? Below is the code that plotted the 12 graphs in one page. Define an "ou

Re: [R] Problem reading non-ISO data via read.csv2

2006-10-24 Thread Prof Brian Ripley
On Tue, 24 Oct 2006, Gregor Gorjanc wrote: > Hello! > > I have a CSV file and when I try to import it into R with read.csv2 I > get the following error: > > R> read.csv2(file="pasme2.csv", na.strings="") > Error in type.convert(data[[i]], as.is = as.is[i], dec = dec, na.strings > = character(0)) :

Re: [R] Unable to load foreign after upgrade on ubuntu

2006-10-24 Thread Dirk Eddelbuettel
On 24 October 2006 at 15:47, Van Campenhout Bjorn wrote: | I am running R on ubuntu dapper. The version that is in the ubuntu | repos is 2.2.1, so I decided to upgrade by adding | | deb http://cran.R-project.org/bin/linux/ubuntu dapper/ | | to my sources.list, as advised on the web page. Afte

[R] for help

2006-10-24 Thread Aimin Yan
I have a question in R. In directory H:/Delta_angle I have 19 files like this: ALA.delta ASN.delta ASP.delta CYS.delta GLN.delta GLU.delta HIS.delta ILE.delta LEU.delta LYS.delta MET.delta PHE.delta PRO.delta SER.delta THR.delta TRP.delta TYR.delta VAL.delta I want to read these files to 19 data

[R] Mixed conditional logit model

2006-10-24 Thread Sven Müller
dear all, i wonder whether it is possible to estimate a mixed (random parameters) logit model in R. my dataset only includes conditional explanatory (RHS) variables. i've already searched the R-help archives and found slightly comparable questions but no satisfying answers. an old fashoined co

[R] plot(all.effects)

2006-10-24 Thread Michael Kubovy
Dear r-helpers, plot(all.effects()) uses trellis for its output, and often produces several effect plots in a layout. Can anyone tell me how to set the arguments to plot.effect which default to row=1, col=1, nrow=1, ncol=1, more=FALSE so that I can plot multiple effect plots on one layout? I

Re: [R] Question concerning ggplot

2006-10-24 Thread Rainer M Krug
hadley wickham wrote: >> > rsqs <- as.data.frame(stamp(mtcars, cyl ~ ., function(df) >> > summary(lm(mpg ~ wt, data=df))$r.squared)) >> > rsqs$wt <- 4 >> > rsqs$mpg <- 32 >> > ggtext(p, data=rsqs, aes=list(label=value)) >> > >> > But that doesn't work for some reason I don't understand yet (but I'm

Re: [R] Help with understanding [[]] [] array, list, matrix referencing

2006-10-24 Thread Thomas Lumley
On Tue, 24 Oct 2006, Joe W. Byers wrote: > following code produces a 5 element list of 2X5 random numbers that I > then convert to a 2X5X5 matrix. > cov<-matrix(c(.4,-.1,-.1,.3),nrow=2,ncol=2) > rnds<-NULL; > for (i in 1:5){ > t1<-rnorm(5,cov) > t2<-rnorm(5,cov) > t3<-rbind(t1,t2)

Re: [R] why it returns list level number instead of its content?

2006-10-24 Thread John Kane
You have read in the data as factors. Try class(data$V4) to see this. When you are doing something like a cbind R treats the factors as numbers. You need to convert the factors back to character data. Try something like d1 <- as.character(data$V4) d2 <- as.character(data$V5) and then do a cbi

[R] marks to sepearat bars

2006-10-24 Thread David Graf
I'd like to insert always after 3 bars a small mark, so the groups of three can be distinguished easier. Thanks for your help! David -- __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting gui

[R] Trellis Conditional contourplot

2006-10-24 Thread Marco LO
Hello All, I've problems to interpret the contourplot for a binary response dependent variable. For example, I ploted the survived probability for the titanic3 dataset, http://www.geocities.com/useebi/data/CondenContour.jpeg Trellis displayed two panels of contour, one for dead

[R] Unable to load foreign after upgrade on ubuntu

2006-10-24 Thread Van Campenhout Bjorn
I am running R on ubuntu dapper. The version that is in the ubuntu repos is 2.2.1, so I decided to upgrade by adding deb http://cran.R-project.org/bin/linux/ubuntu dapper/ to my sources.list, as advised on the web page. After sudo apt-get update and upgrade, I have version 2.3.1. However, whe

Re: [R] nested if/else very slow, more efficient ways?

2006-10-24 Thread Petr Pikal
Hi so probably easiest approach is input$Class<-as.numeric(input$Class) if input$Class is factor, what can be tested e.g. by str(input) HTH Petr On 24 Oct 2006 at 8:20, Kim Milferstedt wrote: Date sent: Tue, 24 Oct 2006 08:20:08 -0500 To: r-help@stat.math.e

Re: [R] Help with understanding [[]] [] array, list, matrix referencing

2006-10-24 Thread John Kane
--- Joe Byers <[EMAIL PROTECTED]> wrote: > David, > > Yes, I did. I just still do not get it. That is > why I ask here. > Hoping someone knew a step by step guide that I > could look at. My trial > and error approach takes me hours some days. I > currently move most > things in and out o

Re: [R] nested if/else very slow, more efficient ways?

2006-10-24 Thread Stefano Calza
If I get it right (data are not well aligned!) these are values in Class column. Right? Than Class = as.numeric(factor(Class)) should work Stefano On Tue, Oct 24, 2006 at 08:20:08AM -0500, Kim Milferstedt wrote: Hi Alex, find below a sample of the input and the desired output of my data. 5a

Re: [R] Posthoc tests for 3-way ANOVA analysis

2006-10-24 Thread Torsten Hothorn
On Tue, 24 Oct 2006, A Ezhil wrote: > Hi Torsten, > > Thanks for your help. I have downloaded the 'multcomp' > package (windows ver. 0.4-8, but the source is > 0.991-1). When I tried with 'glht' function, it says > 'object not found'. Am I missing anything? > just wait for version 0.991-1 being

Re: [R] Question concerning ggplot

2006-10-24 Thread hadley wickham
> > rsqs <- as.data.frame(stamp(mtcars, cyl ~ ., function(df) > > summary(lm(mpg ~ wt, data=df))$r.squared)) > > rsqs$wt <- 4 > > rsqs$mpg <- 32 > > ggtext(p, data=rsqs, aes=list(label=value)) > > > > But that doesn't work for some reason I don't understand yet (but I'm > > working on it) Ooops -

Re: [R] nested if/else very slow, more efficient ways?

2006-10-24 Thread Kim Milferstedt
Hi Alex, find below a sample of the input and the desired output of my data. 5a ... 5e are indeed the only possible values for the column in question. I would like to replace 5a --> 1, 55b --> 2, ... 5e --> 5. Kim ## input ### Image_IDClass Max 1 2 3

Re: [R] Question concerning ggplot

2006-10-24 Thread Rainer M Krug
hadley wickham wrote: >> > Do you mean doing a seperate linear regression for each group in your >> > data? If so, have a look at ?gggroup for some examples of exactly >> > that. >> >> No. >> >> I do the following: >> >> > p <- ggplot(cc, . ~ expert, aesthetic=list(y=x0050, x=generation)) >> > g

[R] Variance Component/ICC Confidence Intervals via Bootstrap or Jackknife

2006-10-24 Thread Rick Bilonick
I'm using the lme function in nmle to estimate the variance components of a fully nested two-level model: Y_ijk = mu + a_i + b_j(i) + e_k(j(i)) lme computes estimates of the variances for a, b, and e, call them v_a, v_b, and v_e, and I can use the intervals function to get confidence intervals. M

Re: [R] Worm distribution :-)

2006-10-24 Thread rolf
Jim Lemon wrote (in response to a question from Alberto Monteiro): > I once had to do this to generate "random dot stereograms" for > perception experiments. One easy way is to build from one corner or > edge (almost all these are rectangular, you can just clip out the > figure you want later). Th

[R] incorrect number of subscriptions error in user-written function

2006-10-24 Thread Abrahams, Mark
I have written a function which returns an "incorrect number of subscriptions error" and am unable to identify why this should happen. Any help would be gratefully received. The problem: I would like to generate combinations/permutations across different selections - for example all the combinati

Re: [R] Question concerning ggplot

2006-10-24 Thread hadley wickham
> > Do you mean doing a seperate linear regression for each group in your > > data? If so, have a look at ?gggroup for some examples of exactly > > that. > > No. > > I do the following: > > > p <- ggplot(cc, . ~ expert, aesthetic=list(y=x0050, x=generation)) > > ggjitter(p) > > ggsmooth(method=

Re: [R] Posthoc tests for 3-way ANOVA analysis

2006-10-24 Thread A Ezhil
Hi Torsten, Thanks for your help. I have downloaded the 'multcomp' package (windows ver. 0.4-8, but the source is 0.991-1). When I tried with 'glht' function, it says 'object not found'. Am I missing anything? Thanks again for your help. Regards, Ezhil --- Torsten Hothorn <[EMAIL PROTECTED]> wr

Re: [R] Help with understanding [[]] [] array, list, matrix referencing

2006-10-24 Thread Joe Byers
Thank you so very much. I can try this on my own examples. Much appreciated. Joe David Barron wrote: Well, as I understand it, with a list [] doesn't return the actual contents of that element of the list, whereas [[]] does. Compare, for example rnds[1] + 1 with rnds[[1]] + 1. So, with a li

Re: [R] variables with dynamic names?

2006-10-24 Thread Gabor Grothendieck
Here is a third way to do the loop: rows <- match(substring(filenames, 1, 1), LETTERS) cols <- as.numeric(substring(filenames, 2, 3)) m[cbind(rows, cols)] <- sapply(DFs, F) On 10/24/06, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > On 10/24/06, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > >

Re: [R] variables with dynamic names?

2006-10-24 Thread Gabor Grothendieck
On 10/24/06, Gabor Grothendieck <[EMAIL PROTECTED]> wrote: > Try something like this (untested): > > # replace with your function that inputs a data frame and outputs a number > F <- function(x) length(x) > # replace with setwd to appropriate path > setwd("/") > > filenames <- dir(pattern = "[.]csv

Re: [R] variables with dynamic names?

2006-10-24 Thread Gabor Grothendieck
Try something like this (untested): # replace with your function that inputs a data frame and outputs a number F <- function(x) length(x) # replace with setwd to appropriate path setwd("/") filenames <- dir(pattern = "[.]csv$") # DFs is a list of data frames; names(DFs) will be the filenames DFs

Re: [R] variables with dynamic names?

2006-10-24 Thread JeeBee
You can use list.files to obtain the file names, see ?list.files Read the "comma seperated values" files with read.cvs, see ?read.csv JeeBee. On Tue, 24 Oct 2006 13:33:42 +0200, Antje wrote: > Hello, > > I have the following problem. I have a set of CSV files and they are > named for a speci

Re: [R] Help with "recode" and "factor" functions

2006-10-24 Thread John Fox
Dear Chris, I hesitate to answer a question arising from an exam -- you should probably address the question to the person who set the exam -- but it doesn't hurt, I think, to point out the following: The recode function that you're using is in the car package, which is associated with a book (see

Re: [R] Help with understanding [[]] [] array, list, matrix referencing

2006-10-24 Thread David Barron
Well, as I understand it, with a list [] doesn't return the actual contents of that element of the list, whereas [[]] does. Compare, for example rnds[1] + 1 with rnds[[1]] + 1. So, with a list you have to use the double bracket notation to get to the actual contents of that element of the list, a

Re: [R] Question concerning ggplot

2006-10-24 Thread Rainer M Krug
hadley wickham wrote: >> When using >> ggsmooth(method=lm) >> is there a way to show the results of the separate linear regressions? > > Do you mean doing a seperate linear regression for each group in your > data? If so, have a look at ?gggroup for some examples of exactly > that. No. I do the

Re: [R] Question concerning ggplot

2006-10-24 Thread hadley wickham
> When using > ggsmooth(method=lm) > is there a way to show the results of the separate linear regressions? Do you mean doing a seperate linear regression for each group in your data? If so, have a look at ?gggroup for some examples of exactly that. Hadley __

[R] variables with dynamic names?

2006-10-24 Thread Antje
Hello, I have the following problem. I have a set of CSV files and they are named for a special position in a matrix (e.g. "A01.csv", "F06.csv", "H11.csv") Now, I would like to read in the data of all these files and eveluate something for each set (and write it at the position in a result mat

Re: [R] Help with understanding [[]] [] array, list, matrix referencing

2006-10-24 Thread Joe Byers
David, Yes, I did. I just still do not get it. That is why I ask here. Hoping someone knew a step by step guide that I could look at. My trial and error approach takes me hours some days. I currently move most things in and out of data.frames where I can name the columns and reference wi

Re: [R] Help with understanding [[]] [] array, list, matrix referencing

2006-10-24 Thread David Barron
Have you tried help("["), which gives a good explanation. On 24/10/06, Joe W. Byers <[EMAIL PROTECTED]> wrote: > Hi all, > > I would greatly appreciate some help understanding how R references > arrays, matrices, lists, and objects using [[]] and []. I have read the > R guides and several tutori

[R] Question concerning ggplot

2006-10-24 Thread Rainer M Krug
Hi I am using ggplot under R 2.4 / Linux. When using ggsmooth(method=lm) is there a way to show the results of the separate linear regressions? Thanks Rainer -- Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation Biology (UCT) Department of Conservation Ecology and Entomology Universit

[R] Help with understanding [[]] [] array, list, matrix referencing

2006-10-24 Thread Joe W. Byers
Hi all, I would greatly appreciate some help understanding how R references arrays, matrices, lists, and objects using [[]] and []. I have read the R guides and several tutorials but I am not the fastest kid on the block so I am still having difficulty understanding this. For examples the fo

Re: [R] Worm distribution :-)

2006-10-24 Thread Jim Lemon
Alberto Monteiro wrote: > I don't know if anyone has heard this tale, but it runs > more or like this way: > > A biologist was studing a (semi-spherical) cave where bats > lives. He fell asleep in the cave, and he woke up in the > middle of the night. Half-dreaming, he thought that he was >

[R] problem compilation on AIX

2006-10-24 Thread Delphine RAMALINGOM
I'm trying to install R-2.4.0 on AIX 5.2. But, I have an error message during the compilation. Can you help me please? I have used : export OBJECT_MODE=64 export CC=/usr/bin/xlc_r export F77=/usr/bin/xlf_r export CXX=/usr/bin/xlC_r export LDFLAGS='-brtl' export CFLAGS='-O2 -qstrict' export FFLAGS

Re: [R] how to create a vector with different categories in a simple way?

2006-10-24 Thread Gabor Grothendieck
Or as factors: blockrowfac <- gl(12, 4 * 16) blockcolfac <- gl(4, 16, 4 * 16 * 12) On 10/24/06, Petr Pikal <[EMAIL PROTECTED]> wrote: > Hi > > If you just want a specific sequences added to your data and you have > your data ordered as shown why not to use simply > > blockrow <- rep(1:12, each=64

Re: [R] colinearity?

2006-10-24 Thread David Barron
Also, have a look at the perturb package which has a couple of functions for collinearity diagnosis. On 24/10/06, Chris Linton <[EMAIL PROTECTED]> wrote: > I'm sorry to all those who are tired of seeing my email appear in need of > help. But, I've never coded in any program before, so this has be

Re: [R] colinearity?

2006-10-24 Thread David Barron
There are functions to calculate variance inflation factors in various packages, e.g. car and Design. I believe these work with generalized linear models. On 24/10/06, Chris Linton <[EMAIL PROTECTED]> wrote: > I'm sorry to all those who are tired of seeing my email appear in need of > help. But,

Re: [R] Posthoc tests for 3-way ANOVA analysis

2006-10-24 Thread Torsten Hothorn
On Tue, 24 Oct 2006, A Ezhil wrote: > Hi All, > > I have performed a 3-way ANOVA analysis for my > experimental data using aov function. My simple R > funtion for this is: > > 3aof <- function(x){ > m <- data.frame(R,S,T, x); > anova(aov(x ~ R+S+T+R*S+R*T+S*T+R*S*T, m) ) > } > you can use R> li

Re: [R] problem of using list element in for cycle

2006-10-24 Thread Alex Brown
Hi Hu The problem you are having is related to the fact that the vectors data$V4 and data$V5 are of class factor. This means they are numeric (215, 134, etc), with an additional 'levels' attribute that links those numbers to the character identifiers "P05761" etc: # V4 is a numeric vector

[R] colinearity?

2006-10-24 Thread Chris Linton
I'm sorry to all those who are tired of seeing my email appear in need of help. But, I've never coded in any program before, so this has been a difficult process for me. Is there a simple function to test for colinearity in R? I'm running a logistic regression and a linear regression. Thanks

Re: [R] pdf/ convert/ font problem

2006-10-24 Thread Stefan Grosse
Sam, Have you tried to produce a ps/eps figure with the postscript device? Does this work? you could still convert it to pdf with ghostscript or include eps figures... Stefan __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/

Re: [R] Aggregate with multiple statistics?

2006-10-24 Thread Alex Brown
Try the summary function, which pretty much does exactly that. -Alex On 20 Oct 2006, at 23:44, Jonathan Greenberg wrote: > Is there a way to calculate, say, the mean, min and max using > aggregate > using one line of code? Or do I need to call them separately (e.g. > aggregate(...,mean); agg

  1   2   >