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

2009-04-21 Thread Dieter Menne
Jason Liao hes.hmc.psu.edu> writes: > I care a lot about R's speed. So I decided to give REvolution's R > (http://revolution-computing.com/) a try, which bills itself as an > optimized R. Note that I used the free version. > > My machine is a Intel core 2 duo under Windows XP professional. The c

Re: [R] Finding and moving files

2009-04-21 Thread Stephen J. Barr
If you are on unix/linux/mac/cygwin, you could do that in a shell script and call it with R. Although it is certainly do-able. Sent via BlackBerry from T-Mobile -Original Message- From: Date: Wed, 22 Apr 2009 12:51:37 To: ; Subject: Re: [R] Finding and moving files R is certainly no

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

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, wrote: > I wonder whether it is possible  in R to generate color-coded 3D plots, like > the attached example. > Basically a fu

[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.228

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 wrote: > Surely Fara

[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 tele

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 keywor

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 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 installed on a

[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 t

[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

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 se

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 wrote: > Dear R People: > > Is there a Quality Control in R book that would be accessible for > undergraduates, please? > > I'm teac

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 f

[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 an

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

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 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

[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") > lib

[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 fr

[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 respectivel

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) wrote: >> -Original Message- >> From: r

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 w

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) wrote: >> -Original Message- >> From: r-help-boun...@r-project.org [mailto:r-help-b

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()

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 of

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, 9507

[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 sa

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 optio

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] 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

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 obje

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)

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. -- D

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, a

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] 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 >

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] 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

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 t

[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,]25

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] 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 go

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: 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$]

[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 Department

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 plot

[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 up;

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] 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 da

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 > <> Notice: This e-mail message, together with any attachments, contains information of Merck &

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] 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 confou

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 abo

[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 logarithmically.

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 dang

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 : > 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

[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 Fax:

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

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 problem

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 the

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 wa

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 100K.

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 wrote: > Thanks Dimitri! Following exactly what you did, I wrote all my ind

Re: [R] Fitting linear models

2009-04-21 Thread Vemuri, Aparna
Thanks Dimitri! Following exactly what you did, I wrote all my individual variable vectors to a data frame and used lm(formula,data) and this time it works for me too. Marc, your theory is correct.NH4 variable shares a strong correlation with one of the IV along with the DV. SO4 N

Re: [R] bug when subtracting decimals?

2009-04-21 Thread hadley wickham
> "Have you read the posting guide and the FAQs? If you do not get a reply > within two days, you may want to look at both and think about reformulating > your query. Oh, and while you are at it, look through the archives, a lot of > questions have already been asked and answered before." As I say

[R] fitting assimptotic decaing with - and + on X

2009-04-21 Thread milton ruser
Dear all, I need to adjust a decaing function between "preference" as function of "distance" (dst). As you can see below, the X values range from highly negative to higly positive. The preferences range from 1 to ~0. I tryed to use drc() packages, but I I am not wrong, the packages is developed m

[R] DNAcopy package in R

2009-04-21 Thread Selena Niu
Hi All: 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 100K. I am afraid it will take too long to analyzed my data. Anybody has an idea? Thanks!

Re: [R] Fitting linear models

2009-04-21 Thread Dimitri Liakhovitski
Can we see your data to be able to replicate the error? Or maybe a subset of data with some fake variable names? On Tue, Apr 21, 2009 at 11:32 AM, Vemuri, Aparna wrote: > Yes, they are all of the same length. > > -Original Message- > From: Dimitri Liakhovitski [mailto:ld7...@gmail.com] >

Re: [R] Fitting linear models

2009-04-21 Thread Marc Schwartz
On Apr 21, 2009, at 10:37 AM, David Winsemius wrote: On Apr 21, 2009, at 11:12 AM, Vemuri, Aparna wrote: David, Thanks for the suggestions. No, I did not label my dependent variable "function". That was from my error in reading your call to lm. In my defense I am reasonably sure the pro

[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 <> Notice: This e-mail message, together with any attachments, contains information of Merck & Co., Inc. (One Merc

Re: [R] Fitting linear models

2009-04-21 Thread Dimitri Liakhovitski
I am not sure what the problem is. I found no errors: data<-read.csv(file.choose()) # I had to change your file extension to .csv first dim(data) names(data) lapply(data,function(x){sum(is.na(x))}) lm.model.1<-lm(PBW~SO4+NO3+NH4,data) lm.model.2<-lm(PBW~SO4+NH4+NO3,data) print(lm.model.1) # Get

[R] Blanchard Quah/Impulse Response Functions

2009-04-21 Thread Laura Carvalho
Dear all, How can I compute an impulse response function for a BQ (or any SVAR) in which the endogenous variable for output is given in log-difference, and I want the response in terms of the level of output, as done in Blanchard and Quah(1989)? Does the function irf require that the response is

Re: [R] Fitting linear models

2009-04-21 Thread Vemuri, Aparna
Attached are the first hundred rows of my data in comma separated format. Forcing the regression line through the origin, still does not give a coefficient on the last independent variable. Also, I don't mind if there is a coefficient on the dependent axis. I just want all of the variables

Re: [R] ggplot2 - boxplot of variables / columns

2009-04-21 Thread Andreas Christoffersen
David, you solution > qplot(ind, values, data=stack(data.frame(a,b,c)), geom="boxplot") Works a treat - thank you! Thierry, your solution > ds <- data.frame(a = a, b = b, c = c) > library(ggplot2) # loads qqplot2 > ggplot(melt(ds), aes(x = variable, y = value)) + geom_boxplot() Also works. I can

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

2009-04-21 Thread Jason Liao
I care a lot about R's speed. So I decided to give REvolution's R (http://revolution-computing.com/) a try, which bills itself as an optimized R. Note that I used the free version. My machine is a Intel core 2 duo under Windows XP professional. The code I run is in the end of this post. First,

Re: [R] Fitting linear models

2009-04-21 Thread David Winsemius
On Apr 21, 2009, at 11:12 AM, Vemuri, Aparna wrote: David, Thanks for the suggestions. No, I did not label my dependent variable "function". That was from my error in reading your call to lm. In my defense I am reasonably sure the proper assignment to arguments is lm(formula= ...) rathe

Re: [R] Fitting linear models

2009-04-21 Thread Vemuri, Aparna
Yes, they are all of the same length. -Original Message- From: Dimitri Liakhovitski [mailto:ld7...@gmail.com] Sent: Tuesday, April 21, 2009 8:32 AM To: Vemuri, Aparna Cc: r-help@r-project.org Subject: Re: [R] Fitting linear models Are they of the same length? On Tue, Apr 21, 2009 at 11:

Re: [R] Fitting linear models

2009-04-21 Thread Dimitri Liakhovitski
Are they of the same length? On Tue, Apr 21, 2009 at 11:31 AM, Vemuri, Aparna wrote: > The variables are all in separate vectors. > > -Original Message- > From: Dimitri Liakhovitski [mailto:ld7...@gmail.com] > Sent: Tuesday, April 21, 2009 8:26 AM > To: Vemuri, Aparna > Cc: David Winsemiu

Re: [R] Fitting linear models

2009-04-21 Thread Vemuri, Aparna
The variables are all in separate vectors. -Original Message- From: Dimitri Liakhovitski [mailto:ld7...@gmail.com] Sent: Tuesday, April 21, 2009 8:26 AM To: Vemuri, Aparna Cc: David Winsemius; r-help@r-project.org Subject: Re: [R] Fitting linear models Aparna, I should have been more e

Re: [R] plotting with R

2009-04-21 Thread Stephen J. Barr
Lookup the R graph gallery. Also, any R tutorial should have some rudimentary plots. Type ?plot Into the prompt to get help with the command. -stephen Sent via BlackBerry from T-Mobile -Original Message- From: Bala subramanian Date: Tue, 21 Apr 2009 17:07:24 To: Subject: [R] plottin

Re: [R] Fitting linear models

2009-04-21 Thread Dimitri Liakhovitski
Aparna, I should have been more explicit. Run ?lm . You'll see this: "lm(formula, data, subset, weights, na.action, method = "qr", model = TRUE, x = FALSE, y = FALSE, qr = TRUE, singular.ok = TRUE, contrasts = NULL, offset, ...)" So, in addition to specifying the formula, you have to speci

Re: [R] plotting with R

2009-04-21 Thread David Winsemius
On Apr 21, 2009, at 11:07 AM, Bala subramanian wrote: Friends, i) I am new to R. Kindly suggest some resources that has examples of plotting with R. http://addictedtor.free.fr/graphiques/ http://lmdvr.r-forge.r-project.org/figures/figures.html ii) How to set number of tick marks and labe

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

2009-04-21 Thread David Winsemius
We still have an inadequate characterization of the data to answe the question ( as I remember it from yesterday). Missing, for example, is any information about lengths which would seem essential since (as I remember) you wantted to know why the result was so short. Why not put in a full w

Re: [R] ggplot2 - boxplot of variables / columns

2009-04-21 Thread ONKELINX, Thierry
Dear Andreas, melt() and cast() are nice tools for this kind of problems. They both reside in the reshape package that automatic loaded when ggplot2 is. a <- rnorm(100) b <- rnorm(100,1,2) c <- rnorm(100,2,0.5) ds <- data.frame(a = a, b = b, c = c) library(ggplot2) # loads qqplot2 ggplot(melt(ds)

Re: [R] ggplot2 - boxplot of variables / columns

2009-04-21 Thread David Winsemius
On Apr 21, 2009, at 10:42 AM, Andreas Christoffersen wrote: Hi, ggplot/qplot is great - it has really helped me do some nice things. However, simple boxplot of different columns/variables is a bit tricky, because of (i think) qplot's generic Y conditional on X input form. Se below. # Some dat

Re: [R] joined R-today

2009-04-21 Thread Marc Schwartz
warranties...) The OP did indicate that F10 was the platform: https://stat.ethz.ch/pipermail/r-help/attachments/20090421/65ee5d6e/attachment.pl so I would agree here that SELinux is almost certainly the culprit as it does control relocation. If you have the SE Troubleshoot daemon running, you sh

Re: [R] Fitting linear models

2009-04-21 Thread Vemuri, Aparna
David, Thanks for the suggestions. No, I did not label my dependent variable "function". My dependent variable PBW and all the independent variables are continuous variables. It is especially troubling since the order in which I input independent variables determines whether or not it gets a co

[R] plotting with R

2009-04-21 Thread Bala subramanian
Friends, i) I am new to R. Kindly suggest some resources that has examples of plotting with R. ii) How to set number of tick marks and labels, i have a x axis ranging fro 1 to 21. By default R shows the tick marks at 5, 10,15,20. How can i change this. Thanks, Bala [[alternative HTML ve

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

2009-04-21 Thread manta
Sorry, my bad, i did not mean to 'be mean'. Here are the first five observations for three variables (dr1, dr2 and doil) dr1 1996-01-021996-01-031996-01-041996-01-051996-01-08 0.0005814396 -0.0023725000 -0.0072835915 0.0074536448 -0.0007004221 dr2 1996-01-031996-01-0

Re: [R] joined R-today

2009-04-21 Thread Bala subramanian
our unstated system could be RedHat Enterprise Linux?). >> >> Contact your sysadm or google for the error message. >> >> (One of the hits suggests that you might need to run >> >> chcon -t texrel_shlib_t ncdf.so >> >> but, well, no warranties...) >&

Re: [R] joined R-today

2009-04-21 Thread Marc Schwartz
rise Linux?). Contact your sysadm or google for the error message. (One of the hits suggests that you might need to run chcon -t texrel_shlib_t ncdf.so but, well, no warranties...) The OP did indicate that F10 was the platform: https://stat.ethz.ch/pipermail/r-help/attachments/2009042

[R] ggplot2 - boxplot of variables / columns

2009-04-21 Thread Andreas Christoffersen
Hi, ggplot/qplot is great - it has really helped me do some nice things. However, simple boxplot of different columns/variables is a bit tricky, because of (i think) qplot's generic Y conditional on X input form. Se below. # Some data: a <- rnorm(100) b <- rnorm(100,1,2) c <- rnorm(100,2,0.5) # n

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

2009-04-21 Thread David Winsemius
Are you trying to imply that people should be able to answer a question that included no data? As others have pointed out, our powers of telepathy are generally less than commonly assumed. On Apr 21, 2009, at 10:00 AM, manta wrote: ?? -- View this message in context: http://www.nabble.com

Re: [R] ncdf,RNetCDF

2009-04-21 Thread Bala subramanian
Hi Andris, THANK YOU SO MUCH. THIS WAS THE PROBLEM INDEED. When disable SE Linux, it worked fine. Thank you once again, Bala On Tue, Apr 21, 2009 at 4:01 PM, Andris Jankevics wrote: > Hi, > > just quick "googling" gave me the hint that it can be ralated to SE > Linux restrictions of Fedora li

Re: [R] broken example: lme() + multcomp() Tukey on repeated measures design

2009-04-21 Thread David Winsemius
On Apr 21, 2009, at 10:12 AM, William Simpson wrote: I am trying to do Tukey HSD comparisons on a repeated measures expt. I found the following example on r-help and quoted approvingly elsewhere. It is broken. Can anyone please tell me how to get it to work? I am using R 2.4.1. How many y

Re: [R] broken example: lme() + multcomp() Tukey on repeated measures design

2009-04-21 Thread Dieter Menne
William Simpson gmail.com> writes: > > I am trying to do Tukey HSD comparisons on a repeated measures expt. > I found the following example on r-help and quoted approvingly elsewhere. > It is broken. Can anyone please tell me how to get it to work? > > I am using R 2.4.1. That's the problem

Re: [R] joined R-today

2009-04-21 Thread Peter Dalgaard
Bala subramanian wrote: > Hi, > I tried to install from four different mirrors. The result is the same. I > dnt understand what the following error means. > /usr/lib/R/library/ncdf/libs/ncdf.so: cannot restore segment prot after > reloc: Permission denied > Error in library(ncdf) : .First.lib faile

[R] broken example: lme() + multcomp() Tukey on repeated measures design

2009-04-21 Thread William Simpson
I am trying to do Tukey HSD comparisons on a repeated measures expt. I found the following example on r-help and quoted approvingly elsewhere. It is broken. Can anyone please tell me how to get it to work? I am using R 2.4.1. > require(MASS) ## for oats data set > require(nlme) ## for lme() > req

Re: [R] bug when subtracting decimals?

2009-04-21 Thread John C Nash
A quarter-century ago I was part of the IEEE 854 group that tried to suggest a radix free arithmetic standard. One of the interests was decimal arithmetic. I actually have owned 2 decimal arithmetic computers, a North Star Horizon (with decimal hardware I had to build by hand from a kit) and a R

Re: [R] ncdf,RNetCDF

2009-04-21 Thread Andris Jankevics
Hi, just quick "googling" gave me the hint that it can be ralated to SE Linux restrictions of Fedora linux. Just try to disable SE Linux feature. http://www.appistry.com/community/forums/content/cannot-restore-segment-prot-after-reloc-permission-denied Best regards, -- Andris subramanian wrot

  1   2   >