Re: [R] R crashes

2009-10-30 Thread premmad
Windows XP 32 bit machine. allocated 2gb as memory for R 2.9.2 data will be 20mb and was running calculations on the data . but the r crashes with out any warning or so. -- View this message in context: http://old.nabble.com/R-crashes-tp26110355p26124740.html Sent from the R help mailing list a

Re: [R] how to control the label position on panels of trellise plot

2009-10-30 Thread Patrick Connolly
On Thu, 29-Oct-2009 at 05:22PM -0400, zrl wrote: |> Hi, |> |> I am wondering how to control the label position on panels of trellise plot. |> I have 6 panels, I want to all x label positions at the bottom of each |> panel. How should I do that? |> Similar, how should I control y label positions o

Re: [R] R crashes

2009-10-30 Thread Romain Francois
On 10/30/2009 05:17 AM, premmad wrote: Windows XP 32 bit machine. allocated 2gb as memory for R 2.9.2 can you try again whatever you do with 2.10.0 data will be 20mb and was running calculations on the data . but the r crashes with out any warning or so. That is a bit better, but nowhere n

[R] Package zelig

2009-10-30 Thread sayan dasgupta
hello all I am using the R package Zelig for some tobit regression with robust standard errors. I have got R version 2.9.2 (2009-08-24) and Zelig Version: 3.4-5 when i do demo(robust) It ends like this way data(coalition) > # Fit the model with robust standard error > user.prompt() Press to c

[R] Names of list members in a plot using sapply

