Re: [R] Objects disappearing in my R work space

2011-11-24 Thread Aldo
Is there a maximum memory allocation for all R windows open? because it is like 1-3 million runs so... it may be reaching some sort of memory limit -- View this message in context: http://r.789695.n4.nabble.com/Objects-disappearing-in-my-R-work-space-tp4104389p4106390.html Sent from the R hel

[R] Unable to reproduce Stata Heckman sample selection estimates

2011-11-24 Thread Yuan Yuan
Hello, I am working on reproducing someone's analysis which was done in Stata. The analysis is estimation of a standard Heckman sample selection model (Tobit-2), for which I am using the sampleSelection package and the selection() function. I have a few problems with the estimation: 1) The re

Re: [R] Objects disappearing in my R work space

2011-11-24 Thread Aldo
It works when I do not have multiple windows open, but is not there when I do have multiple windows open, so I dont think it has to do with the function The function is pretty complicated but I can share more if you think it will help -- View this message in context: http://r.789695.n4.nabble

Re: [R] options(errorfn=traceback)

2011-11-24 Thread Joshua Wiley
Hi Ivo, Does this do what you want? options(error = function(x) base::traceback()) Cheers, Josh On Thu, Nov 24, 2011 at 8:22 PM, ivo welch wrote: > Dear R experts---I may have asked this in the past, but I don't think > I figured out how to do this.  I would like to execute traceback() > auto

[R] options(errorfn=traceback)

2011-11-24 Thread ivo welch
Dear R experts---I may have asked this in the past, but I don't think I figured out how to do this. I would like to execute traceback() automatically if my R program dies---every R programI ever invoke. I guessed that I could have wrapped my entire R code into tryCatch( ... oodles of R code ,

Re: [R] Objects disappearing in my R work space

2011-11-24 Thread R. Michael Weylandt
Can you say more about how your algorithm is implemented? If it's wrapped in a function, the result might disappear with the end of the function's environment. I don't think having multiple R sessions would be a problem...it's never been for me. Michael On Thu, Nov 24, 2011 at 10:50 AM, Aldo wro

Re: [R] The contrast and Design libraries

2011-11-24 Thread R. Michael Weylandt
On another list it was reported that a new version of contrast was uploaded to CRAN earlier today that makes use of Design's replacement "rms". Wait a day or two and then download this updated version and rms. http://www.mail-archive.com/r-sig-mac@r-project.org/msg00924.html Michael On Thu, Nov

Re: [R] CAPM-GARCH - Regression analysis with heteroskedasticity

2011-11-24 Thread barb
Okay, it seems to work with Mahalanobis: b = (X′S^−1X)−1X′S^−1Y minimizes the Mahalanobis-distance of Xb to Y . And S is the covariance-matrix. cov = a0+a1x_{n-1}*y_{n-1}+ß*cov{n-1} But shouldn´t it be the covariance of the residuals? Anyone experiences with that? -- View this message in contex

[R] Copula Fitting Using R

2011-11-24 Thread cahaya iman
Hi, Is anybody using Copula package for fitting copulas to own data? I have two marginals Log Normal with (parameters 1.17 and 0.76) and Gamma ( 2.7 and 1.05) Which package I should use to fit Gumbel and Clayton Copulas? Thanks, fayyad [[alternative HTML version deleted]] _

[R] loop through columns in S4 objects

2011-11-24 Thread francy
Dear experts, I am trying to perform an association using snpStats. I have a snp matrix called 'plink' which contains my genotype data (as a list of $genotypes, $map, $fam), and a phenotype data frame which contains the outcomes (outcome1, outcome2,...) I would like to associate with the genotype.

[R] R-2.14.0: read.csv2 with fileEncoding="UTF-8"

2011-11-24 Thread Christian Montel
Dear R-List, I'm trying to read an UTF-8-encoded text file which works fine under # ### CONFIG 1 > sessionInfo() R version 2.12.1 (2010-12-16) Platform: i386-pc-mingw32/i386 (32-bit) locale: [1] LC_COLLATE=German_Germany.1252 L

[R] CAPM-GARCH - Regression analysis with heteroskedasticity

2011-11-24 Thread barb
Hey Guys, i want to do a CAPM-GARCH model. I didn´t find anything posted online. (If there is something - shame on me - i didn´t find it.) My Problem: What is the difference if I let the residuals “e” follow a garch process ? How do I do my regression analysis now? I began

Re: [R] object 'gs' not found

2011-11-24 Thread Arto
Hello, I got the code working now. Thanks for the help anyways=)! Arto -- View this message in context: http://r.789695.n4.nabble.com/object-gs-not-found-tp4103915p4104792.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-proj

[R] Question on density values obtained from kde2d() from package MASS

