Re: [R] Behaviour of very large numbers

2007-08-31 Thread willem vervoort
Thanks for all the points. Riding my bike back home I realised that the fractional power was a problem. I also forgot about the operator precedence: > b <- 48.3 > -53.1^b [1] -2.099256e+83 > (-53.1)^b [1] NaN Pretty clear now. Back to my maths than... > version # sorry forgot this last time

Re: [R] mtext, picking subscript text from colnames(df)

2007-08-31 Thread Tord Snäll
Works excellent. Thanks! Tord Henrique Dallazuanna wrote: > Try: > > mtext(eval(parse(tex=paste("expression(mu[", > colnames(PresEsts)[2],"])", sep=""))),side=2,at=max(y)-15,las=1) > > > -- > Henrique Dallazuanna > Curitiba-Paraná-Brasil > 25° 25' 40" S 49° 16' 22" O > > -- Tord Snäll Depart

Re: [R] Behaviour of very large numbers

2007-08-31 Thread Robin Hankin
Hello On 30 Aug 2007, at 16:08, willem vervoort wrote: > > What happens when you raise a negative value to a power and the result > is a very large number? > [snip] > I loaded package Brobdingnag and tried: > as.brob(x^B) > [1] NAexp(NaN) NAexp(NaN) NAexp(NaN) NAexp(NaN) NAexp(NaN) >> as.

Re: [R] Excel

2007-08-31 Thread Erich Neuwirth
There is a hack to get around the problem. It is definitely not a good solution, just a hack. Open the .csv file in a text editor and select everything. Paste it into an empty Excel sheet. Then use Data -> Text to Columns The third dialog box (at least it is the third one in Excel 2003) allows yo

[R] Choosing the optimum lag order of ARIMA model

2007-08-31 Thread Megh Dal
Dear all R users, I am really struggling to determine the most appropriate lag order of ARIMA model. My understanding is that, as for MA [q] model the auto correlation coeff vanishes after q lag, it says the MA order of a ARIMA model, and for a AR[p] model partial autocorrelation vanishes

[R] Problem of vocabulary : retrieve element of a list of a list

2007-08-31 Thread Ptit_Bleu
Hi, I read the posts for 2 hours and ?list and tried many comninations but I haven't found the answer to this basic question. So I decided to post my question even if it is a silly one ... What is the instruction to retrieve, for example, the "D" of the first list ? Thanks in advance, Ptit Bleu.

Re: [R] How to measure mode (central tendancy)

2007-08-31 Thread Jim Lemon
Raymond Balise wrote: > What is the name of the function to give me the mode (central tendancy) of a > numeric variable that can be negative? Hi Raymond, Have a look at Mode (note the capital letter) in the prettyR package. Jim __ R-help@stat.math

Re: [R] Choosing the optimum lag order of ARIMA model

2007-08-31 Thread Prof Brian Ripley
On Fri, 31 Aug 2007, Megh Dal wrote: > Dear all R users, > > I am really struggling to determine the most appropriate lag order of > ARIMA model. My understanding is that, as for MA [q] model the auto > correlation coeff vanishes after q lag, it says the MA order of a ARIMA > model, and for a

Re: [R] Excel

2007-08-31 Thread Erich Neuwirth
The quickest solution is to additionally install the package rcom from CRAN. A more detailed account can be found on our wiki at http://rcom.univie.ac.at especially on http://learnserver.csd.univie.ac.at/rcomwiki/doku.php?id=version_information_and_links Greg Snow wrote: > Erich, > > I just down

Re: [R] Question on shardsplot

2007-08-31 Thread Uwe Ligges
Ebi, keisyu, or whatever your name is, I know that this questions has already been answered by the shardplot author in a private thread, where this has been posted under a different name. Why do you obscure your real name on the list??? The answer by Nils Raabe was that shardsplot is intended t

[R] Adding new points to a metaMDS ordination ("vegan" pkg)

2007-08-31 Thread Jari Oksanen
Simon Goring sgoring at sfu.ca wrote: > Hi, I've been using R for a while now but I've got a problem with > metaMDS (in the vegan package) that I can't quite figure out. > > I have a set of proportion data (from 0-1, rows sum to 1) that I apply > metaMDS to using the command: > > nMDS.set=metaM

Re: [R] Single plot multiple levels in x?

2007-08-31 Thread Jim Lemon
Richard Yanicky wrote: > >One axis inside another, for example salary within state, > > > > >1-50 | 50 – 100 | 100+ | 1- 50 | 50 -100 | 100+ | … repeated >bins for salary > AL ! AR > …… more states Okay, I s

Re: [R] Problem of vocabulary : retrieve element of a list of a list

