Re: [R] Fitting linear models

2009-04-21 Thread Dimitri Liakhovitski
But if the multicollinearity is so strong, then I am wondering why it worked in the data frame as opposed to 4 seprate vectors? It should not make any difference... Dimitri On Tue, Apr 21, 2009 at 12:21 PM, Vemuri, Aparna avem...@epri.com wrote: Thanks Dimitri! Following exactly what you did, I

Re: [R] DNAcopy package in R

2009-04-21 Thread David Winsemius
Probably better asked on the BioC list. On Apr 21, 2009, at 11:40 AM, Selena Niu wrote: Has anyone analyzed Illumina 550K data using DNAcopy package? I have around 2300 samples. According to Venkatraman and Olshen 2007 paper, it needs about 25 min to run a single sample for Affymetrix

Re: [R] Fitting linear models

2009-04-21 Thread Vemuri, Aparna
These are all field measured values. For a little background here, I have field measurements of SO4, NO3 and NH4. I used these variables in an atmospheric chemistry model to calculate PBW on a line-by-line basis. To bypass the use of the complex atmospheric chemistry model in the future, I

Re: [R] Fitting linear models

2009-04-21 Thread David Winsemius
On Apr 21, 2009, at 12:37 PM, Vemuri, Aparna wrote: These are all field measured values. For a little background here, I have field measurements of SO4, NO3 and NH4. I used these variables in an atmospheric chemistry model to calculate PBW on a line-by-line basis. To bypass the use of

Re: [R] bug when subtracting decimals?

2009-04-21 Thread Sarah Goslee
I'd be happy if everyone made a minimal effort to solve their problems before posting. There may be 130 pages of printed FAQs, but the html file is fully searchable. It would be easier to browse with a good ToC, but it's not that overwhelming to _look to see if there's a FAQ related to your

Re: [R] joined R-today [SELinux]

2009-04-21 Thread William Dunlap
Redhat's Security Enhanced Linux (in some modes) generates messages like that when code in a shared library is not compiled to have position independent code. I.e., the -fpic or -fPIC flag was not supplied when compiling. Your build log showed that -fpic was used when compiling your code, but the

[R] how to inspect content of save file

2009-04-21 Thread Benno Pütz
Is there a way of listing the variables contained in a file created with the save() command other than load()ing the file? I have a couple of rather larger files that I would rather not load ... Benno Pütz MPI of Psychiatry Tel: +49+(0)89-30622 222 Kraepelinstr. 2

Re: [R] how to inspect content of save file

2009-04-21 Thread Dimitri Liakhovitski
Can't you just read in the very first line of the file (that contains names)? Dimitri 2009/4/21 Benno Pütz pu...@mpipsykl.mpg.de: Is there a way of listing the variables contained in a file created with the save() command other than load()ing the file? I have a couple of rather larger files

Re: [R] My surprising experience in trying out REvolution's R

2009-04-21 Thread Bert Gunter
Jason: Thanks for posting this ... interesting. A guess: Depends on the problem, the hardware, the matrix libraries,... e.g. in relatively small problems, Revolution's overhead may consume more time and resources than the problem warrants. In others, you may see many fold improvements. Very

[R] Changing the binning of collected data

2009-04-21 Thread Lorenzo Isella
Dear All, Apologies if this is too simple for this list. Let us assume that you have an instrument measuring particle distributions. The output is a set of counts {n_i} corresponding to a set of average sizes {d_i}. The set of {d_i} ranges from d_i_min to d_i_max either linearly of

Re: [R] automatic exploration of all possible loglinear models?

2009-04-21 Thread Christopher W. Ryan
Thank you all. Warnings well-taken. My question arose in the context of my Applied Categorical Data Analysis course. We're mainly using SAS. Recent homework questions have been of the form, The file provides data on 4 variables A, B, C, and D. Find a good-fitting model . . . [more questions about

Re: [R] My surprising experience in trying out REvolution's R

2009-04-21 Thread David M Smith
That's our guess too. We're running some tests now on the code to see what's going on, and it's entirely possible the performance gains are a function of the problem size, so we're testing that too. Changes in R between 2.7.2 (upon which REvolution R is currently based) and 2.9.0 are also a

Re: [R] Changing the binning of collected data

2009-04-21 Thread Luc Villandre
Hi Lorenzo, I think it would be better if you provided a few example datasets/tables. Right now, I can't exactly circumscribe your problem. When binning data, the cut() function tends to be very useful. To fit common univariate distributions to a given dataset, you should take a look at the