2011-11-24 Thread Andreas Klein
Hello, I am a little bit confused regarding the density values obtained from the function kde2d() from the package MASS because the are not in the intervall [0,1] as I would expect them to be. Here is an example: x <- c(0.0036,0.0088,0.0042,0.0022,-0.0013,0.0007,0.0028,-0.0028,0.0019,0.0026,-0

[R] The contrast and Design libraries

2011-11-24 Thread Joanne Lello
Dear all, I have been using the contrast library in my teaching for the last couple of years and am right in the middle of this year's round. In the last week R has been updated to version 2.14.0 on our computers. This has had the unfortunate effect of meaning the contrasts library no longer wo

Re: [R] How to increase precision to handle very low P-values

2011-11-24 Thread alonso_canada
Interesting observation, Duncan! I investigate its effects in my case. Thanks again for your time. all the best, Alonso -- View this message in context: http://r.789695.n4.nabble.com/How-to-increase-precision-to-handle-very-low-P-values-tp4100250p4104503.html Sent from the R help mailing list arc

[R] Objects disappearing in my R work space

2011-11-24 Thread Aldo
I am running MCMC chains with a self written MCMC algorithm. When I have multiple R terminals open while running the Chain, when it finishes it is not there. when I press ls() it does not show up and when I type the Name it says the Object is not found. I assume It is unrecoverable... but how do I

Re: [R] Legend

2011-11-24 Thread Filoche
Thank you for your precious help. It works fine. However, what about if I have two entries in the legend? I tryed: legend('topright', inset = .05, title = 'light ratios', pch = c(21,22), legend = c(substitute('Green/Red' ~~ R^2 == r2, list(r2=r2)),substitute('Green/Red' ~~ R^2 == r2, list(

Re: [R] content of global environment with dump.frames()

2011-11-24 Thread Jannis
On 11/24/2011 07:02 PM, R. Michael Weylandt wrote: Are perhaps you looking for options(error = recover)? Michael No, not really. First I use this for non-interactive sessions (otherwise I would mtrace() from package debug) and second I also want to save and retrieve the environment contents

Re: [R] proper work-flow with 'formula' objects and lm()

2011-11-24 Thread Liviu Andronic
On Thu, Nov 24, 2011 at 11:55 PM, Prof Brian Ripley wrote: > You would get exactly the same problem with ...,, anway. > > Here's a commonly used approach in R sources: > > x.lm <- function(formula, data, ...) > { >    Call <- match.call(expand.dots = TRUE) >    Call[[1]] <- as.name("lm") >    Call

Re: [R] proper work-flow with 'formula' objects and lm()

2011-11-24 Thread Prof Brian Ripley
You would get exactly the same problem with ...,, anway. Here's a commonly used approach in R sources: x.lm <- function(formula, data, ...) { Call <- match.call(expand.dots = TRUE) Call[[1]] <- as.name("lm") Call$formula <- as.formula(terms(formula)) eval(Call) } On Thu, 24 No

Re: [R] readGDAL or raster for reading bit map files

2011-11-24 Thread Michael Sumner
It is by magic, otherwise known as R classes and methods. See sp:::as.matrix.SpatialGridDataFrame There's a lot of background here so I suggest you start with the general R documentation, and the sp package documentation, including vignette("sp") and these citation("sp") Cheers, Mike. On Fri

Re: [R] proper work-flow with 'formula' objects and lm()

2011-11-24 Thread Gabor Grothendieck
On Thu, Nov 24, 2011 at 2:48 PM, Liviu Andronic wrote: > Dear all > I have a work-flow issue with lm(). When I use >> lm(y1~x1, anscombe) > > Call: > lm(formula = y1 ~ x1, data = anscombe) > > Coefficients: > (Intercept)           x1 >     3.0001       0.5001 > > > I get as expected the formula, "

Re: [R] proper work-flow with 'formula' objects and lm()

2011-11-24 Thread Liviu Andronic
On Thu, Nov 24, 2011 at 10:25 PM, Prof Brian Ripley wrote: > Yes.  That's a job for substitute (the second time today). > >> form <- formula(y1~x1) >> x <- eval(substitute(lm(f, anscombe), list(f = form))) >> summary(x) > > Call: > lm(formula = y1 ~ x1, data = anscombe) > That's what I wanted. Tha

Re: [R] proper work-flow with 'formula' objects and lm()

2011-11-24 Thread Prof Brian Ripley
On Thu, 24 Nov 2011, Liviu Andronic wrote: On Thu, Nov 24, 2011 at 9:14 PM, Duncan Murdoch wrote: It is retained.  terms(fit) will give it to you, if fit is an lm object. Thank you. The following works nicely. (form <- formula(y1~x1)) y1 ~ x1 x <- lm(form, anscombe) formula(terms(x)) y1

Re: [R] pdf() under multicore (was Comments disappearing from local functions (R 2.14.0))

2011-11-24 Thread Prof Brian Ripley
On Fri, 25 Nov 2011, Patrick Connolly wrote: [... about a completely different topic] With the one using multicore, I get a strange error that didn't occur with R-2.13.1. A function which runs on 7 cores produces a swag of PDF files and then returns a list of information. New to the 2.14.0 is

Re: [R] proper work-flow with 'formula' objects and lm()

2011-11-24 Thread Liviu Andronic
On Thu, Nov 24, 2011 at 9:14 PM, Duncan Murdoch wrote: > It is retained.  terms(fit) will give it to you, if fit is an lm object. > Thank you. The following works nicely. > (form <- formula(y1~x1)) y1 ~ x1 > x <- lm(form, anscombe) > formula(terms(x)) y1 ~ x1 However, I was hoping that there wa

Re: [R] Comments disappearing from local functions (R 2.14.0)

2011-11-24 Thread Prof Brian Ripley
On Fri, 25 Nov 2011, Patrick Connolly wrote: On Mon, 21-Nov-2011 at 09:46PM +1300, Rolf Turner wrote: [] Please don't excise content, nor mix up topics. I am going to reply here just to the subject line, and reply to your use of pdf() under multicore separately. |> It *doesn't* hap

Re: [R] Thank you

2011-11-24 Thread Paul
On 24/11/11 14:43, Bert Gunter wrote: ... and while I am at it, as this is the U.S. Thanksgiving... My sincere thanks to the many R developers and documenters who contribute large amounts of their personal time and effort to developing, improving, and enhancing the accessibility of R for data an

Re: [R] First read

2011-11-24 Thread Patrick Burns
Bert, Your laziness is well founded -- it is not on CRAN, you have to go all the way over to another website. And thanks for the kind words (even though we Europeans are free to be ingrates today). Pat On 24/11/2011 14:23, Bert Gunter wrote: Pat: 1. Thank you for this. Having not read your t

Re: [R] proper work-flow with 'formula' objects and lm()

2011-11-24 Thread Duncan Murdoch
On 24/11/2011 2:48 PM, Liviu Andronic wrote: Dear all I have a work-flow issue with lm(). When I use > lm(y1~x1, anscombe) Call: lm(formula = y1 ~ x1, data = anscombe) Coefficients: (Intercept) x1 3.0001 0.5001 I get as expected the formula, "y1 ~ x1", in the print()ed

[R] jzoj4 43vwibnt

2011-11-24 Thread Nathaniel Saxe
5ja7o, h5ih0aufrt. http://yjgv6d1r.blog.com/nrd/ s2gqnd gkajocjaked 6fzlef, qufk5mowaax0 zcy51g1f. avgvvqnqiq79 g11hp. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://

[R] proper work-flow with 'formula' objects and lm()

2011-11-24 Thread Liviu Andronic
Dear all I have a work-flow issue with lm(). When I use > lm(y1~x1, anscombe) Call: lm(formula = y1 ~ x1, data = anscombe) Coefficients: (Intercept) x1 3.0001 0.5001 I get as expected the formula, "y1 ~ x1", in the print()ed results or summary(). However, if I pass through

Re: [R] Comments disappearing from local functions (R 2.14.0)

2011-11-24 Thread Patrick Connolly
On Mon, 21-Nov-2011 at 09:46PM +1300, Rolf Turner wrote: [] |> It *doesn't* happen to me. Ergo it would appear to be peculiar |> to your particular set-up. |> |> What does options()$keep.source say? (Mine says "TRUE".) |> Same here in both cases. |> |> P. S.: |> |> > sessionInfo() |>

Re: [R] Is there way to add a new row to a data frame in a specific location

2011-11-24 Thread Prof Brian Ripley
On Thu, 24 Nov 2011, Jeff Newmiller wrote: AFAIK all solutions to the "grow object size" problem in R involve creation of a new object to "change" an old one. There is considerable sophistication under the hood that allows a minimum of intermediate objects to be created if you are careful, bu

Re: [R] Question on density values obtained from kde2d() from package MASS

2011-11-24 Thread Prof Brian Ripley
On Thu, 24 Nov 2011, Andreas Klein wrote: Hello, I am a little bit confused regarding the density values obtained from the function kde2d() from the package MASS because the are not in the intervall [0,1] as I would expect them to be. Here is an Your expectation is wrong. example: x <-

Re: [R] Is there way to add a new row to a data frame in a specific location

2011-11-24 Thread Jeff Newmiller
AFAIK all solutions to the "grow object size" problem in R involve creation of a new object to "change" an old one. There is considerable sophistication under the hood that allows a minimum of intermediate objects to be created if you are careful, but actually changing the size of an object in

Re: [R] content of global environment with dump.frames()

2011-11-24 Thread R. Michael Weylandt
Are perhaps you looking for options(error = recover)? Michael On Thu, Nov 24, 2011 at 12:52 PM, Jannis wrote: > Dear R users, > > > I am using dump.frames() to investigate the content of the different > environments in cases of errors or during certain steps of a non interactive > calculation.

[R] content of global environment with dump.frames()

2011-11-24 Thread Jannis
Dear R users, I am using dump.frames() to investigate the content of the different environments in cases of errors or during certain steps of a non interactive calculation. I am, however, wondering about how to see the content of the global environment at the moment that dump.fames() was invok

Re: [R] Thank you

2011-11-24 Thread christiaan pauw
And from the side of a ordinary user who opened the page that read: "Chapter 1: What is R?" two years ago to all of you on this list: Since reading that first page things have changed so that I would get through a normal working day without the software you create and the advice you give. Thank yo

Re: [R] Is there way to add a new row to a data frame in a specific location

2011-11-24 Thread andrija djurovic
Hi. May be this: df = data.frame( A=c('a','b','c'), B=c(1,2,3), C=c(10,20,30), stringsAsFactors=FALSE) newrow = c('X', 100, 200) rbind(df,newrow)[c(1,4,2,3),] Andrija On Thu, Nov 24, 2011 at. 6:05 PM, Sammy Zee wrote: > Is there easy way (without copying the existing rows to a temporary > l

[R] Is there way to add a new row to a data frame in a specific location

2011-11-24 Thread Sammy Zee
Is there easy way (without copying the existing rows to a temporary location and copying back) to add a new row to a specific index location in an existing data frame? Example df = data.frame( A= c('a','b','c'), B=c(1,2,3), C=(10,20,30)) newrow = c('X', 100, 200) I want to add the newrow as the

[R] [R-pkgs] sem package (version 2.1-1)

2011-11-24 Thread John Fox
Dear R users, Version 2.1-1 of the sem package, for structural equation modeling, is now on CRAN. Unlike version 2.0-0, which was a major overhaul of the package, version 2.1-1 just sprinkles some syntactic sugar on it, introducing the specifyEquations() and cfa() functions; specifyEquations() s

Re: [R] R package for nested random-effects ANOVA models

2011-11-24 Thread Ben Bolker
syrvn gmx.net> writes: > > Hello, > > can anyone recommend an R package which can deal with nested random-effects > ANOVA models? > > Cheers > > Syrvn lme in the nlme package; lmer in the lme4 package; and/or visit the r-sig-mixed-models list. Ben Bolker __

Re: [R] Thank you

2011-11-24 Thread Frank Harrell
Bert you said it better than I ever could. What R creators, developers, and documenters do for us every day by how they effect our work as statisticians is something I would not know how to measure. THANK YOU! Frank Bert Gunter wrote > > ... and while I am at it, as this is the U.S. Thanksgivin

Re: [R] I cannot get species scores to plot with site scores in MDS when I use a distance matrix as input. Problems with NA's?

2011-11-24 Thread B77S
Try the daisy() function from the package "cluster", it seems to be able to handle NAs and non-dummy coded character variables metaMDS(daisy(df, metric="gower")) Edwin Lebrija Trejos wrote > > Hi, First I should note I am relatively new to R so I would appreciate > answers that take this into

Re: [R] Vegan: how to plot sites labes in diversity plot

2011-11-24 Thread David Winsemius
On Nov 24, 2011, at 8:12 AM, Alejo C.S. wrote: Dear List, I can'f figure how to add point labels in the next plot (example from ?taxondive help page, from vegan package): library(vegan) data(dune) data(dune.taxon) taxdis <- taxa2dist(dune.taxon, varstep=TRUE) mod <- taxondive(dune, taxdis) pl

[R] R package for nested random-effects ANOVA models

2011-11-24 Thread syrvn
Hello, can anyone recommend an R package which can deal with nested random-effects ANOVA models? Cheers Syrvn -- View this message in context: http://r.789695.n4.nabble.com/R-package-for-nested-random-effects-ANOVA-models-tp4104374p4104374.html Sent from the R help mailing list archive at Nabb

Re: [R] Need some vectorizing help

2011-11-24 Thread David Winsemius
On Nov 24, 2011, at 4:52 AM, Scott Tetrick wrote: So I have a problem that I'm trying to get through, and I just can't seem to get it to run very fast in R. What I'm trying to do is to find in a vector a local peak, then the next time that value is crossed later. I don't care about peaks

Re: [R] understanding all.equal() output: "Mean relative difference"

2011-11-24 Thread S Ellison
The help page says that large differences are returned as relative difference. A look at the code shows that all.equal.numeric, the version used for a numeric first argument, uses the 'target', that is, the first parametter, as the scaling factor. Thus c(1,4) has a difference of 3, scaled by 1,

Re: [R] I cannot get species scores to plot with site scores in MDS when I use a distance matrix as input. Problems with NA's?

2011-11-24 Thread B77S
-- View this message in context: http://r.789695.n4.nabble.com/I-cannot-get-species-scores-to-plot-with-site-scores-in-MDS-when-I-use-a-distance-matrix-as-input-Pr-tp4103699p4104295.html Sent from the R help mailing list archive at Nabble.com. __ R-he

Re: [R] Horizontal Y axis title above the y axis

2011-11-24 Thread Andres Christian
Dear Duncan Thanks for your help. However, your suggestion still does not solve my problem because mtext() only allows me to put the text at the beginning of the Y axis (adj=0), but not centered above it, because values below 0 are not permitted for the parameter adj. Best regards Christian

Re: [R] readGDAL or raster for reading bit map files

2011-11-24 Thread Alaios
Thanks a lot! That worked. I have two R related questions when I use the   store<-readGDAL(fname='lena256.bmp') this returns the struct below > str(store) Formal class 'SpatialGridDataFrame' [package "sp"] with 6 slots   ..@ data   :'data.frame': 65536 obs. of  1 variable:   .. ..$ band1: int

Re: [R] Legend

2011-11-24 Thread Uwe Ligges
On 24.11.2011 14:18, Filoche wrote: Hi everyone. I have a linear regression where I retrieve the R2 like this: r2 = sprintf('%4.2f %s',(summary(reg1)$r.squared)) In my figure I have a legend where I would like to add that R2 value to the legend text. Something like: My text R^2 = r2 legen

Re: [R] object 'gs' not found

2011-11-24 Thread Uwe Ligges
On 24.11.2011 14:34, Arto wrote: Hello, What is wrong in the below code? What do Ihave to do to make it work? Gs file is my working directory but for some reason it cannot be found.. da<- read.table(file.choose(),header=T,sep="\t") head(da) source("garchoxfit_R.txt") m1=garchOxFit(formula.me

Re: [R] Horizontal Y axis title above the y axis

2011-11-24 Thread Duncan Murdoch
On 24/11/2011 10:08 AM, Andres Christian wrote: Dear Duncan Thanks for your help. However, your suggestion still does not solve my problem because mtext() only allows me to put the text at the beginning of the Y axis (adj=0), but not centered above it, because values below 0 are not permitted

Re: [R] SPSS F-test on change in R square between hierarchical models

2011-11-24 Thread Yvonnick Noel
Christopher, I am wondering if anyone knows how to perform an F-test on the change in R square between hierarchical models in R? SPSS provides this information and a researcher that I am working with is interested in getting this information. Alternatively, if someone knows how I can calculate th

Re: [R] Thank you

2011-11-24 Thread Dennis Murphy
Well said. +1 Dennis On Thu, Nov 24, 2011 at 6:43 AM, Bert Gunter wrote: > ... and while I am at it, as this is the U.S. Thanksgiving... > > My sincere thanks to the many R developers and documenters who > contribute large amounts of their personal time and effort to > developing, improving, and

Re: [R] post the message

2011-11-24 Thread Uwe Ligges
On 24.11.2011 04:34, M Subbiah wrote: When I fit a logistic regression with 5 predictors (all of them are coded) i get the standard error almost zero for the estimated coeffts. I request the members to offer comments / suggestions / diagnostics? [[alternative HTML version deleted]]

Re: [R] Horizontal Y axis title above the y axis

2011-11-24 Thread Duncan Murdoch
On 24/11/2011 9:25 AM, Andres Christian wrote: Dear R-help team I have tried hard to turn my Y axis 90 degrees, so that it is written horizontally, and placing it above the Y axis, but I did not succeed. I have tried to adapt the following functions: - plot() - title() -

Re: [R] dataframe indexing by number of cases per group

2011-11-24 Thread Johannes Radinger
Hi, thank you for your suggestions. I think I'll stay with Dennis' approach as this is a real indexing approach: df[ave(as.numeric(df$group), as.numeric(df$group), FUN = length) > 4, ] I'll try that out now best regards /Johannes Original-Nachricht > Datum: Thu, 24 Nov 20

[R] pairs(), expression in label and color in text.panel

2011-11-24 Thread Johannes Radinger
Hello, I'd like to add custom labels to my pair() plot. These labels include math expression but they aren't correctly displayed... Further, I want that the boxes for the text.panel (diagonal) have an other background color (grey80). Is that generally possible? If yes how do I have to set it? W

[R] Horizontal Y axis title above the y axis

2011-11-24 Thread Andres Christian
Dear R-help team I have tried hard to turn my Y axis 90 degrees, so that it is written horizontally, and placing it above the Y axis, but I did not succeed. I have tried to adapt the following functions: - plot() - title() - mtext() And some more that did not prov

[R] object 'gs' not found

2011-11-24 Thread Arto
Hello, What is wrong in the below code? What do Ihave to do to make it work? Gs file is my working directory but for some reason it cannot be found.. da <- read.table(file.choose(),header=T,sep="\t") head(da) source("garchoxfit_R.txt") m1=garchOxFit(formula.mean=~arma(0,0),formula.var=~igarch(1,

[R] Legend

2011-11-24 Thread Filoche
Hi everyone. I have a linear regression where I retrieve the R2 like this: r2 = sprintf('%4.2f %s',(summary(reg1)$r.squared)) In my figure I have a legend where I would like to add that R2 value to the legend text. Something like: My text R^2 = r2 legend('topright', inset = .05, title='light

Re: [R] character substitution within a variable name

2011-11-24 Thread matric
Great! I got it. You're right, I misinterpreted Duncan's suggestion. Thanks a lot to both of you... Matteo On 24 November 2011 02:47, Rolf Turner-3 [via R] wrote: > On 24/11/11 09:23, matric wrote: >> Thanks Duncan, >> I knew it. But if I use the complete variable name, I'll have far too >> many

[R] Thank you

2011-11-24 Thread Bert Gunter
... and while I am at it, as this is the U.S. Thanksgiving... My sincere thanks to the many R developers and documenters who contribute large amounts of their personal time and effort to developing, improving, and enhancing the accessibility of R for data analysis and science. I believe it is fair

Re: [R] how to add "waiting for page change" to my script

2011-11-24 Thread Jabez Wilson
That works wonderfully - thank you --- On Thu, 24/11/11, Jim Holtman wrote: From: Jim Holtman Subject: Re: [R] how to add "waiting for page change" to my script To: "Jabez Wilson" Cc: "R-Help" Date: Thursday, 24 November, 2011, 12:39 I thing it is par(ask = TRUE) Sent from my iPad On N

Re: [R] how to add "waiting for page change" to my script

2011-11-24 Thread Bert Gunter
Yes But checking the Help I just learned that from R2.14.0 (I presume): asklogical. If TRUE (and the R session is interactive) the user is asked for input, before a new figure is drawn. As this applies to the device, it also affects output by packages grid and lattice. It can be set even

Re: [R] errors with lme4

2011-11-24 Thread Bert Gunter
Ben et. al: Shouldn't this thread be taken to R-sig-mixed-models ? Cheers, Bert On Thu, Nov 24, 2011 at 6:14 AM, Ben Bolker wrote: > Alessio Unisi unisi.it> writes: > >> >> Dear R-users, >> i need help for this topic! >> >> I'm trying to determine if the reproductive success >> (0=fail, 1=succ

Re: [R] First read (was: Re: Looping and paste)

2011-11-24 Thread Bert Gunter
Pat: 1. Thank you for this. Having not read your tutorial, but based on what I know of your other efforts, I am sure that you are correct. Is there a link to this on CRAN somewhere so I can refer to it in future (too lazy to search myself)? 2. Thank you also for your continuing contributions to R

Re: [R] errors with lme4

2011-11-24 Thread Ben Bolker
Alessio Unisi unisi.it> writes: > > Dear R-users, > i need help for this topic! > > I'm trying to determine if the reproductive success > (0=fail, 1=success) of a species of bird > is related to a list of covariates. > > These are the covariates: > §elev: elevation of nest (meters) > §

Re: [R] dataframe indexing by number of cases per group

2011-11-24 Thread Gabor Grothendieck
On Thu, Nov 24, 2011 at 7:02 AM, Johannes Radinger wrote: > Hello, > > assume we have following dataframe: > > group <-c(rep("A",5),rep("B",6),rep("C",4)) > x <- c(runif(5,1,5),runif(6,1,10),runif(4,2,15)) > df <- data.frame(group,x) > > Now I want to select all cases (rows) for those groups > whi

Re: [R] how to add "waiting for page change" to my script

2011-11-24 Thread Jabez Wilson
Thanks, Enrico, that will do nicely.   Jab --- On Thu, 24/11/11, Enrico Schumann wrote: From: Enrico Schumann Subject: Re: [R] how to add "waiting for page change" to my script To: "Jabez Wilson" Cc: "R-Help" Date: Thursday, 24 November, 2011, 13:20 see ?devAskNewPage plot(1:10, col = "g

Re: [R] dataframe indexing by number of cases per group

2011-11-24 Thread Dennis Murphy
A very similar question was asked a couple of days ago - see the thread titled "Removing rows in dataframe w'o duplicated values" - in particular, the responses by Dimitris Rizopoulos and David Winsemius. The adaptation to this problem is df[ave(as.numeric(df$group), as.numeric(df$group), FUN = le

Re: [R] understanding all.equal() output: "Mean relative difference"

2011-11-24 Thread Duncan Murdoch
On 11-11-24 7:44 AM, Liviu Andronic wrote: Dear all How should one parse all.equal() output? I'm specifically referring to the 'mean relative difference' messages. For example, all.equal(pi, 355/113) [1] "Mean relative difference: 8.491368e-08" But I'm not sure how to understand these messages

Re: [R] readGDAL or raster for reading bit map files

2011-11-24 Thread Michael Sumner
Just do m <- as.matrix(store) or m <- as.image.SpatialGridDataFrame(store)$z image(m) They give the same result with different orientations. Note that both assume a single-band raster, e.g. you only have a "greyscale" bitmap (for example). The details behind all this is given in the document

Re: [R] how to add "waiting for page change" to my script

2011-11-24 Thread Enrico Schumann
see ?devAskNewPage plot(1:10, col = "green", pch = 19) devAskNewPage(ask = TRUE) plot(1:10, col = "blue", pch = 19) Am 24.11.2011 13:28, schrieb Jabez Wilson: I'd like to "step" through 24 histograms by using the return or click button option, as shown in the demo(graphics) demonstration. I'

[R] Vegan: how to plot sites labes in diversity plot

2011-11-24 Thread Alejo C.S.
Dear List, I can'f figure how to add point labels in the next plot (example from ?taxondive help page, from vegan package): library(vegan) data(dune) data(dune.taxon) taxdis <- taxa2dist(dune.taxon, varstep=TRUE) mod <- taxondive(dune, taxdis) plot(mod) The points in this plot are diversity valu

[R] Error in expand.covs: 'data' must be an 'msdata' object

2011-11-24 Thread Kadriye Kaplan
Hi, I have transformed a Lexis object to a msdata object and tried to apply expand.covs() on this object, but I got an error message: "Error in expand.covs... 'data' must be an 'msdata' object". I need to change the class of data to msdata, but don't know how to do it. Thanks in advance, Kadriye

[R] Need some vectorizing help

2011-11-24 Thread Scott Tetrick
So I have a problem that I'm trying to get through, and I just can't seem to get it to run very fast in R. What I'm trying to do is to find in a vector a local peak, then the next time that value is crossed later. I don't care about peaks that may be lower than this first one - they can be ig

[R] I cannot get species scores to plot with site scores in MDS when I use a distance matrix as input. Problems with NA's?

2011-11-24 Thread Edwin Lebrija Trejos
Hi, First I should note I am relatively new to R so I would appreciate answers that take this into account. I am trying to perform an MDS ordination using the function “metaMDS” of the “vegan” package. I want to ordinate species according to a set of functional traits. “Species” here refers t

[R] readGDAL or raster for reading bit map files

2011-11-24 Thread Alaios
Dear all, I have asked yesterday of how I can read a simple bitmap file in R cran. I was suggest to use either readGDAL or raster for loading my bitmap a. I have done it with readGDAL like     store<-readGDAL(fname='lena256.bmp')     and it works,... but it converts my matrix-like notion of a b

[R] understanding all.equal() output: "Mean relative difference"

2011-11-24 Thread Liviu Andronic
Dear all How should one parse all.equal() output? I'm specifically referring to the 'mean relative difference' messages. For example, > all.equal(pi, 355/113) [1] "Mean relative difference: 8.491368e-08" But I'm not sure how to understand these messages. When they're close to 0 (or 1xe-16), then i

Re: [R] CovSde F. sources?

2011-11-24 Thread kv
D'oh. Thanks you very much, Michael -- View this message in context: http://r.789695.n4.nabble.com/CovSde-F-sources-tp4100374p4103647.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.et

Re: [R] how to add "waiting for page change" to my script

2011-11-24 Thread Jim Holtman
I thing it is par(ask = TRUE) Sent from my iPad On Nov 24, 2011, at 7:28, Jabez Wilson wrote: > I'd like to "step" through 24 histograms by using the return or click button > option, as shown in the demo(graphics) demonstration. I've searched for > "interactive graphics", and "waiting for p

[R] how to add "waiting for page change" to my script

2011-11-24 Thread Jabez Wilson
I'd like to "step" through 24 histograms by using the return or click button option, as shown in the demo(graphics) demonstration. I've searched for "interactive graphics", and "waiting for page change" in R documentation but with no result. I'm sure that this is a relatively straightforward pro

Re: [R] First read (was: Re: Looping and paste)

2011-11-24 Thread Liviu Andronic
On Thu, Nov 24, 2011 at 9:27 AM, Patrick Burns wrote: > It's very seldom that I disagree with > Bert, but here is one time. > > I don't think "An Introduction to R" is > a suitable first read for people with > little computational experience. > I must agree with Patrick here. The 'Intro to R' may

[R] dataframe indexing by number of cases per group

2011-11-24 Thread Johannes Radinger
Hello, assume we have following dataframe: group <-c(rep("A",5),rep("B",6),rep("C",4)) x <- c(runif(5,1,5),runif(6,1,10),runif(4,2,15)) df <- data.frame(group,x) Now I want to select all cases (rows) for those groups which have more or equal 5 cases (so I want to select all cases of group A and

[R] (no subject)

2011-11-24 Thread M Subbiah
http://dina.newhypothesis.com/wp-content/plugins/extended-comment-options/wfkjnf.htm __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provid

[R] looking for beta parameters

2011-11-24 Thread Kehl Dániel
Dear Community, I am trying to write (update) a code for the following problem. Lets assume we have a beta distribution. I know one quantile, lets say, 10% of the mass lies above .8, that is between .8 and 1. In addition, I know that the average of this "truncated tail" is a given number, lets

Re: [R] Installing rJava from source on Mac

2011-11-24 Thread Prof Brian Ripley
This is not an appropriate topic for R-help (see the posting guide), and it is what R-sig-mac is there for. 'on Mac' is not specific enough: they will need to know your exact OS. But it looks like a path problem. Those tools are part of Xcode, and tools in its path is not being found *when th

Re: [R] On-demand importing of a package

2011-11-24 Thread Uwe Ligges
On 23.11.2011 16:38, Gábor Csárdi wrote: Just for the records, the solution was to make the matrix 'dgCmatrix" instead of 'dsCmatrix', 'dgCmatrix' works and 'dsCmatrix' does not. I suspect that this has to do something with the S4 class hierarchy in Matrix, but I am not sure. This is a quite u

Re: [R] glmulti fails because of rJava

2011-11-24 Thread Uwe Ligges
On 23.11.2011 14:43, Toby Marthews wrote: Dear R, The glmulti package no longer loads through the library() command, apparently because of a problem with rJava. I have today reinstalled R from scratch (updated to v2.14.0) and reinstalled all packages from scratch and updated them all too. Th

[R] Installing rJava from source on Mac

2011-11-24 Thread christiaan pauw
Hi Everybody I am trying to install the latest version of JavaGD from source but get the following error. trying URL 'http://cran.za.r-project.org/src/contrib/JavaGD_0.5-4.tar.gz' Content type 'application/x-gzip' length 102242 bytes (99 Kb) opened URL ===

Re: [R] what is wrong with this dataset?

2011-11-24 Thread Rob Griffin
I (and probably everyone who has looked at your email) have literally no clue what you are trying to do. Take a look at this first. And for your ‘question’ I assume you have tried to aggregate the data frame you have called dataset – what you have produced is a new data frame that has all

[R] First read (was: Re: Looping and paste)

2011-11-24 Thread Patrick Burns
It's very seldom that I disagree with Bert, but here is one time. I don't think "An Introduction to R" is a suitable first read for people with little computational experience. Better (I modestly suggest) would be: http://www.burns-stat.com/pages/Tutor/hints_R_begin.html which includes some ot

Re: [R] AlgDesign - $D $A $Ge $Dea

2011-11-24 Thread Dennis Murphy
See ?AlgDesign::optFederov and look for the 'Value' section, where these elements of the output list are defined. Dennis On Wed, Nov 23, 2011 at 7:15 PM, 蓁蓁 李 wrote: > > Hi, > > I am wondering how I should interpreate the output of optFederov() in > AlgDesign. > > Specially I want to know what

Re: [R] Looping and paste

2011-11-24 Thread Dennis Murphy
Hi: There are two good reasons why the loop solution is not efficient in this (and related) problem(s): (i) There is more code and less transparency; (ii) the vectorized solution is four times faster. Here are the two proposed functions: # Vectorized version m1 <- function(v) paste(v, ' to ', v

[R] errors with lme4

2011-11-24 Thread Alessio Unisi
Dear R-users, i need help for this topic! I'm trying to determine if the reproductive success (0=fail, 1=success) of a species of bird is related to a list of covariates. These are the covariates: §elev: elevation of nest (meters) §seadist: distance from the sea (meters) §meanterra

  1   2   >