2007-08-31 Thread jiho
On 2007-August-31 , at 10:17 , Ptit_Bleu wrote: >> x<-list(LETTERS[1:5], LETTERS[10:20]) not sure to have understood exactly what you meant. if you want to search for the D in the list: lapply(x,charmatch,"D") should get you started. if you just want to know the syntax to extract an ele

Re: [R] Problem of vocabulary : retrieve element of a list of a list

2007-08-31 Thread Felix Andrews
x[[1]][4] On 8/31/07, Ptit_Bleu <[EMAIL PROTECTED]> wrote: > Hi, > > I read the posts for 2 hours and ?list and tried many comninations but I > haven't found the answer to this basic question. So I decided to post my > question even if it is a silly one ... > > What is the instruction to retrieve,

Re: [R] Barplot2 using for loop, how to adjust margins?

2007-08-31 Thread Lauri Nikkinen
Hi, Marc got me on the right track. This is probably not the most elegant solution but works for me. Changes to the code are here: maxim <- max(strwidth(as.character(spl[[i]]$os), units="inches"))*4 opar <- par(mar=c(3,maxim,0,2), bg="white", cex=1, oma = c(0, 0, 2, 0), And the whole script: fo

Re: [R] possible bug in vars package (predict.varest) ???

2007-08-31 Thread Pfaff, Bernhard Dr.
Hello Spencer, which version of vars are you using? This has been fixed a while ago (see ChangeLog). Incidentally, the data in Canada is quarterly data, as stated in ?Canada. Aside of this, your code snippet works fine. Best, Bernhard ps: There is no need to download the tarball as suggested by

Re: [R] t-test within tapply

2007-08-31 Thread Gustaf Rydevik
On 8/30/07, Sonia Mehault <[EMAIL PROTECTED]> wrote: > Hello, > > > > My data are as following: > > > > Data <- data.frame(Ind=rep(1:3,c(10,10,10)), > >Replicate=rep(c(rep("a",5),rep("b",5)),3), > >EggSize=rep(rnorm(5,mean=10),6) > >) > >

Re: [R] xeon processor and ATLAS

2007-08-31 Thread Bjørn-Helge Mevik
Jeffrey J. Hallman wrote: > I've been doing econometrics for nearly 20 years, and have not yet run across > a situation that called for looking at a 1000 x 1000 matrix. I tend not to > believe analyses with more than a dozen explanatory variables. In NIR spectroscopy, it is common to have at lea

[R] opinion poll: do you need interactive 3D histogram into a pdf?

2007-08-31 Thread Bruno C\.
Hy, Couple of month ago I asked if there was a way to export 3D plots in U3D format ( these format allows to include the 3D plot , even via latex, into pdfs so the reader of the pdf can turn the plot and examine it from any viewpoint). The answer is NO! Sorry, The answer WAS, NO I managed to do

Re: [R] Problem of vocabulary : retrieve element of a list of a list

2007-08-31 Thread Ptit_Bleu
In fact I read "R pour les debutants" by Emmanuel Paradis but I didn't find the solution. Then I looked for on R-Help with no result. Again I do aplologize for this silly question and I thank you for the solution (second one). Ptit Bleu (who won't send others silly questions in the future) jih

[R] Histogram

2007-08-31 Thread squall44
Hello, Although I've done lots of research on histograms, I'm still not able to create one. I'd be glad if someone could explain them to me. That's what it eventually should look like: http://www.nabble.com/file/p12423193/histogram.gif The interval limits are: (0), 1, 2, 3, 3.5, 4.5, 5, 5.5, (

Re: [R] Assigning line colors in xyplot