Re: [R] Polyspline Integration

2009-04-21 Thread Denney, William S.
Hello, I wrote the function below to integrate polysplines and thought that it may be useful to others. Please consider this code released under the GPL2 or later. Thanks, Bill integrate.polySpline.txt Notice: This e-mail message, together with any attachments, contains

[R] Signed-Binary transform test (Fisher.test??)

2009-04-21 Thread Jorge Cornejo
Hi, I was looking for the fisher test to use on my data (no normal, non symetrical and because is median what i'm looking for I don't what to made bootstraping) to test the median Ho=1, but I'm not sure if Fisher.test in R is what I need or I just don't know how to use it. Here is the example

Re: [R] automatic exploration of all possible loglinear models?

2009-04-21 Thread Dimitris Rizopoulos
Have also a look at package bootStepAIC. Best, Dimitris Christopher W. Ryan wrote: Thank you all. Warnings well-taken. My question arose in the context of my Applied Categorical Data Analysis course. We're mainly using SAS. Recent homework questions have been of the form, The file provides

[R] multiple plots in same graph window

2009-04-21 Thread BARRES-DE-ALMEIDA U.
Hi, I'm trying to make multiple plots in a same graph window in R. The multiple graphs are showing up in the right positions on the window, but I'm having the problem that the graphic window is being refreshed every time a new plot is drawn, so that I end up with only the last graph coming

Re: [R] multiple plots in same graph window

2009-04-21 Thread David Winsemius
On Apr 21, 2009, at 12:58 PM, BARRES-DE-ALMEIDA U. wrote: Hi, I'm trying to make multiple plots in a same graph window in R. The multiple graphs are showing up in the right positions on the window, but I'm having the problem that the graphic window is being refreshed every time a new

[R] Quality control and possible QC in R book?

2009-04-21 Thread Erin Hodgess
Dear R People: Is there a Quality Control in R book that would be accessible for undergraduates, please? I'm teaching a QC course in the fall semester and would be happy to have a Use R book or something like that, please. Thanks in advance, Erin -- Erin Hodgess Associate Professor

Re: [R] create objects in a loop and adding sqlQuery content to them