2009-10-30 Thread Kenneth Roy Cabrera Torres
Hi R users: I got this code to generate a graphic for each member of a lists. list1<-list(A=data.frame(x=c(1,2),y=c(5,6)),B=data.frame(x=c(8,9),y=c(12,6))) names1<-names(list1) sapply(1:length(list1),function(i) with(list1[[i]],plot(x,y,type="l",main=paste("Graphic of",names1[i] Is there a m

Re: [R] similarity measure for binary data

2009-10-30 Thread Rodrigo Villegas
The 'Gower' metric is one that is commonly used. R On Thu, Oct 29, 2009 at 10:22 AM, karuna m wrote: > I am doing hierarchical clustering with cluster package.  I couldnot find > similarity measures like matching coefficient, Jaccard coefficient and sokal > and sneath. Could anyone please tell

Re: [R] similarity measure for binary data

2009-10-30 Thread Rodrigo Villegas
The 'Gower' metric is one that is commonly used. Rod On Thu, Oct 29, 2009 at 10:22 AM, karuna m wrote: > I am doing hierarchical clustering with cluster package.  I couldnot find > similarity measures like matching coefficient, Jaccard coefficient and sokal > and sneath. Could anyone please te

Re: [R] ggplot2: Histogram with negative values on x-axis doesn't work

2009-10-30 Thread baptiste auguie
2009/10/30 hadley wickham : > I read anything that mentions > ggplot2 no matter where it is. > ... one should hope this statement only applies to "the Internet" though, does it? Please do share your regexp if it's not the case. :) baptiste __ R-help@r

Re: [R] how to test for stationarity in time series?

2009-10-30 Thread Liviu Andronic
On 10/30/09, Luna Laurent wrote: > Could anybody tell me how to test for stationarity in time series? > http://www.rseek.org/?cx=010923144343702598753%3Aboaz1reyxd4&q=stationarity+time-series&sa=Search+functions%2C+lists%2C+and+more&cof=FORID%3A11 Liviu _

Re: [R] [R-SIG-Finance] Fast optimizer

2009-10-30 Thread Christophe Dutang
Le 30 oct. 2009 à 02:21, R_help Help a écrit : Ok. I have the following likelihood function. L <- p*dpois(x,a)*dpois(y,b+c)+(1-p)*dpois(x,a+c)*dpois(y,b) where I have 100 points of (x,y) and parameters c(a,b,c,p) to estimate. Constraints are: 0 < p < 1 a,b,c > 0 c < a c < b I construct a lo

[R] Agglomerative Information Bottleneck (AIB)

2009-10-30 Thread rami jiossy
Hi; Does anybody aware of R implementation for AIB (Agglomerative Information Bottleneck) by Slomni and Tishby? in which package should i find it? Thanks _ WLMTAGL:ON:WL:en-US:WWL_WIN_e

Re: [R] Removing & generating data by category

2009-10-30 Thread Adaikalavan Ramasamy
Hmm, so if read correctly you want to remove exactly duplicated rows. So maybe try the following to begin with. duplicated(newdf[ , c("id", "loc", "clm")]) [1] FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE TRUE TRUE TRUE Then you can remove the duplicated rows before proceedi

[R] insert a text in panels, always in the same position (lattice, ltext, ?prepanel?)

2009-10-30 Thread Ottorino-Luca Pantani
Dear R-users, my present problem is related to lattice. I would like to put some text in each panel, namely a p-value. I therefore wrote a simple panel function as reported here below. I'm able to write the value in each panel at the maximum value of y for each panel, but this obviously overla

[R] whitespace with subscript text

2009-10-30 Thread e-letter
Readers, I have the following command: expression(A[1]B~"%") but that causes an error so I changed to: expression(A[1]~B~"%") but the result is too much whitespace between subscript and B. Is there a way to reduce this whitespace? Yours, rhelp at conference.jabber.org r 251 mandriva 2008 __

[R] Applying a function on n nearest neighbours

2009-10-30 Thread Karl Ove Hufthammer
I'm having a problem where I have to apply a function to a subset of a variable, where the subset is defined by the n nearest neighbours of a second variable. Here's an example applied to the 'iris' dataset: $ head(iris) Sepal.Length Sepal.Width Petal.Length Petal.Width Species 1 5.1

Re: [R] similarity measure for binary data

2009-10-30 Thread Javed Pathan
Hi Karuna, You can try vegdist() function in the vegan package. The function computes dissimilarity indices that are useful for or popular with community ecologists. All indices use quantitative data, although they would be named by the corresponding binary index, but you can calculate the bina

Re: [R] Temperature Prediction Model

2009-10-30 Thread bartjoosen
Hi, also interested... If you are checking for non-normal behaviour, first let us define normal behaviour: only small temperature changes and no steep ramps? If so, maybe you can make an rolling average of the last x points, and check if the following point deviates more than ... ? Or is it mo

Re: [R] x-y plot as an histogram

2009-10-30 Thread Federico Abascal
Thanks for all the suggestions. Cut + plotmeans (gplots) solved my problem. > groups <- cut(t[,1],breaks=5) > plotmeans(t[,2]~groups) Thanks! Federico --- El jue, 29/10/09, Jim Lemon escribió: De: Jim Lemon Asunto: Re: [R] x-y plot as an histogram Para: "Federico Abascal" CC: r-help@r-projec

Re: [R] how to test for stationarity in time series?

2009-10-30 Thread Javed Pathan
Hi Luna, "tseries" package provides various stationarity and unit root tests including Augmented Dickey-Fuller, Phillips-Perron, and KPSS. Alternative implementations of the ADF and KPSS tests are in the "urca" package, which also includes further methods such as Elliott-Rothenberg-Stoc

Re: [R] whitespace with subscript text

2009-10-30 Thread Uwe Ligges
e-letter wrote: Readers, I have the following command: expression(A[1]B~"%") but that causes an error so I changed to: expression(A[1]~B~"%") but the result is too much whitespace between subscript and B. Is there a way to reduce this whitespace? Use * rather than ~ Uwe Ligges Yours

Re: [R] Applying a function on n nearest neighbours

2009-10-30 Thread Karl Ove Hufthammer
On Fri, 30 Oct 2009 10:28:49 +0100 Karl Ove Hufthammer wrote: > $ (pos=which(order(abs(iris$Sepal.Length-x)) %in% 2:6)) This should of course be: (pos=order(abs(iris$Sepal.Length-x))[2:6]) -- Karl Ove Hufthammer __ R-help@r-project.org mailing list

[R] data.frame extracting data row-wise

2009-10-30 Thread Christian Lerch
Dear All, I am struggling with extracting data from a data frame: x=data.frame(a=1:11,b=100:110) What I want is a list/vector in this sence: 1 100 2 101 3 102... For single rows, this works fine: as.matrix(x)[1,] For, say 2 rows, this works fine: z=c(as.matrix(x)[1,],as.matrix(x)[2,]) But z=c(

Re: [R] data.frame extracting data row-wise

2009-10-30 Thread Karl Ove Hufthammer
On Fri, 30 Oct 2009 10:42:12 +0100 Christian Lerch wrote: > I am struggling with extracting data from a data frame: > x=data.frame(a=1:11,b=100:110) > > What I want is a list/vector in this sence: 1 100 2 101 3 102... y=t(as.matrix(x)) as.vector(y) Happy to help. -- Karl Ove Hufthammer

Re: [R] insert a text in panels, always in the same position (lattice, ltext, ?prepanel?)

2009-10-30 Thread Deepayan Sarkar
On Fri, Oct 30, 2009 at 2:10 AM, Ottorino-Luca Pantani wrote: > Dear R-users, > my present problem is related to lattice. > > I would like to put some text in each panel, namely a p-value. > I therefore wrote a simple panel function as reported here below. > > I'm able to write the value in each p

Re: [R] data.frame extracting data row-wise

2009-10-30 Thread Christian Lerch
Nice workaround :-). Thank you. Best, Christian Original-Nachricht > Datum: Fri, 30 Oct 2009 10:54:49 +0100 > Von: Karl Ove Hufthammer > An: r-h...@stat.math.ethz.ch > Betreff: Re: [R] data.frame extracting data row-wise > On Fri, 30 Oct 2009 10:42:12 +0100 Christian Lerch > w

[R] Time series temporal disaggregation

2009-10-30 Thread Axel Leroix
  Hi, This is a newbie question. I would to be able to convert annual time series of flow data into quarterly data. I wonder if there is any existing R-function which permits to do it? In what package ?   I the archive, i found that some poeple speak about "tempDis" package for performing time

Re: [R] Names of list members in a plot using sapply

2009-10-30 Thread jim holtman
sapply(names(list1), function(.data.){ with(list1[[.data.]], plot(x, y, type='l', main=paste("Graphic of", .data))) }) On Fri, Oct 30, 2009 at 3:41 AM, Kenneth Roy Cabrera Torres wrote: > Hi R users: > > I got this code to generate a graphic for each member of a lists. > > list1<-list(A=data.

[R] [R-pkgs] ascii package updated

2009-10-30 Thread David Hajage
Hello, ascii package has been updated to version 0.3.2. ascii is a R package for writing asciidoc, txt2tags, sphinx or org documents with embeded R code. See http://eusebe.github.com/ascii/ for some examples. News since version 0.2 are: - new sphinx driver and output (see http://sphinx.pocoo.or

Re: [R] Names of list members in a plot using sapply

2009-10-30 Thread Gabor Grothendieck
You could lapply over the names: junk <- lapply(names(list1), function(nm) with(list1[[nm]], plot(x, y, type = "l", main = paste("Graphic of", nm which is a slight improvement though that still involves dealing with a list and its names separately. On Fri, Oct 30, 2009 at 3:41 AM, Ken

[R] Multicore package: sharing/modifying variable accross processes

2009-10-30 Thread Renaud Gaujoux
Hi, I want to parallelize some computations when it's possible on multicore machines. Each computation produces a big objects that I don't want to store if not necessary: in the end only the object that best fits my data have to be returned. In non-parallel mode, a single gloabl object is upda

Re: [R] Time series temporal disaggregation

2009-10-30 Thread Gabor Grothendieck
See: https://stat.ethz.ch/pipermail/r-sig-finance/2009q3/004677.html On Fri, Oct 30, 2009 at 6:09 AM, Axel Leroix wrote: > > Hi, > This is a newbie question. > I would to be able to convert annual time series of flow data into quarterly > data. I wonder if there is any existing R-function which

[R] Fractal Package - Hurst exponent

2009-10-30 Thread Ricardo Rios
Hi, everybody. My name is Ricardo and I'm doing doctorate at USP (Brazil). I have used a lot the package 'fractal', developed by William Constantine and Donald Percival, in my research. However, I have a doubt about the execution of RoverS function. I was reading an article (http://www.bearcave.c

[R] Back-to-back graph with lattice package

2009-10-30 Thread Erik Svensson
Hi, I am an [R] and lattice beginner. I an doing an epidemiological study and want to present my data in a condensed and clear manner as possible. The example below is fake, but representative for the the data I want to show. I have a data frame with different categorical data and one column of n

[R] possible memory leak in predict.gbm(), package gbm ?

2009-10-30 Thread Markus Loecher
Dear gbm users, When running predict.gbm() on a "large" dataset (150,000 rows, 300 columns, 500 trees), I notice that the memory used by R grows beyond reasonable limits. My 14GB of RAM are often not sufficient. I am interpreting this as a memory leak since there should be no reason to expand memor

Re: [R] different L2 regularization behavior between lrm, glmnet, and penalized? (original question)

2009-10-30 Thread J.J.Goeman
Dear Robert, The differences have to do with diffent scaling defaults. lrm by default standardizes the covariates to unit sd before applying penalization. penalized by default does not do any standardization, but if asked standardizes on unit second central moment. In your example: x = c(-2,

[R] Multidimensional scaling

2009-10-30 Thread Hollix
Hi there, when conducting a multidimensional scaling analysis, it is possible to do this on a correlation matrix? I calculated a dissimilarity matrix by substracting the corr.matrix from 1. Then I calculated the distance matrix with d <- dist(dissimilarity matrix) and ran the isoMDS function. I

[R] opacity under dispersion command under plotrix

2009-10-30 Thread Joe King
Is there anyway to make the lines in the dispersion command come forward in a plot and allow the fill in the dispersion parameter be transparent so all of the lines I am using to note confidence intervals are shown? --- Joe King, M.A. Ph.D. Student Un

[R] Quarterly data in PLM package

2009-10-30 Thread Jose Iparraguirre D'Elia
Dear all, Does anyone know if the PLM package (to run Panel Data Analysis) accepts quarterly data? The package vignette and documentation only use annual data -and the only time index available seems to work for years. José Mr José Luis Iparraguirre Senior Research Economist Ec

[R] Function to manage seconds?

2009-10-30 Thread Stefano Leonardi
Hi, I could not find a function that returns a time in hours and minutes given seconds as argument. I looked also in the chron package. I would need something like this: mytime(61) #61 are seconds [1] "00:01:01" mytime(7385) #7385 are seconds [1] "02:03:05" Am I missing something? or should

[R] R strucchange question: recursive-based CUSUM

2009-10-30 Thread Julia Bondarenko
Hello R users: I'm trying now to apply the package strucchange to see whether there is a structural change in linear regression. I have noted the following problem that arises in my case with recursive-based CUSUM: generic function recresid() in efp() generates an error, since (probably) it c

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

2009-10-30 Thread Huidong TIAN
Dear friends, I will be very happy if anyone tell me the way to change work directory permanently? I mean not use the function setwd() which can only change temporary, when you close the console, it will the old directory. Sys.setenv(R_USER = '') also doesn't work. [[alternative HTML vers

Re: [R] Function to manage seconds?

2009-10-30 Thread Gabor Grothendieck
Try this: > library(chron) > times(100/(24*60*60)) # 100 seconds [1] 00:01:40 On Fri, Oct 30, 2009 at 5:37 AM, Stefano Leonardi wrote: > Hi, > I could not find a function that returns a time in hours and minutes given > seconds as argument. I looked also in the chron package. > > I would need s

[R] .Rprofile replacement function setwd() causing errors

2009-10-30 Thread Michael Friendly
In my .Rprofile I have the following functions which display the current directory in the main R window title bar, and modify base::setwd() to keep this up to date. I like this because I can always tell where I am in the file system. cd <- function(dir) { base::setwd(dir) utils::setWindowTi

[R] Help with creating some loops

2009-10-30 Thread Vadlamani, Satish {FLNA}
Hi All: I have a data frame called all_corn. This has 31 columns. The first column is a character key. The next 15 columns (stat1,stat2,...,stat15) are the statistical forecast. The last 15 columns (sls1,sls2,...,sls5) are actual sales. I want to calculate textbook tracking signal and cuulative

Re: [R] Summing identical IDs

2009-10-30 Thread David Winsemius
On Oct 29, 2009, at 5:23 PM, PDXRugger wrote: Terrific help thank you. dupbuild<-aggregate(DF$Acres, list(Bldgid), sum) This line worked best. Now im going to challenge everyone (i think?) Consider the following: Acres<-c(100,101,100,130,156,.5,293,300,.09,100,12.5) Bldgid<-c(1,2,3,4,5,5,6

Re: [R] multiple pages with ggplot2 facet_wrap?

2009-10-30 Thread hadley wickham
On Wed, Oct 28, 2009 at 8:19 PM, Bill Gillespie wrote: > I currently use lattice functions to produce multiple pages of plots using > the "layout" argument to specify the number of rows and columns of panels, > e.g., > > xyplot(price ~ carat | clarity, diamonds, layout = c(2, 2)) > > This results

Re: [R] fast optimizer

2009-10-30 Thread Prof. John C Nash
> Date: Fri, 30 Oct 2009 09:29:06 +0100 > From: Christophe Dutang > Subject: Re: [R] [R-SIG-Finance] Fast optimizer > To: R_help Help > Cc: r-help@r-project.org >> > Ok. I have the following likelihood function. >> > >> > L <- p*dpois(x,a)*dpois(y,b+c)+(1-p)*dpois(x,a+c)*dpois(y,b) >> > >> > whe

[R] Odp: Help with creating some loops

2009-10-30 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 30.10.2009 14:40:06: > Hi All: > > I have a data frame called all_corn. This has 31 columns. The first column is > a character key. The next 15 columns (stat1,stat2,...,stat15) are the > statistical forecast. The last 15 columns (sls1,sls2,...,sls5)

Re: [R] environment or other technique to isolate some private working information

2009-10-30 Thread Prof. John C Nash
In order to instrument functions for optimization or DE solving etc., I want to set up a private ensemble of working data somewhere in my workspace that won't collide with the problem-data. I can do this already with named objects within .GlobalEnv, but I'd like to have functions like fnmon.setup<

Re: [R] Back-to-back graph with lattice package

2009-10-30 Thread David Winsemius
On Oct 30, 2009, at 9:11 AM, Erik Svensson wrote: Hi, I am an [R] and lattice beginner. I an doing an epidemiological study and want to present my data in a condensed and clear manner as possible. The example below is fake, but representative for the the data I want to show. I have a data

Re: [R] opacity under dispersion command under plotrix

2009-10-30 Thread David Winsemius
On Oct 30, 2009, at 7:02 AM, Joe King wrote: Is there anyway to make the lines in the dispersion command come forward in a plot and allow the fill in the dispersion parameter be transparent so all of the lines I am using to note confidence intervals are shown? Got code?

[R] R_PHP

2009-10-30 Thread Moumita Das
Hi All, Once again , would like to know about your suggestions regarding the integration of PHP and R.I have read ** *"4. R Web Interfaces*" here: http://cran.r-project.org/doc/FAQ/R-FAQ.txt It says about many tools.Here my requirement is :-- I have a tool developed in PHP.I want to integra

Re: [R] Help with creating some loops

2009-10-30 Thread Vadlamani, Satish {FLNA}
Hi: In general, how to I cast a character to the class that I am trying to change. For example, if I have a data frame df1. df1 has a column x. suppose I want to a substring of x (the first 3 chars). Then I want to do something like df1$new = substring(of x) Example Data frame df1 x abcd efgh

Re: [R] Easy method to set user-mode virtual memory space in Windows Vista and 7

2009-10-30 Thread Prof Brian Ripley
On Wed, 28 Oct 2009, Kingsford Jones wrote: I thought I'd share this with the list since it appears to provide a quick fix to some memory problems, and I haven't see it discussed in relation to R. Seems you didn't look in the places mentioned in the posting guide, fo this is an actual FAQ!

Re: [R] Help with creating some loops

2009-10-30 Thread David Winsemius
On Oct 30, 2009, at 11:24 AM, Vadlamani, Satish {FLNA} wrote: Hi: In general, how to I cast a character to the class that I am trying to change. For example, if I have a data frame df1. df1 has a column x. suppose I want to a substring of x (the first 3 chars). Then I want to do somethi

[R] How to properly shade the background panels of an xyplot?

2009-10-30 Thread Ottorino-Luca Pantani
Dear R users, this is a follow up of this message http://tolstoy.newcastle.edu.au/R/e6/help/09/05/13897.html I'm reproducing the core of it for convenience. // / data(Oats, package = "MEMSS") / / tp1.oats <- xyplot(yield ~ nitro | Variety + Block, / / data = Oats, / /

Re: [R] .Rprofile replacement function setwd() causing errors

2009-10-30 Thread Duncan Murdoch
On 10/30/2009 9:30 AM, Michael Friendly wrote: In my .Rprofile I have the following functions which display the current directory in the main R window title bar, and modify base::setwd() to keep this up to date. I like this because I can always tell where I am in the file system. cd <- funct

[R] how to loop thru a matrix or data frame , and append calculations to a new data frame?

2009-10-30 Thread Robert Wilkins
How do you do a double loop through a matrix or data frame , and within each iteration , do a calculation and append it to a new, second data frame? (So, if your original matrix or data frame is 4 x 5 , then 20 calculations are done, and the new data frame, which had 0 rows to start with, now has 2

Re: [R] Bayesian regression stepwise function?

2009-10-30 Thread Kjetil Halvorsen
On Fri, Oct 23, 2009 at 6:05 PM, Ravi Varadhan wrote: > Frank, > > I have heard this (i.e. only head-to-head comparisons are valid) and various > other folklores about AIC and BIC based model selection before, including > one that these information criteria are only applicable for comparing two >

Re: [R] Can I write Nothing to a variable?

2009-10-30 Thread Carl Witthoft
OK, here's the first-cut code, which does execute properly. What I would like to do, simply for 'cleanliness', is to assign "nothing" to the variable "l" , rather than assigning "seq(1,dim(data)[timedim])". Then the result of all the get(unlist(dims)) operations below will be func[j,k,] Wher

Re: [R] : source R-script interactively outside R

2009-10-30 Thread Trevor Davis
At least in the Unix version of the ``Rscript`` front-end to R (but oddly enough not ``R CMD BATCH``) you could put something like this in test.R: cat("Save workspace image? [y/n]: ") answer <- tolower( scan("stdin", "", n=1) ) if (substr(answer, 1, 1) == "y") { q("yes") } else { q("no"

Re: [R] how to loop thru a matrix or data frame , and append calculations to a new data frame?

2009-10-30 Thread David Winsemius
On Oct 30, 2009, at 11:46 AM, Robert Wilkins wrote: How do you do a double loop through a matrix or data frame , and within each iteration , do a calculation and append it to a new, second data frame? (So, if your original matrix or data frame is 4 x 5 , then 20 calculations are done, and the n

Re: [R] R crashes

2009-10-30 Thread cls59
premmad wrote: > > Windows XP 32 bit machine. > allocated 2gb as memory for R 2.9.2 > data will be 20mb and was running calculations on the data . > but the r crashes with out any warning or so. > Ahh, well 20 MB is not huge data for R, so there should be no problem with processing it. The pe

Re: [R] deriv() to take vector of expressions as 1st arg?

2009-10-30 Thread t121
Thanks a lot for the hints. The sapply method may work for me. But how can I extract just the ".grad" expression from the return value of the deriv function? (and secondly store in a matrix of expressions?) Thanks again. __ R-help@r-project.org mailing

[R] MatLab SimBiology

2009-10-30 Thread mauede
Is there any R package that implements the same capability of MatLab toolbox called SimBiology ? We are expecially interested in protein-protein interactions and network analysis. As far as I know SimBiology implements a system of ODEs reflecting the kinetic chemical reactions. We would be more

[R] polar.plot

2009-10-30 Thread Tony Greig
Hi, Two questions: 1 - Say I have average speed and directions for tide and I would like to plot them on a polar plot, but with different colors so I can indicate the two directions. I'm using polar.plot from the plotrix library. How can I add a second "b" and "dir.b" series to a polar.plot? lib

[R] Interpreting gnls() output in comparison to nls()

2009-10-30 Thread Michael A. Gilchrist
Hi, I've been trying to work with the gnls() function in the "nlme" package. My decision to use gnls() was so that I could fit varPower and such to some of the data. However, in working with a small dataset, I've found that the results given by gnls() don't seem to make any sense and they di

Re: [R] Easy method to set user-mode virtual memory space in Windows Vista and 7

2009-10-30 Thread Kingsford Jones
Thank you for the response, Prof Ripley. Some comments below On Fri, Oct 30, 2009 at 9:27 AM, Prof Brian Ripley wrote: > On Wed, 28 Oct 2009, Kingsford Jones wrote: > >> I thought I'd share this with the list since it appears to provide a >> quick fix to some memory problems, and I haven't see i

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

2009-10-30 Thread Greg Snow
Which OS and how do you start R? -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > project.org] On Behalf Of Huidong TIAN > Sent: Friday,

[R] Multidimensional scaling on a correlation matrix

2009-10-30 Thread Hollix
Hi there, when conducting a multidimensional scaling analysis, it is possible to do this on a correlation matrix? I calculated a dissimilarity matrix by substracting the corr.matrix from 1. Then I calculated the distance matrix with d <- dist(dissimilarity matrix) and ran the isoMDS function. I

Re: [R] R strucchange question: recursive-based CUSUM

2009-10-30 Thread Achim Zeileis
Julia: I'm trying now to apply the package strucchange to see whether there is a structural change in linear regression. I have noted the following problem that arises in my case with recursive-based CUSUM: generic function recresid() in efp() generates an error, since (probably) it cannot com

[R] Help with RGDAL

2009-10-30 Thread Pablo Alvarez
Hello, We (two mac users) have been attempting to install rgdal from "http://www.kyngchaos.com/software:frameworks";, given that it is not available as a binary on the CRAN (binaries) of the "Package Installer". I have also tried to solve this problem by looking on the net for an old question

[R] problems with re-loading exported data

2009-10-30 Thread Marion Dumas
Hello, I have a data file originally as .mat file from matlab that I imported in R using the R.matlab package (readMat). This loaded a list containing amongst other things a 4x4 array of rainfall data that is quite heavy (around 40 Mb, it took 10 minutes to load on my computer). I tried to

[R] identify which commands have generated graphics?

2009-10-30 Thread Liviu Andronic
Dear all Is it possible to programmatically detect which commands have generated a graphic to the x11() graphics device? When in front of the computer, it is easy to see that after a command---say, plot(1:10)---a graphics window opens/activates and displays a graphic. But is there a way to detect t

Re: [R] Help with RGDAL

2009-10-30 Thread David Winsemius
On Oct 30, 2009, at 1:51 PM, Pablo Alvarez wrote: Hello, We (two mac users) have been attempting to install rgdal from "http://www.kyngchaos.com/software:frameworks ", given that it is not available as a binary on the CRAN (binaries) of the "Package Installer". I have also tried to solve th

Re: [R] problems with re-loading exported data

2009-10-30 Thread jim holtman
Can you at least show us what you were doing. It sounds like you were trying to 'load' a text file, not something that was saved with 'save'. Here is what I get: > load('trackV3.r') Error: bad restore file magic number (file may be corrupted) -- no data loaded In addition: Warning message: file

Re: [R] Efficient way to code using optim()

2009-10-30 Thread parkbomee
Hi all, I am trying to estimate a simple logit model. By using MLE, I am maximizing the log likelihood, with optim(). The thing is, each observation has different set of choice options, so I need a loop inside the objective function, which I think slows down the optimization process. The data

Re: [R] identify which commands have generated graphics?

2009-10-30 Thread Duncan Murdoch
On 10/30/2009 3:13 PM, Liviu Andronic wrote: Dear all Is it possible to programmatically detect which commands have generated a graphic to the x11() graphics device? When in front of the computer, it is easy to see that after a command---say, plot(1:10)---a graphics window opens/activates and dis

Re: [R] opacity under dispersion command under plotrix

2009-10-30 Thread Joe King
Heres my code: era1 <- seq(1.5,5,.25) plot(era1,yhyp1$pe, xlab="ERA", ylab="Probability of Winning Cy Young",type="l", col="black", lwd=2) dispersion(era1,yhyp1$pe,y1upper,y1lower,type="l", fill="blue",arrow.cap=0.01,intervals=FALSE)#Requres plotrix dispersion(era1,yhyp2$pe,y2upper,y2lower,type="l

[R] What should my.data.frame[c(3, 1)] <- list(NULL, NULL) evaluate to?

2009-10-30 Thread Kevin Wright
(R 2.9.2 on Windows XP) Turns out that my.data.frame[c(1,3)] <- list(NULL, NULL) and my.data.frame[c(3,1)] <- list(NULL, NULL) are not the same. Is this expected? Example: d0 <- structure(list(Year = c(2009L, 2009L, 2009L), Season = c(1L, 1L, 1L), Series = c(1L, 1L, 1L), Mst = struc

Re: [R] opacity under dispersion command under plotrix

2009-10-30 Thread David Winsemius
On Oct 30, 2009, at 3:49 PM, Joe King wrote: Heres my code: era1 <- seq(1.5,5,.25) plot(era1,yhyp1$pe, xlab="ERA", ylab="Probability of Winning Cy Young",type="l", col="black", lwd=2) This plots. library(plotrix) # should go here. dispersion(era1,yhyp1$pe,y1upper,y1lower,type="l", fill="

[R] exact string match?

2009-10-30 Thread bamsel
Dear R users: I need to compare character strings stored in 2 separate data frames. I need an exact match, so finding "a" in "animal" is no good. I've tried regexpr, match, and grepl, but to no avail. Anybody know how to accomplish this? Ben -- View this message in context: http://old.nabble.c

[R] possible to increase precision

2009-10-30 Thread Greg Michaelson
I would like to increase the precision/accuracy of R. That is, I'm dealing with numbers exceedingly close to 1, and I would like to increase the number of significant digits used in computation. In matlab, you can use vpa() to accomplish this. I'm wondering if there's an equivalent or a w

[R] NA values in Standard Error for zeroinfl()

2009-10-30 Thread Chris Fowler
I am fitting a model using zeroinfl() and it runs without errors, returning results that are generally consistent with my hypotheses. One of my variables is percent black (pblack). This variable was highly significant in some of the other count models I ran on the way to my current formulation

[R] possible to increase precision

2009-10-30 Thread Greg Michaelson
I would like to increase the precision/accuracy of R. That is, I'm dealing with numbers exceedingly close to 1, and I would like to increase the number of significant digits used in computation. In matlab, you can use vpa() to accomplish this. I'm wondering if there's an equivalent or a w

Re: [R] Summing identical IDs

2009-10-30 Thread PDXRugger
David, You are correct. I think the frist two assumptions can be thrown out and only the latter two (c,d) can be considered. So how would i combine Acres for matching Bldgids based on assumptions c,d? David Winsemius wrote: > > > On Oct 29, 2009, at 5:23 PM, PDXRugger wrote: > >> >> Terr

Re: [R] Efficient way to code using optim()

2009-10-30 Thread Giovanni Petris
Unless this is a homework problem, you would be much better off using glm(). Giovanni > Date: Fri, 30 Oct 2009 12:23:45 -0700 > From: parkbomee > Sender: r-help-boun...@r-project.org > Importance: Normal > Precedence: list > > > --Boundary_(ID_/D+lL9iK1qLhrkPBeoxH+Q) > Content-type: text/pla

[R] Obtaining illogical results from posterior LDA-classification because of "too good" data?

2009-10-30 Thread Arne Schulz
Dear list, my problem seems to be primarily a statistical one, but maybe there is a misspecification within R (and hopefully a solution). I have two groups with two measured variables as training data. According to the variables, the groups differ totally. I know that this is a very easy situation

Re: [R] possible to increase precision

2009-10-30 Thread Ista Zahn
Hi Greg, Others on this list are much more knowledgeable than I am, and I'm sure they will correct me if I'm wrong. My understanding is that R uses double precision (see http://en.wikipedia.org/wiki/Double_precision_floating-point_format), which has the following implication: > x <- c(1,2,3)/10^

Re: [R] Efficient way to code using optim()

2009-10-30 Thread parkbomee
Thank you. But I'd prefer using a written function which allows me more flexible model specification. Later on, I could have random parameters. So I want to know if there is any more efficient way so that I can speed it up. > Date: Fri, 30 Oct 2009 16:10:29 -0600 > To: bbom...@hotmail.com > CC

Re: [R] possible to increase precision

2009-10-30 Thread Duncan Murdoch
On 30/10/2009 5:04 PM, Greg Michaelson wrote: I would like to increase the precision/accuracy of R. That is, I'm dealing with numbers exceedingly close to 1, and I would like to increase the number of significant digits used in computation. In matlab, you can use vpa() to accomplish this.

Re: [R] possible to increase precision

2009-10-30 Thread Prof Brian Ripley
I think he means something like packages Rmpfr and gmp provide. However, careful numerical analysis (and working with x-1 or log(x) for numbers very near one) means that such packages are rarely necessary (although they can be very convenient). It all depends on the calculations: vague questi

Re: [R] Help with RGDAL

2009-10-30 Thread cls59
Pablo Alvarez-2 wrote: > > > Hello, > We (two mac users) have been attempting to install rgdal from > "http://www.kyngchaos.com/software:frameworks";, given that it is not > available as a binary on the CRAN (binaries) of the "Package Installer". > > The GDAL library contains an impressive

[R] Multiple linear regression with constraint (imposition)

2009-10-30 Thread CE.KA
Hi R users I want to do a multiple linear regression with R With a normal model (Y=Cste+A1*X1+A2*X2) the program would be lm(Y ~X2+X2) My model is Y=Cste+A1*X1+A2*X2 with the constraint A1=-A2 What is the program for such a model? Best regards -- View this message in context: http://old.na

Re: [R] Help with RGDAL (SOLVED)

2009-10-30 Thread David Winsemius
I had earlier downloaded what I thought to be the most recent version of rgdal (rgdal_0.6-18.tgz). After checking to see that all of the other dependencies in the configure files were met, I finally got around to checking the version of the rgdal and found my problem. It was different (and

Re: [R] Multiple linear regression with constraint (imposition)

2009-10-30 Thread CE.KA
Sorry there was a mistake: Hi R users I want to do a multiple linear regression with R With a normal model (Y=Cste+A1*X1+A2*X2) the program would be lm(Y~X1+X2) My model is Y=Cste+A1*X1+A2*X2 with the constraint A1=-A2 What is the program for such a model? Best regards -- View this message

Re: [R] exact string match?

2009-10-30 Thread Linlin Yan
How about using operator == On Sat, Oct 31, 2009 at 5:00 AM, bamsel wrote: > > Dear R users: > I need to compare character strings stored in 2 separate data frames. I need > an exact match, so finding "a" in "animal" is no good. > I've tried regexpr, match, and grepl, but to no avail. > Anybody k

Re: [R] Multiple linear regression with constraint (imposition)

2009-10-30 Thread David Winsemius
On Oct 30, 2009, at 7:47 PM, CE.KA wrote: Sorry there was a mistake: I could not see what was different? Hi R users I want to do a multiple linear regression with R With a normal model (Y=Cste+A1*X1+A2*X2) the program would be lm(Y~X1+X2) My model is Y=Cste+A1*X1+A2*X2 with the constra

Re: [R] possible memory leak in predict.gbm(), package gbm ?

2009-10-30 Thread Ridgeway, Greg
All of the memory allocations for predictions use R's allocVector(). See gbm_pred in gbmentry.cpp. That is, R's memory manager is doing all the work. gbm_pred is not allocating memory separate from R. It's just creating R objects within R that can be deleted or garbage collected. Make sure your

[R] Johnson-Neyman procedure (ANCOVA)

2009-10-30 Thread Stropharia
Dear R users, Does anyone know of a package that implements the Johnson-Neyman procedure - for testing differences among groups when the regression slopes are heterogeneous (in an ANCOVA model)? I did not get any matches for functions when searching using R Site Search. If it has not been implem

  1   2   >