2007-08-31 Thread Christof Bigler
The suggestions by Deepayan Sarkar and Hadley Wickham work for that case, but I get into troubles when I try to draw e.g. a panel for "A" and "B": xyplot(y ~ x | f , groups=g, data=tmp,type="l", par.settings=list(superpose.line=list(col=c("red","blue"))), auto.key=list(space="top",

[R] Re : Histogram

2007-08-31 Thread justin bem
This is a drawing problem rading the use of histogram function since you dont have original data. Then just use the rect function. e.g with you data yrbreak<-c(0, 1, 2, 3, 3.5, 4.5, 5, 5.5, 6) yrsurfa<-c (0, 0.2, 0.3, 0.3, 0.1, 0, 0.1, 0) plot(yrbreak,yrsurfa,col="white",xaxt="n",xlim=c(0,7),yli

Re: [R] Histogram

2007-08-31 Thread Gustaf Rydevik
On 8/31/07, squall44 <[EMAIL PROTECTED]> wrote: > > Hello, > > Although I've done lots of research on histograms, I'm still not able to > create one. I'd be glad if someone could explain them to me. > > That's what it eventually should look like: > http://www.nabble.com/file/p12423193/histogram.gif

Re: [R] Excel

2007-08-31 Thread Jim Lemon
Rolf Turner wrote: > On 31/08/2007, at 9:10 AM, Antony Unwin wrote: > > >>Erich's more important point >>is that you need to speak the language of the people you cooperate >>with and often that language includes Excel. > > > So if the people you have to deal with are into astrology you should

Re: [R] Bugreport on integration of Sweave and latex beamer

2007-08-31 Thread Duncan Murdoch
Ajay Shah wrote: > I think I have isolated a problem with integration between Sweave and beamer. > Sweave makes a lot of use of verbatim environments, and beamer doesn't like those. You need to declare that a slide contains verbatim or you get errors like that. I'm sure there are other ways

Re: [R] retrieve p-value from a cox.obj

2007-08-31 Thread Bernardo Rangel Tura
On Wed, 2007-08-29 at 08:40 -0700, clearsky wrote: > I have a cox.obj named obj, > obj <- coxph( Surv(time, status) ~ group, surv.data) > now I want to retrieve the p-value from obj, so that I can run this hundreds > of times and plot out the distribution of the p-value. could anyone tell me > how

[R] Bug?

2007-08-31 Thread Johanna Hasmats
Hi! How can I get around in R 2.5.1 in Windows: Error in strsplit(linebuffer, "") : object "linebuffer" not found It comes a few lines after the actual strsplit, and yesterday everything was fine… Thank you in advance Kindest regards,

Re: [R] Bug?

2007-08-31 Thread Uwe Ligges
Johanna Hasmats wrote: > Hi! > > > > How can I get around in R 2.5.1 in Windows: > > > > Error in strsplit(linebuffer, "") : object "linebuffer" not found Why should this be a bug in R, if you have no object named "linebuffer" in the environments that are on the search path. Uwe Lig

Re: [R] Single plot multiple levels in x?

2007-08-31 Thread Richard Yanicky
Uwe, Here is some code to create some data then a plot (The plot was done in another package). The plot is included only to reference the structure of the x-axis. I can't get R to do something similar. State <- seq (1:5); posi <- seq (0.5,62525,199.233) mydf<-NULL; for ( i in 1:5) { df1<-d

[R] R and Windows Vista

2007-08-31 Thread Jan Budczies
Hello group, it is reported (R for Windows FAQ) that R runs under Windows Vista. However, does someone here have experience with R under Vista 64 and large (>3 or 4 GB) memory? Greeting - Jan Budczies [[alternative HTML version deleted]] _

[R] Incomplete Gamma function

2007-08-31 Thread [EMAIL PROTECTED]
Hello I am trying to evaluate an Incomplete gamma function in R. Library Zipfr gives the Igamma function. From Mathematica, I have: "Gamma[a, z] is the incomplete gamma function." In[16]: Gamma[9,11.1] Out[16]: 9000.5 Trying the same in R, I get > Igamma(9,11.1) [1] 31319.5 OR > Igamma(11.1,9

Re: [R] R-help Digest, Vol 54, Issue 30

2007-08-31 Thread David Duffy
Ron Crump wrote: > Hi, > > I have a dataframe that contains pedigree information; > that is individual, sire and dam identities as separate > columns. It also has date of birth. > > These identifiers are not numeric, or not sequential. > > Obviously, an identifier can appear in one or two column

[R] Center of Gravity

2007-08-31 Thread daiconnie
Is there any package or function in R can calculate the coordinates of gravity centre for a 2-D arbitrary shape?? Suppose the x and y coordinates of my shape is x y 1 -12 30.4 45 2 Thanks! _ Windows Live Custom Domain£¬ÄúµÄÃâ·Ñ

[R] memory.size help

2007-08-31 Thread dxc13
I keep getting the 'memory.size' error message when I run a program I have been writing. It always it cannot allocate a vector of a certain size. I believe the error comes in the code fragement below where I have multiple arrays that could be taking up space. Does anyone know a good way around

[R] size limitations in R

2007-08-31 Thread Fabiano Vergari
I am a SAS user currently evaluating R as a possible addition or even replacement for SAS. The difficulty I have come across straight away is R's apparent difficulty in handling relatively large data files. Whilst I would not expect it to handle datasets with millions of records, I still really n

Re: [R] Rserve: Accessing images

2007-08-31 Thread Bartjoosen
Take a look at the EBImage package at bioconductor: http://bioconductor.org/packages/2.0/bioc/html/EBImage.html Bart mimo-2 wrote: > > Hi, > > Are there more sophisticated means to access R-images via Rserve than: > > Rconnection c=new Rconnection("127.0.0.1"); > REXP xp=c.eval("try(png(\"

Re: [R] Incomplete Gamma function

2007-08-31 Thread Robin Hankin
Hi Kris lgamma() gives the log of the gamma function. You need gamma_inc() of the gsl package, a wrapper for the GSL library: > gamma_inc(9,11.1) [1] 9000.501 > HTH rksh On 31 Aug 2007, at 00:29, [EMAIL PROTECTED] wrote: > Hello > > I am trying to evaluate an Incomplete gamma function

Re: [R] R and Windows Vista

2007-08-31 Thread Uwe Ligges
Jan Budczies wrote: > > Hello group, > > it is reported (R for Windows FAQ) that R runs under Windows Vista. > However, does someone here have experience with R under Vista 64 > and large (>3 or 4 GB) memory? There is no 64-bit version of R for Windows available now. Mainly because there ar

Re: [R] Assigning line colors in xyplot

2007-08-31 Thread hadley wickham
On 8/31/07, Christof Bigler <[EMAIL PROTECTED]> wrote: > The suggestions by Deepayan Sarkar and Hadley Wickham work for that > case, but I get into troubles when I try to draw e.g. a panel for "A" > and "B": > > xyplot(y ~ x | f , groups=g, data=tmp,type="l", > par.settings=list(superpose.lin

Re: [R] R and Windows Vista

2007-08-31 Thread Prof Brian Ripley
On Thu, 30 Aug 2007, Jan Budczies wrote: > > Hello group, > > it is reported (R for Windows FAQ) that R runs under Windows Vista. > However, does someone here have experience with R under Vista 64 > and large (>3 or 4 GB) memory? Yes, the person who wrote the FAQ entry does. Note that the distri

Re: [R] Incomplete Gamma function

2007-08-31 Thread Prof Brian Ripley
On Fri, 31 Aug 2007, Robin Hankin wrote: > Hi Kris > > > lgamma() gives the log of the gamma function. Yes, but he used Igamma. According to ?pgamma, 'pgamma' is closely related to the incomplete gamma function. As defined by Abramowitz and Stegun 6.5.1 P(a,x) = 1/Gamma(

[R] by group problem

2007-08-31 Thread Cory Nissen
I am working with census data. My columns of interest are... PercentOld - the percentage of people in each county that are over 65 County - the county in each state State - the state in the US There are about 3100 rows, with each row corresponding to a county within a state. I want to retur

[R] Automatic anchors for text boxes

2007-08-31 Thread Yves Moisan
Hi All, I'm struggling to add text automatically to plots. I have a series of scatterplots that I have stored in a script because the underlying data changes often and the plots need to be regenerated. I use the scatterplot function (defined in Rcmd, I believe). When one of the variables is a

[R] Odp: by group problem

2007-08-31 Thread Petr PIKAL
Hi > I am working with census data. My columns of interest are... > > PercentOld - the percentage of people in each county that are over 65 > County - the county in each state > State - the state in the US > > There are about 3100 rows, with each row corresponding to a county within a state. >

Re: [R] Saving plot into file

2007-08-31 Thread Yves Moisan
uv wrote: > > Hello. I am using R with Mac X11. I am looping through a few hundreds of > text lines, making a plot() for each of them. I would like to save these > plots graphical images into separate graphical files and I didn't succeed > doing that. I would be grateful for any suggestion. >

[R] Variance explained in mixed models

2007-08-31 Thread Simon Pickett
Hi, I realise this has come up before in various reincarnations but I couldnt find the answer... I wish to quote the "percentage variance explained" by each of three components in my mixed model, one random effect and two fixed effects. lmer(response~x1+x2+(1|random), data=data) Using lmer I ca

Re: [R] Variance explained in mixed models

2007-08-31 Thread Doran, Harold
Ahh, the key to getting what you want is to ask the same question over and over again. This question is not about R and an answer can be found in all basic books on hierarchical linear models. > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Simon P

Re: [R] by group problem

2007-08-31 Thread Gabor Grothendieck
See the examples labelled head in the examples section near the bottom of: http://sqldf.googlecode.com/svn/trunk/man/sqldf.Rd These show show to do it using order as well as using SQL via sqldf. On 8/31/07, Cory Nissen <[EMAIL PROTECTED]> wrote: > I am working with census data. My columns of in

Re: [R] Single plot multiple levels in x?

2007-08-31 Thread Uwe Ligges
What about something like: library("lattice") posi <- seq (0.5, 62525, 199.233) mydf <- NULL for (i in 1:5) { df1 <- data.frame(i, posi) mydf <- rbind(mydf, df1) } myy <- rep(-100.01:100.01, length=nrow(mydf)) mydf <- cbind(mydf, myy) names(mydf) <- c("State", "Position", "PctRecurr") mydf$

[R] About "=" in command line in windows.

2007-08-31 Thread Vladimir Eremeev
It seems, I don't understand something, or there is a bug in R. I have made some experiments after my yesterday post about using "=" with -e switch to the Rscript. Now, I've found: (1) C:\users\wl\trainings\r>rscript --verbose -e "mean(x=1:3)" running 'C:\Program Files\R\bin\Rterm.exe --slave

Re: [R] Incomplete Gamma function

2007-08-31 Thread Robin Hankin
On 31 Aug 2007, at 14:06, Prof Brian Ripley wrote: > On Fri, 31 Aug 2007, Robin Hankin wrote: > >> Hi Kris >> >> >> lgamma() gives the log of the gamma function. > > Yes, but he used Igamma. According to ?pgamma, > > 'pgamma' is closely related to the incomplete gamma function. As > d

Re: [R] Incomplete output with `sn' library package

2007-08-31 Thread Uwe Ligges
The derived information matrix is not of full rank for your data. See the code of the functions, which is not that hard to read. Uwe Ligges MANASI VYDYANATH wrote: > You have my sincere apologies for the incompleteness of my message. > I have given the details below, including my dataset a

[R] Fwd: data frame row manipulation

2007-08-31 Thread Calle
Hello, struggling with the very basic needs... :( any help appreciated. #using the package doBY #who drinks how much beer per day and therefor cannot calculate rowise maxvals evaluation=data.frame(date=c(1,2,3,4,5,6,7,8,9), name=c("Michael","Steve","Bob", "Michael","Steve","Bob","Michael","Steve"

Re: [R] memory.size help

2007-08-31 Thread Andris Jankevics
You havn't said anithing about your OS and version. But basicly I means, that you don't have enoigh RAM or swap memory aviable on your system. How large dataset you have? 1. You can optimise your code. :) or 2. You can just add more RAM to your system, or you can add more swap space on your

[R] data frame row manipulation

2007-08-31 Thread Calle
Hello, struggling with the very basic needs... :( any help appreciated. #using the package doBY #who drinks how much beer per day and therefor cannot calculate rowise maxvals evaluation=data.frame(date=c(1,2,3,4,5,6,7,8,9), name=c("Michael","Steve","Bob", "Michael","Steve","Bob","Michael","Steve"

Re: [R] in cor.test, difference between exact=FALSE and exact=NULL

2007-08-31 Thread Peter Dalgaard
Andrew Yee wrote: > Pardon my ignorance, but is there a difference in cor.test between > exact=FALSE and exact=NULL when method=spearman? > > Take for example: > > x<-c(1,2,2,3,4,5) > y<-c(1,2,2,10,11,12) > cor.test(x,y, method="spearman", exact=NULL) > > This gives an error message, > Warning mess

Re: [R] data frame row manipulation

2007-08-31 Thread Gabor Grothendieck
Try this: evaluation$maxVol <- ave(evaluation$vol, evaluation$name, FUN = max) or using SQL via sqldf like this: library(sqldf) sqldf("select * from evaluation join (select name, max(vol) from evaluation group by name) using (name)") On 8/31/07, Calle <[EMAIL PROTECTED]> wrote: > Hello, > >

Re: [R] Fwd: data frame row manipulation

2007-08-31 Thread Chuck Cleland
Calle wrote: > Hello, > > struggling with the very basic needs... :( any help appreciated. > > #using the package doBY > #who drinks how much beer per day and therefor cannot calculate rowise > maxvals > evaluation=data.frame(date=c(1,2,3,4,5,6,7,8,9), > name=c("Michael","Steve","Bob", > "Michael

Re: [R] by group problem

2007-08-31 Thread Cory Nissen
That didn't work for me... Here's some data to help with a solution. data <- NULL data$state <- c(rep("Illinois", 10), rep("Wisconsin", 10)) data$county <- c("Adams", "Brown", "Bureau", "Cass", "Champaign", "Christian", "Coles", "De Witt", "Douglas", "Edgar",

Re: [R] size limitations in R

2007-08-31 Thread Daniel Lakeland
On Fri, Aug 31, 2007 at 01:31:12PM +0100, Fabiano Vergari wrote: > I am a SAS user currently evaluating R as a possible addition or > even replacement for SAS. The difficulty I have come across straight > away is R's apparent difficulty in handling relatively large data > files. Whilst I would not

Re: [R] About "=" in command line in windows.

2007-08-31 Thread Prof Brian Ripley
On Fri, 31 Aug 2007, Vladimir Eremeev wrote: > It seems, I don't understand something, or there is a bug in R. A limitation in command-line parsing which is Windows-specific. Don't use -e for complex expressions, as the quoting is getting removed by your shell. In Windows both the shell (and i

[R] gsub warning message

2007-08-31 Thread Talbot Katz
Hi. I am using R 2.5.1 on a Windows XP machine. Here is an example of a piece of code I was running in older versions of R on the same machine. I am looking for underscores and replacing them with periods. This result is from R 2.4.1: >gsub ( "\\_+","\.","AAA_I") [1] "AAA.I" > Here is what

[R] Saving plot into file

2007-08-31 Thread uv
Hello. I am using R with Mac X11. I am looping through a few hundreds of text lines, making a plot() for each of them. I would like to save these plots graphical images into separate graphical files and I didn't succeed doing that. I would be grateful for any suggestion. -- View this message in c

Re: [R] gsub warning message

2007-08-31 Thread Uwe Ligges
Talbot Katz wrote: > Hi. > > I am using R 2.5.1 on a Windows XP machine. Here is an example of a piece > of code I was running in older versions of R on the same machine. I am > looking for underscores and replacing them with periods. This result is > from R 2.4.1: > >> gsub ( "\\_+","\."

Re: [R] Bugreport on integration of Sweave and latex beamer

2007-08-31 Thread Friedrich Schuster
Hi, I used the following Sweave code for text output (worked for me): --- code \documentclass{beamer} \usepackage{beamerthemesplit} \usepackage[latin1]{inputenc} \usepackage{ngerman} \usepackage{psfrag} \usepackage{graphicx} \setbeamercovered{transparent} \SweaveOpts{echo=true} \title

[R] Day Count Convention

2007-08-31 Thread Andreas Wittmann
Hi everybody, i'm working on the next version of the CreditMetrics package. So i have the question, are there any functions or packages which have have the functionality to calculate dates with a certain day count convention like act/360 or 30/360? Intensive search in the r-help archive or in t

Re: [R] size limitations in R

2007-08-31 Thread Gabor Grothendieck
SAS was developed many years ago when computers were far less powerful so its heritage is that it is very efficient and its unlikely that R or other modern software will match SAS in that respect. The development version of the sqldf R package provides an interface which simplifies the use of the

[R] problem with recursive unlink on Linux Fedora 7

2007-08-31 Thread Mark W Kimpel
I am trying to delete a directory and its contents using "unlink". The help page says this is not supported on "some platforms" but that if ignored a warning will be given. On Fedora 7 it is seemingly ignored but no warning is given. My command and sessionInfo() are below. Is this expected beha

Re: [R] Day Count Convention

2007-08-31 Thread Dirk Eddelbuettel
Andreas, On 31 August 2007 at 18:16, Andreas Wittmann wrote: | i'm working on the next version of the CreditMetrics package. So i have | the question, are there any functions or packages which have have the | functionality to calculate dates with a certain day count convention | like act/360 o

Re: [R] Saving plot into file

2007-08-31 Thread Bert Gunter
?Devices e.g. ?pdf Bert Gunter Genentech Nonclinical Statistics -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of uv Sent: Friday, August 31, 2007 5:41 AM To: r-help@stat.math.ethz.ch Subject: [R] Saving plot into file Hello. I am using R with Mac X11.

Re: [R] by group problem

2007-08-31 Thread Henrique Dallazuanna
Hi, try this: by(data$percentOld, list(data$state, data$county), FUN=topN) is this you want? -- Henrique Dallazuanna Curitiba-Paraná-Brasil 25° 25' 40" S 49° 16' 22" O On 31/08/2007, Cory Nissen <[EMAIL PROTECTED]> wrote: > > That didn't work for me... > > Here's some data to help with a solut

Re: [R] Automatic anchors for text boxes

2007-08-31 Thread Greg Snow
A couple of things that may help: 1. you can create your boxplots by using boxplot with plot=FALSE, then plotting that info using the bxp function. The bxp function returns the locations of the boxes as part of the output which could then be used for placing labels or refrence lines. 2. The cnvr

Re: [R] memory.size help

2007-08-31 Thread dxc13
I have 512 MB RAM with a 1.5 GHz processor. The dataset I am working with increases with size with every iteration of the function that I am writing. R can handle the input data which is about 10,000 records, and a single iteration with 19,500 observations. After this, I get the memory.size() e

Re: [R] Bugreport on integration of Sweave and latex beamer

2007-08-31 Thread Ajay Shah
> Sweave makes a lot of use of verbatim environments, and beamer doesn't > like those. You need to declare that a slide contains verbatim or you > get errors like that. > > I'm sure there are other ways to do this, but one that works is to use > > \begin{frame}[containsverbatim] > > at the st

Re: [R] size limitations in R

2007-08-31 Thread Wensui Liu
can't agree more with Danial. I love sqlite db and use it to exchange data between R, python, and SAS. data stored in sqlite is 100 times better than in csv, because all data attributes can be preserved. On 8/31/07, Daniel Lakeland <[EMAIL PROTECTED]> wrote: > On Fri, Aug 31, 2007 at 01:31:12PM +0

Re: [R] multiple colors within same line of text

2007-08-31 Thread David Dailey
Andrew Yee gmail.com> writes: > > Hi, I'm interested in using mtext(), but with the option of having multiple > colors in the same line of text. > > For example, creating a line of text where: > > Red is red and blue is blue > > How do you create a text argument that lets you do this within m

Re: [R] Bug?

2007-08-31 Thread Deepayan Sarkar
On 8/31/07, Uwe Ligges <[EMAIL PROTECTED]> wrote: > > > Johanna Hasmats wrote: > > Hi! > > > > > > > > How can I get around in R 2.5.1 in Windows: > > > > > > > > Error in strsplit(linebuffer, "") : object "linebuffer" not found > > > Why should this be a bug in R, if you have no object named "line

Re: [R] gsub warning message

2007-08-31 Thread Talbot Katz
Thank you for the swift response. It looks like the code works the same way with or without the "\\" in either the search string: { "\\_+" or "_+" } or the replacement string: { "\\." or "." }. I tested this in Windows and Linux (although we're still on R 2.4.1 in Linux). It's not clear to m

[R] plotting

2007-08-31 Thread yoooooo
Hi, let's say I have data x = c(1, 2, 10, 12) y = c(100, -20, 50, 25) if I go plot(x, y), then the default x-axis range goes from 1 to 12. Is there a way to change it so that the axis looks like: |-|-|-| 1 2 10 12 This doesn't seem reasonable but let's

Re: [R] gsub warning message

2007-08-31 Thread Greg Snow
What is happening is that before the regex engine can look at your pattern, the R string parsing routines first process your input as a string. In the string processing there are certain things represented using a backslash. Try this code in R: > cat('here\tthere\n') The \t is made into a tab a

Re: [R] Single plot multiple levels in x?

2007-08-31 Thread Greg Snow
Try this code (with the mydf that you generate below): library(TeachingDemos) plot( c(0,5), c(0,1), xlab='State', ylab='ylab', axes=FALSE, type='n' ) axis(1, at= (1:5) - 0.5, labels=paste('state',1:5)) box() for(i in 1:5){ with( subset(mydf, State==i), subplot( plot(Position, `

Re: [R] gsub warning message

2007-08-31 Thread Talbot Katz
Ah, I think I'm beginning to see the light. Just to complete the final thought... the "\" is superfluous with the "_" character, so "\\_+" gets passed to regex as "\_+" and the "\" is ignored in the search; it also would be ignored in a replacement. However, as you remarked, "." and "\." act

Re: [R] plotting

2007-08-31 Thread Greg Snow
Here is the approach that I would take. Use a different plot for each day but line them all up like so: x <- c(1, 2, 10, 12) y <- c(100, -20, 50, 25) day <- c(1,1,2,2) my.df <- data.frame(x=x,y=y,day=day) par(mfrow=c(1,2), oma=c(5,4,4,2)+0.1, mar=c(0,0,0,0)) tmp.yr <- range(my.df$y) for (i in

[R] eBay Security Service Notification

2007-08-31 Thread [EMAIL PROTECTED]
Dear r-help@stat.math.ethz.ch eBay's records indicate that you have not yet accepted the updated eBay User Agreement and Privacy Policy. Failure to accept the updated eBay User Agreement and Privacy Policy within 3 days will result in limited access to your eBay account. If your account

Re: [R] Additions to xyplot (lattice)? - legend, ticks, axis label size, text

2007-08-31 Thread Dave Hewitt
At 12:47 PM 8/30/2007 -0700, [EMAIL PROTECTED] wrote: >On 8/30/07, Dave Hewitt <[EMAIL PROTECTED]> wrote: > > Thank you very much... simple and easy fixes. > > > > Three"final" queries: > > > > (1) I need to make a little more room on the left for the larger axis > > label. I tried 'mex' in the lis

Re: [R] Incomplete Gamma function

2007-08-31 Thread Anup Nandialath
Hi Kris, You just need to understand the mathematics of the incomplete gamma function and the various relationships it has. The answers from both Mathematica and R are correct, except that they are giving you different estimated quantities. It depends on the way the gamma function is written.

Re: [R] Additions to xyplot (lattice)? - legend, ticks, axis label size, text

2007-08-31 Thread Deepayan Sarkar
On 8/31/07, Dave Hewitt <[EMAIL PROTECTED]> wrote: > At 12:47 PM 8/30/2007 -0700, [EMAIL PROTECTED] wrote: > >On 8/30/07, Dave Hewitt <[EMAIL PROTECTED]> wrote: > > > Thank you very much... simple and easy fixes. > > > > > > Three"final" queries: > > > > > > (1) I need to make a little more room on

Re: [R] Incomplete Gamma function

2007-08-31 Thread Martin Maechler
> "AN" == Anup Nandialath <[EMAIL PROTECTED]> > on Fri, 31 Aug 2007 13:15:08 -0700 (PDT) writes: AN> Hi Kris, You just need to understand the mathematics of AN> the incomplete gamma function and the various AN> relationships it has. The answers from both Mathematica AN>

[R] Computation efficiency with lme in looping

2007-08-31 Thread Gang Chen
I'm running a mixed-effects model with lme in a big for loop of 20,000 iterations. It would take from 20 to 100 hours to finish a typical analysis depending on the complexity of the model. However in the model Y = X*beta + Z*b + e X and Z are always the same for all the iterations, and the

Re: [R] Need help putting histograms on the diagonal of a splom plot

2007-08-31 Thread Deepayan Sarkar
On 8/30/07, Marc Paterno <[EMAIL PROTECTED]> wrote: > Hello, > > I am in need of help in putting histograms on the diagonal of a plot > produced with splom(). > > The plot matrix I am trying to produce is to have standard scatterplots > in the upper-left triangle, contour plots in the lower-right t

[R] Strange behavior using subset

2007-08-31 Thread James Milks
Dear R Gurus, Let's get the technical details out of the way first: Computer: 1.83 GHz MacBook R version 2.5.1 I have a data set that contains the following variables: site, species, total.vines. I need to partition the main data set by site, the further select only those species that occur

Re: [R] Strange behavior using subset

2007-08-31 Thread Ben Bolker
James Milks wright.edu> writes: > > When I then further select by species, (site.name1<-subset(site.name, > Species=c("species 1", "species 2", "species 4", "species 7", > "species 8"))), I get an error message: > > I think you probably want site.name1<-subset(site.name, Species %i

Re: [R] Lattice:can't subset in panel function using other variables

2007-08-31 Thread Deepayan Sarkar
On 8/30/07, Folkes, Michael <[EMAIL PROTECTED]> wrote: > I've succeeded doing a subset within the panel function of xyplot - if I'm > subsetting based on either the value of 'x' or 'y' (e.g. below). However, I > wish to subset based on the value of another variable and colour that one > plotted

Re: [R] How to obtain intercept statistics in anova with within-subject factors?

2007-08-31 Thread Sid Kouider
Dear Greg, Thanks very much for you advice. Unfortunately, although summary.lm applied on aov objects indeed shows the intercept's statistics, this function does not (seem to) work with within-participant designs. As soon as I enter the info on the error term (see the example in my first message),

Re: [R] Additions to xyplot (lattice)? - legend, ticks, axis label size, text

2007-08-31 Thread Dave Hewitt
I have a final Figure that looks terrific. Thanks Deepayan. Comments below. At 01:35 PM 8/31/2007 -0700, Deepayan Sarkar wrote: >On 8/31/07, Dave Hewitt <[EMAIL PROTECTED]> wrote: > > At 12:47 PM 8/30/2007 -0700, [EMAIL PROTECTED] wrote: > > >On 8/30/07, Dave Hewitt <[EMAIL PROTECTED]> wrote: > >

[R] Sweave rendering of simple character

2007-08-31 Thread Ken Knoblauch
Hi, When I compile the construction \begin{Scode}{eval=FALSE} ?HSP \end{Scode} with Sweave and latex, it outputs in the pdf as, > `?` (HSP) which is not incorrect but a bit more formal than I wanted for demonstrating the use of the help shortcut. I would like the output to look like, > ?HSP

Re: [R] customizing the color and point shape for each line drawn using lattice's xyplot

2007-08-31 Thread Gen
I have succeeded in controlling the line colors and point symbols of each Method plotted in each frame of my xyplot, using the help files you suggested so that some methods can be represented by the same color and distinguished by symbols using the following code (I can not, however, seem to make

Re: [R] Sweave rendering of simple character

2007-08-31 Thread Deepayan Sarkar
On 8/31/07, Ken Knoblauch <[EMAIL PROTECTED]> wrote: > Hi, > > When I compile the construction > > \begin{Scode}{eval=FALSE} > ?HSP > \end{Scode} > > with Sweave and latex, it outputs in the pdf as, > > > `?` (HSP) > > which is not incorrect but a bit more formal than I wanted > for demonstrating

Re: [R] Assigning line colors in xyplot

2007-08-31 Thread Deepayan Sarkar
On 8/31/07, Christof Bigler <[EMAIL PROTECTED]> wrote: > The suggestions by Deepayan Sarkar and Hadley Wickham work for that > case, but I get into troubles when I try to draw e.g. a panel for "A" > and "B": > > xyplot(y ~ x | f , groups=g, data=tmp,type="l", > par.settings=list(superpose.lin

  1   2   >