2009-04-21 Thread Katharina May
I finally found the problem within my site_data object... this works well: snip site_data - sqlQuery(channel, select site_no from [biomass_data$] group by site_no)$site_no for(i in site_data) { assign(paste(site,i,_data,sep=), sqlQuery(channel, paste(select * from [biomass_data$] where

[R] plot with 2 y axes

2009-04-21 Thread Christophe Dutang
Hi all, I would like to know how to do a plot with 2 y axes in R. With google, I found this topic has been discussed twice in the past: - http://tolstoy.newcastle.edu.au/R/e2/help/06/11/6049.html - https://stat.ethz.ch/pipermail/r-help/2000-September/008182.html Those links provide quite a

Re: [R] multiple plots in same graph window

2009-04-21 Thread William Dunlap
If you call par(new=TRUE) after each call to par(fig=c(xmin,xmax,ymin,ymax)) then a subsequent call to plot() will not erase the page. In S+ the par(new=TRUE) is not needed, but it does no harm. Bill Dunlap TIBCO Software Inc - Spotfire Division wdunlap tibco.com

[R] Deleting rows or cols that do not meet cut off

2009-04-21 Thread Crosby, Jacy R
How can I delete both rows and columns that do not meet a particular cut off value. Example: d - rbind(c(0,1,6,4), + c(2,5, 7,5), + c(3,6,1,6), + c(4,4,4,4)) f - as.matrix(d) f [,1] [,2] [,3] [,4] [1,]0164 [2,]257

Re: [R] Cross-Correlation function (CCF) issues

2009-04-21 Thread David Winsemius
When I remake those variables and try ccf(do1,dr1), the plot appears reasonable. What problem were you experiencing? It looks as though your method of differencing (whatever it was) offset the date registration of the zoo series in dr2, but ccf(do1, dr2) still does not appear to choke on

Re: [R] Deleting rows or cols that do not meet cut off

2009-04-21 Thread Stephan Kolassa
f[rowSums(f=1)0,colSums(f=1)0] Judging from your result, you want less than or equal to 1. HTH, Stephan Crosby, Jacy R schrieb: How can I delete both rows and columns that do not meet a particular cut off value. Example: d - rbind(c(0,1,6,4), + c(2,5, 7,5), + c(3,

Re: [R] Deleting rows or cols that do not meet cut off

2009-04-21 Thread Rolf Turner
On 22/04/2009, at 8:34 AM, Crosby, Jacy R wrote: How can I delete both rows and columns that do not meet a particular cut off value. Example: d - rbind(c(0,1,6,4), + c(2,5, 7,5), + c(3,6,1,6), + c(4,4,4,4)) f - as.matrix(d) f [,1] [,2]

Re: [R] plot with 2 y axes

2009-04-21 Thread Ben Bolker
Christophe Dutang1 wrote: I would like to know how to do a plot with 2 y axes in R. With google, I found this topic has been discussed twice in the past: - http://tolstoy.newcastle.edu.au/R/e2/help/06/11/6049.html - https://stat.ethz.ch/pipermail/r-help/2000-September/008182.html Those

Re: [R] Cross-Correlation function (CCF) issues

2009-04-21 Thread manta
This is what I get. ccf(do1,dr1) Errore in na.fail.default(ts.intersect(as.ts(x), as.ts(y))) : valore mancante nell'oggetto #italian translation of 'missing values in object' ccf(do1,dr2) Errore in na.fail.default(ts.intersect(as.ts(x), as.ts(y))) : valore mancante nell'oggetto #italian

Re: [R] Question on binomial data

2009-04-21 Thread ehud cohen
I thought of testing the difference in deviance between the null model and the fitted model, assuming it is distributed as chi-sq. However, Faraway writes that if the outcome is binary, the deviance distribution is far from chisq. I've done a permutation test: N-5000; # Towards the upper limit,

Re: [R] Cross-Correlation function (CCF) issues

2009-04-21 Thread David Winsemius
If you were doing that with the full sized do1 and dr1, then my guess would be different data as the root cause. If you were doing this on the tiny sample objects that I created from your dput output, then I don't have an answer, since there were no missing values in those objects. --

Re: [R] Deleting rows or cols that do not meet cut off

2009-04-21 Thread Wacek Kusnierczyk
Rolf Turner wrote: On 22/04/2009, at 8:34 AM, Crosby, Jacy R wrote: How can I delete both rows and columns that do not meet a particular cut off value. Example: d - rbind(c(0,1,6,4), + c(2,5, 7,5), + c(3,6,1,6), + c(4,4,4,4)) f -

Re: [R] Cross-Correlation function (CCF) issues

2009-04-21 Thread manta
The problem is that I was doing that for the tiny sample objects. So I really have no clue about David Winsemius wrote: If you were doing that with the full sized do1 and dr1, then my guess would be different data as the root cause. If you were doing this on the tiny sample objects

Re: [R] Deleting rows or cols that do not meet cut off

2009-04-21 Thread Wacek Kusnierczyk
Wacek Kusnierczyk wrote: Rolf Turner wrote: d[apply(d,1,function(x){any(x=1)}),apply(d,2,function(x){any(x=1)})] ... or gain a bit on performance by doing the threshold comparison on the whole matrix just once at once: dd = d = 1 d[apply(d, 1, any), apply(d, 2, any)]

Re: [R] Deleting rows or cols that do not meet cut off

2009-04-21 Thread Stephan Kolassa
Hi Wacek, Wacek Kusnierczyk schrieb: ... or gain a bit on performance by doing the threshold comparison on the whole matrix just once at once: dd = d = 1 d[apply(d, 1, any), apply(d, 2, any)] d[apply(dd, 1, any), apply(dd, 2, any)] Or not? Cheers, Stephan

Re: [R] Cross-Correlation function (CCF) issues

2009-04-21 Thread David Winsemius
When I get such unexpected behavior, I generally reinstall software. I am currently using the Urbanek prepared MacOSX 2.8.1 binary under Leopard with the 64 bit GUI. The stats package is part of the core distribution, so reinstalling the stats package would mean reinstalling R. Other

[R] sas.get() exit

2009-04-21 Thread Nirav Mehta
Hello, I am trying to import SAS files into R using sas.get() in Hmisc. I am running both SAS and R on a UNIX server. I've pasted my command and ensuing errors below: sas.get(lib=EOG, mem=eog3pub00_1) Error in if (status != 0) { : argument is of length zero In addition: Warning message: In

Re: [R] Cross-Correlation function (CCF) issues

2009-04-21 Thread manta
Here you are dput(do1[1:10]) structure(c(0.0818, 0.008, 0.172, -0.0311, 0, 0.629, -0.317, -0.433, -0.469, -0.359), index = structure(c(9497, 9498, 9499, 9500, 9503, 9504, 9505, 9506,

Re: [R] Question on binomial data

2009-04-21 Thread David Winsemius
Surely Faraway does not suggest using the Wald statistic in preference to the deviance? Even if the distribution of deviance is not exactly chi-square, it appears generally accepted that a comparison of the difference in deviance to the chi-square statistic is better than using the ratio

Re: [R] sas.get() exit

2009-04-21 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Nirav Mehta Sent: Tuesday, April 21, 2009 3:46 PM To: r-help@r-project.org Subject: [R] sas.get() exit Hello, I am trying to import SAS files into R using sas.get() in

Re: [R] sas.get() exit

2009-04-21 Thread Nirav Mehta
Hi, I'm actually running Linux - is Hmisc broken for that as well? I saw the previous discussion, but had assumed it was only for Windows machines. On Tue, Apr 21, 2009 at 7:04 PM, Nordlund, Dan (DSHS/RDA) nord...@dshs.wa.gov wrote: -Original Message- From: r-help-boun...@r-project.org

Re: [R] sas.get() exit

2009-04-21 Thread Nordlund, Dan (DSHS/RDA)
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Nirav Mehta Sent: Tuesday, April 21, 2009 4:11 PM Cc: r-help@r-project.org Subject: Re: [R] sas.get() exit Hi, I'm actually running Linux - is Hmisc broken for that as well? I

Re: [R] sas.get() exit

2009-04-21 Thread Nirav Mehta
Someone pointed out that Hmisc, version 3.4-4 works just great with R-2.8.1 on Linux. I downgraded the package version from 5 and it now works wonderfully. Thanks for looking, and your help! On Tue, Apr 21, 2009 at 7:04 PM, Nordlund, Dan (DSHS/RDA) nord...@dshs.wa.gov wrote: -Original

[R] anova table with lmer

2009-04-21 Thread Julien Beguin
Hi everyone, I am wandering if someone was able to get an anova table using the function lmer in lme4 package with an other distribution than gaussian (ex: poisson). In fact, I am using a GLMM with a poisson distribution where I have 2 independant fixed variables (coded as factors with

[R] How to extract integer in a data frame

2009-04-21 Thread Gundala Viswanath
Dear all, I have a data frame that looks like this: dat V1 V2 V3 1 0.000 2 554889 2 2.001 09978 3 0.342 35263 4 123.000 03209 5 0.004 02434 I want to get a subset of that data

[R] error when using vcovHC()

2009-04-21 Thread oliviax
Dear R users, I meet with an unsolved error when using the function vcovHC() in package sandwich(). I have a balanced panel dataset, and I run the following codes: library(plm) data-plm.data(data, c(state,year)) fn-plm(y~x1+x2, data=data, method=within, effect=individual) library(lmtest)

Re: [R] How to extract integer in a data frame

2009-04-21 Thread Marc Schwartz
On Apr 21, 2009, at 7:52 PM, Gundala Viswanath wrote: Dear all, I have a data frame that looks like this: dat V1 V2 V3 1 0.000 2 554889 2 2.001 09978 3 0.342 35263 4 123.000 03209 5 0.004

Re: [R] How to extract integer in a data frame

2009-04-21 Thread Duncan Murdoch
On 21/04/2009 8:52 PM, Gundala Viswanath wrote: Dear all, I have a data frame that looks like this: dat V1 V2 V3 1 0.000 2 554889 2 2.001 09978 3 0.342 35263 4 123.000 03209 5 0.004

Re: [R] How to compare parameters of non linear fitting curves

2009-04-21 Thread spencerg
Is your first model a special case of the second with eta1 = 0? If yes, what about using 2*log(likelihood ratio) being approximately chi-square? Can you recast the problem to use nls? If yes, might the 'nls' methods for 'anova' or 'profile' give you what you want? Hope

[R] using Rmath in c-functions of R packages

2009-04-21 Thread Volodymyr Melnykov
Dear all, We have created an R package and submitted it to C-RAN. The package includes several C functions that use Rmath library. The package cannot be installed on a computer where -lRmath is not found. We were suggested to do a configure test for this but I am not really sure how to do this

Re: [R] using Rmath in c-functions of R packages

2009-04-21 Thread Duncan Murdoch
On 21/04/2009 9:39 PM, Volodymyr Melnykov wrote: Dear all, We have created an R package and submitted it to C-RAN. The package includes several C functions that use Rmath library. The package cannot be installed on a computer where -lRmath is not found. We were suggested to do a configure test

Re: [R] Quality control and possible QC in R book?

2009-04-21 Thread C.H.
You may refer to the R News article on qcc package by Scrucca. http://cran.r-project.org/doc/Rnews/Rnews_2004-1.pdf On Wed, Apr 22, 2009 at 4:00 AM, Erin Hodgess erinm.hodg...@gmail.com wrote: Dear R People: Is there a Quality Control in R book that would be accessible for undergraduates,

Re: [R] plotting with R

2009-04-21 Thread Erik Iverson
In addition to the refs already provided, I have read both R Graphics by Paul Murrell and Lattice by Deepayan Sarkar, and can highly recommend both of them. Bala subramanian wrote: Friends, i) I am new to R. Kindly suggest some resources that has examples of plotting with R. ii) How to set

[R] memory.limit

2009-04-21 Thread Derek Stephen Elmerick
I ran the memory limit function in R 2.9.0 and received the 'error' below. The memory appears to update correctly, so there's probably no implication beyond cosmetic; however, thought I would make sure since the function as written did not generate the same error in my 2.8.0 version of R. Thanks

[R] Finding and moving files

2009-04-21 Thread Daniel Bradley
Hi! I'm at the very beggining of my R experience and I'm hoping someone can point me in the right direction. I want to create a script that locates all files within a directory tree that have certain keywords in their file names, checks these against files in another location, then copies files

Re: [R] using Rmath in c-functions of R packages

2009-04-21 Thread Volodymyr Melnykov
On Tue, 21 Apr 2009 21:49:36 -0400 Duncan Murdoch murd...@stats.uwo.ca wrote: On 21/04/2009 9:39 PM, Volodymyr Melnykov wrote: Dear all, We have created an R package and submitted it to C-RAN. The package includes several C functions that use Rmath library. The package cannot be

Re: [R] Finding and moving files

2009-04-21 Thread Bill.Venables
R is certainly not the natural tool you would use for this, but with effort it could be done, I think. dir(..., recursive = TRUE) will list files descending down a directory tree. You may then need to use things like basename() to strip off the directory names, grep() to search for the

[R] Color coded 3D plot

2009-04-21 Thread mauede
I wonder whether it is possible in R to generate color-coded 3D plots, like the attached example. Basically a function f(x,y) (the 3rd dimension) is rendered through colors intensities. The side color-bar is a guide to the interpretation of the plot. Thank you very much, Maura e tutti i

Re: [R] Question on binomial data

2009-04-21 Thread ehud cohen
David, Faraway suggests using the Hosmer Lemeshow test in the case of a binary response, and discusses the inadequacy of Wald statistics. However, I'm not sure it applies here due to the limited number of cases. Thanks, Ehud. On Wed, Apr 22, 2009 at 2:04 AM, David Winsemius

[R] Subsetting a vector of numerics such that standard deviation is less than 0.5 ?

2009-04-21 Thread Daren Tan
set.seed(999) abs(rnorm(20)) [1] 0.28174016 1.31255963 0.79518398 0.27007049 0.27730642 0.56602374 1.87865826 1.26679114 0.96774968 1.12100936 1.32546371 0.13397739 0.93874945 [14] 0.17253810 0.95765045 1.36268625 0.06833513 0.10065765 0.90134475 2.07435711 v - abs(rnorm(20)) v [1] 1.2285633

Re: [R] Color coded 3D plot

2009-04-21 Thread Kingsford Jones
The attachment didn't come through, but try: example(filled.countour) #or library(lattice) example(levelplot) hth, Kingsford Jones On Tue, Apr 21, 2009 at 9:46 PM, mau...@alice.it wrote: I wonder whether it is possible  in R to generate color-coded 3D plots, like the attached example.

Re: [R] search through a matrix

2009-04-21 Thread onyourmark
I changed the condition to: highlyCor-cbind(rownames(x)[row(x)[((x 0.9)|(x(-.9)))]], colnames(x)[col(x)[((x 0.9)|(x(-.9)))]]) Actually what I am trying to do is run factor analysis on this 923 by 925 x matrix but many of the variables where too highly correlated and so I got some message

<    1   2