Re: [R] How to install Defaults package offline

2010-04-09 Thread Prof Brian Ripley
On Fri, 9 Apr 2010, dbonneau wrote: Hi, I just installed R software on my machine which is not supposed to have an internet access. I installed several package that I need, which are quantmod, xts, TTR etc. When I typed require(quantmod), I get " Error: package 'Defaults' could not be loaded".

Re: [R] Any chance R will ever get beyond the 2^31-1 vector size limit?

2010-04-09 Thread Martin Morgan
On 04/09/2010 05:36 PM, Duncan Murdoch wrote: > On 09/04/2010 7:38 PM, Matthew Keller wrote: >> Hi all, >> >> My institute will hopefully be working on cutting-edge genetic >> sequencing data by the Fall of 2010. The datasets will be 10's of GB >> large and growing. I'd like to use R to do primary

[R] Unable to load EBImage

2010-04-09 Thread Lamke
Hi group, I've spent half a day trying to figure this out and searched through different forums. I've tried to load EBImage but am getting the following problem: >Error in inDL(x, as.logical(local), as.logical(now), ...) : > cannot initialize ImageMagick >Error: package/namespace load failed

[R] How to install Defaults package offline

2010-04-09 Thread dbonneau
Hi, I just installed R software on my machine which is not supposed to have an internet access. I installed several package that I need, which are quantmod, xts, TTR etc. When I typed require(quantmod), I get " Error: package 'Defaults' could not be loaded". How do you install Defaults package if

Re: [R] "fill in" values between rollapply

2010-04-09 Thread Brad Patrick Schneid
Dennis: I will check this out tonight and let you know, it seems promising. Either way, thanks for the suggestion. Brad On Fri, Apr 9, 2010 at 12:03 PM, Dennis Murphy [via R] < ml-node+1819642-2015310724-118...@n4.nabble.com > wrote: > Hi: > > Not exactly elegant, but here's one approach: > lib

[R] Standard deviation of an accuracy rate

2010-04-09 Thread mramon
I want to evaluate the overall accuracy rate of some clustering methods. For that, I have created 10 different data sets (by simulation) and I have measured the accuracy (events well-classified divided by total number of events) of each method on each data set. So at the end I have a total of 10 m

[R] gnls not optimizing values

2010-04-09 Thread Brian Doctrow
Sometimes when I try to fit a model to data using the gnls function, it doesn't return optimized values of the model parameters. Instead it just returns the exact same values I used as initial guesses, but with standard errors calculated. Example is as follows: two_site_mHb <- gnls(y ~ (CS

[R] str: how to use "no list" recursively?

2010-04-09 Thread Jeff Brown
Hi, In the help file for str(), the following line appears: "no.list logical; if true, no ‘list of ...’ nor the class are printed". However, that appears to be true only on the top level; setting no.list to TRUE still leaves the remaining levels with the `list of ...' statement intact:

[R] adehabitat raster import

2010-04-09 Thread helen . mills
Hello all, I'm new to adehabitat and am having trouble getting my ascii files into the r. I have 45 environmental data layers that are all stored in a folder as ascii files. Is there an easy way to pull in all 45 of my data layers into a kasc dataframe. I'm not new to r or multivariate modeling, bu

Re: [R] using as.numeric() without generating warning message

2010-04-09 Thread Andrew Yee
Thanks for the tip! Andrew On Fri, Apr 9, 2010 at 8:04 PM, Gabor Grothendieck wrote: > Try this: > > suppressWarnings(as.numeric("A")) > > On Fri, Apr 9, 2010 at 7:22 PM, Andrew Yee wrote: > > I'm interested in testing whether or not a character string is numeric or > > not as follows: > > > >

Re: [R] Any chance R will ever get beyond the 2^31-1 vector size limit?

2010-04-09 Thread Duncan Murdoch
On 09/04/2010 7:38 PM, Matthew Keller wrote: Hi all, My institute will hopefully be working on cutting-edge genetic sequencing data by the Fall of 2010. The datasets will be 10's of GB large and growing. I'd like to use R to do primary analyses. This is OK, because we can just throw $ at the pro

Re: [R] using as.numeric() without generating warning message

2010-04-09 Thread Bert Gunter
Scratch my previous suggestion. Utter nonsense. Sigh... It's been a tough week. -- Bert Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Andrew Yee Sent: Friday, April 09, 2010

Re: [R] using as.numeric() without generating warning message

2010-04-09 Thread Gabor Grothendieck
Try this: suppressWarnings(as.numeric("A")) On Fri, Apr 9, 2010 at 7:22 PM, Andrew Yee wrote: > I'm interested in testing whether or not a character string is numeric or > not as follows: > > is.na(as.numeric('3')) # returns F > is.na(as.numeric('A')) # I'd like this to return T without issuing

Re: [R] using as.numeric() without generating warning message

2010-04-09 Thread Bert Gunter
I suspect the following is way slower and clunkier, but it does give you another way: ?tryCatch ## as in > tryCatch(1+x,error=function(e) return("darnit")) [1] "darnit" Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics -Original Message- From: r-help-boun...@r-project.o

[R] Any chance R will ever get beyond the 2^31-1 vector size limit?

2010-04-09 Thread Matthew Keller
Hi all, My institute will hopefully be working on cutting-edge genetic sequencing data by the Fall of 2010. The datasets will be 10's of GB large and growing. I'd like to use R to do primary analyses. This is OK, because we can just throw $ at the problem and get lots of RAM running on 64 bit R. H

[R] interpolating between lat/long position data with time

2010-04-09 Thread cbarcelo
Hello, I am currently working with satellite tracking data for an organism with irregularly spaced location data in space and time (point data is occasionally spaced by 1-10 days). I have 4 columns of data, Lat, Long, Date, Time. I would like to linearly interpolate my data set so that I have one

[R] using as.numeric() without generating warning message

2010-04-09 Thread Andrew Yee
I'm interested in testing whether or not a character string is numeric or not as follows: is.na(as.numeric('3')) # returns F is.na(as.numeric('A')) # I'd like this to return T without issuing a warning about NAs introduced by coercion. I guess you could suppress the warning with options(warn=-1),

Re: [R] How to update JGR

2010-04-09 Thread Liviu Andronic
On 4/9/10, mau...@alice.it wrote: > I recently updated R on Linus/SuSE 11.1 > I complained because no on-line help was available from JGR after R update. > I was told to update JGR as well. > How can I do that ? > I installed JGR on SuSE three times in the past with different R > versions.Eve

[R] panel regression with twoways random effects, on unbalanced data?

2010-04-09 Thread Liviu Andronic
Dear R users What would be the best way to approach estimating a panel regression with twoways random effects, on unbalanced data? Unfortunately, the "plm" package has no implementation of twoways random effects for unbalanced data. Currently I'm considering two approaches: - extend "plm" to cover

[R] How to update JGR

2010-04-09 Thread mauede
I recently updated R on Linus/SuSE 11.1 I complained because no on-line help was available from JGR after R update. I was told to update JGR as well. How can I do that ? I installed JGR on SuSE three times in the past with different R versions.Every time it's been a nightmare. I am afraid to have

Re: [R] function rep

2010-04-09 Thread Ben Tupper
Hi, On Apr 9, 2010, at 4:58 PM, Covelli Paolo wrote: > Hi, > > I've got the following code: > > p <- 0.34 > pb <- p*100 > pr <- (1-p)*100 > I think you are bumping into the issue that most numbers can't be exactly expressed digitally. Your variable, pr, isn't exactly the 66 you think it is.

Re: [R] function rep

2010-04-09 Thread RICHARD M. HEIBERGER
Covelli, From ?rep Non-integer values of times will be truncated towards zero. If times is a computed quantity it is prudent to add a small fuzz. Thus, the example is a very interesting special case of FAQ 7.31, > sprintf("%17.17a",66) [1] "0x1.08000p+6" > sprintf("%17.17a",pr) [1]

Re: [R] function rep

2010-04-09 Thread Stephan Kolassa
Hi, this is FAQ 7.31: pb and pr are floating-point numbers that are coerced to integer for rep(), and this does not always work the way you want. HTH Stephan Covelli Paolo schrieb: Hi, I've got the following code: p <- 0.34 pb <- p*100 pr <- (1-p)*100 A <- rep(0,pb) # a vector with 34 "

Re: [R] function rep

2010-04-09 Thread Henrique Dallazuanna
See FAQ "7.31 Why doesn't R think these numbers are equal?" and try this: rep(1, ceiling(pr)) On Fri, Apr 9, 2010 at 5:58 PM, Covelli Paolo wrote: > Hi, > > I've got the following code: > > p <- 0.34 > pb <- p*100 > pr <- (1-p)*100 > > A <- rep(0,pb)  # a vector with 34 "zeros" > B <- rep(1,pr)

Re: [R] function rep

2010-04-09 Thread Gang Liang
pr is a numeric number indeed slightly less than 66, hence, the vector generated by rep(1,pr) is of length 65 rather than 66... On Fri, Apr 9, 2010 at 1:58 PM, Covelli Paolo wrote: > Hi, > > I've got the following code: > > p <- 0.34 > pb <- p*100 > pr <- (1-p)*100 > > A <- rep(0,pb) # a vect

Re: [R] function rep

2010-04-09 Thread Erik Iverson
Hello, Covelli Paolo wrote: Hi, I've got the following code: p <- 0.34 pb <- p*100 pr <- (1-p)*100 A <- rep(0,pb) # a vector with 34 "zeros" B <- rep(1,pr) # a vector with 66 "ones" Not true. I counted them myself. There are only 65. I see > pr == 66 [1] FALSE > pr < 66 [1] TRUE So

[R] function rep

2010-04-09 Thread Covelli Paolo
Hi, I've got the following code: p <- 0.34 pb <- p*100 pr <- (1-p)*100 A <- rep(0,pb) # a vector with 34 "zeros" B <- rep(1,pr) # a vector with 66 "ones" Now if I type length(A), R answer correctly 34 but if I type length(B), R answer 65 instead of 66. I don't understand why it happens. C

Re: [R] perhaps regular expression bug with | sign ??

2010-04-09 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of David.Epstein > Sent: Friday, April 09, 2010 1:36 PM > To: r-help@r-project.org > Subject: [R] perhaps regular expression bug with | sign ?? > > > Here is my interaction with R:

Re: [R] perhaps regular expression bug with | sign ??

2010-04-09 Thread Phil Spector
David - Here's the last paragraph of the "Details" section of the regex help page: Patterns are described here as they would be printed by ‘cat’: (_do remember that backslashes need to be doubled when entering R character strings_, e.g. from the keyboard). You can get around this restrict

Re: [R] perhaps regular expression bug with | sign ??

2010-04-09 Thread Henrique Dallazuanna
Try this: sub(x='>|t|',pattern = '\\|t',replacement='zz') On Fri, Apr 9, 2010 at 5:35 PM, David.Epstein wrote: > > Here is my interaction with R: >> sub(x='>|t|',pattern = '|t',replacement='zz') > [1] "zz>|t|" > > So I say to myself "Clearly the | signs need to be escaped, so let's try > this" >

Re: [R] 3-D response surface using wireframe()

2010-04-09 Thread array chip
David, Thanks for the 2 previous posts from Sarkar. Actually, I am now one step closer. I am now able to remove the 3 outer lines of the bounding box using par.box argument, even Sarkar said in his 2008 post that par.box() does not control different boundaries, so maybe it was fixed. Replaci

Re: [R] perhaps regular expression bug with | sign ??

2010-04-09 Thread jim holtman
you need to escape it (twice): > sub(x='>|t|',pattern = '\\|t',replacement='zz') [1] ">zz|" On Fri, Apr 9, 2010 at 4:35 PM, David.Epstein wrote: > > Here is my interaction with R: > > sub(x='>|t|',pattern = '|t',replacement='zz') > [1] "zz>|t|" > > So I say to myself "Clearly the | signs need

[R] perhaps regular expression bug with | sign ??

2010-04-09 Thread David.Epstein
Here is my interaction with R: > sub(x='>|t|',pattern = '|t',replacement='zz') [1] "zz>|t|" So I say to myself "Clearly the | signs need to be escaped, so let's try this" > sub(x='>|t|',pattern = '\|t',replacement='zz') [1] "zz>|t|" Warning messages: 1: '\|' is an unrecognized escape in a charact

Re: [R] Error Bars in lattice- barcharts

2010-04-09 Thread Sam Albers
> > Well, when the error message says "argument 'lx' is missing, with no > default", it really means that argument 'lx' is missing, with no > default. Your panel function has an argument 'lx', which you forgot to > change to 'ly' as you did with the prepanel function. > > Hope that helps... > > Tha

[R] Fox's algorithm?

2010-04-09 Thread Blair Christian
I'm interested in a serial implementation of fox's algorithm for memory management reasons. Does anybody know if there is anything available in R or C libraries? [eg A %*% B is too big to allocate memory for. I really want the values written to disk, so I was thinking that it would be easiest to

Re: [R] 3-D response surface using wireframe()

2010-04-09 Thread David Winsemius
I do not think the mail server accepts .jpg formats which was the format in which I got your attachment the first time (because of your having copied me directly.) I don't see much need to send a pdf because the code you offered does work and the data made it through (because .txt and .pdf

Re: [R] Question on implementing Random Forests scoring

2010-04-09 Thread rmailbox
You may also wish to check out the PMML approach. Check out the PMML package. eRic - Original message - From: "Liaw, Andy" To: "Larry D'Agostino" , "r-help" Date: Fri, 9 Apr 2010 15:15:11 -0400 Subject: Re: [R] Question on implementing Random Forests scoring From: Larry D'Agostino >

Re: [R] 3-D response surface using wireframe()

2010-04-09 Thread array chip
Sorry the example plot didn't go through last time, here it is: Thanks John --- On Fri, 4/9/10, array chip wrote: > From: array chip > Subject: Re: [R] 3-D response surface using wireframe() > To: "David Winsemius" , "Felix Andrews" > > Cc: r-help@r-project.org > Date: Friday, April 9, 2010

Re: [R] Question on implementing Random Forests scoring

2010-04-09 Thread Larry D'Agostino
On Fri, Apr 9, 2010 at 2:15 PM, Liaw, Andy wrote: > From: Larry D'Agostino > > > > So I've been working with Random Forests ( R library is > > randomForest) and I > > curious if Random Forests could be applied to classifying on > > a real time > > basis. For instance lets say I've scored fraud f

Re: [R] Question on implementing Random Forests scoring

2010-04-09 Thread Liaw, Andy
From: Larry D'Agostino > > So I've been working with Random Forests ( R library is > randomForest) and I > curious if Random Forests could be applied to classifying on > a real time > basis. For instance lets say I've scored fraud from a group of > transactions. If I want to score any new inco

Re: [R] Evaluate variable

2010-04-09 Thread Douglas Bates
You probably want to use substitute() to construct your formula and be careful of the distinction between character strings and names > substitute(foo ~ bar, list(foo = as.name("y"), bar = as.name("x"))) y ~ x On Fri, Apr 9, 2010 at 2:06 PM, Nic Rivers wrote: > Dear R-users: > > I would like to

[R] Evaluate variable

2010-04-09 Thread Nic Rivers
Dear R-users: I would like to create a system of regression equations of length n, where the variables are drawn from a data frame. The result I would like is given by the variable named "system" in the code below. However, when I use a loop to create the system of equations, I cannot s

[R] Brier's score for bootstrap sample (coxph)

2010-04-09 Thread paaventhan jeyaganth
Dear all, How can i get brier's score for the bootsrap sample for survival analysis. this are the code i am using for the validation. f1 <- cph(Surv(time,dead ) ~ strata(x1)+strata(x2)+strata(x3), x=TRUE, y=TRUE, surv=TRUE, time.inc=12, data=new) validate(f1,B=200,u=12,dxy=T) Tha

Re: [R] 3-D response surface using wireframe()

2010-04-09 Thread array chip
Hi David and Felix, Thank you very much for your suggestions. To be honest, this has become beyond my understanding of lattice plots now. I am relatively new to lattice plots, so have no idea how function within function works (for example, how does panel.3dpolygon() within panel.3d.wireframe()

[R] step function

2010-04-09 Thread Luis Felipe Parra
Hello I am using the step function in order to do backward selection for a linear model of 52 variables with the following commands: object<-lm(vars[,1] ~ (vars[,2:(ncol(predictors)+1)]-1)) BackS<-step(object,direction="backward") but it isn't dropping any if the variables in the model, but there

[R] maSigPro

2010-04-09 Thread Luis Felipe Parra
Hello, I am using the maSigPro package to use the two.ways.stepback command, this command performs backward selection, I would like it to do it wtihout an intercept in the regression, do you know how can I do this, or how can I see the packages code or scripts in order to be able to modify it? tha

[R] rjags syntax error

2010-04-09 Thread Christopher David Desjardins
Hi, I am getting the following error when I'm running jags.model() > meas1 <- jags.model(file="measurement.bug",data=dat.test) syntax error, unexpected '}', expecting ',' or ')' Error in jags.model(file = "measurement.bug", data = dat.test) : Parse error on line 1 Below is my JAGS model. P

Re: [R] Multiple comparisons for a two-factor ANCOVA

2010-04-09 Thread RICHARD M. HEIBERGER
On Wed, Apr 7, 2010 at 9:25 PM, Eric Scott wrote: > Thank you for your reply. The WoodEnergy example helped a lot. I > understand now that it is inappropriate to make all pairwise comparisons > with an interaction present and better to make comparisons between levels of > one factor within a co

[R] Excel R1C1 reference style in Rcom?

2010-04-09 Thread Albert-Jan Roskam
Hi, I have created the Boolean function below to evaluate if a given cell in an Excel file contains a formula. I have to process hundreds of excel files and I want to filter out any cells that contain formulae. Now I want to use the isXlsFormula function below when I loop through all the cell

[R] Question on implementing Random Forests scoring

2010-04-09 Thread Larry D'Agostino
So I've been working with Random Forests ( R library is randomForest) and I curious if Random Forests could be applied to classifying on a real time basis. For instance lets say I've scored fraud from a group of transactions. If I want to score any new incoming transactions for fraud could Random

Re: [R] Ranking correlation with R

2010-04-09 Thread Joshua Wiley
On Fri, Apr 9, 2010 at 10:23 AM, David Nemer wrote: > Would that also work if in one ranking I have a filename that it is not in > the other ranking? match() will return an NA, if it cannot find a match, in which case you could use the argument: use="pairwise.complete.obs") in cor() to have it on

Re: [R] How to use tapply for quantile

2010-04-09 Thread Charles C. Berry
On Thu, 8 Apr 2010, James Rome wrote: I am trying to calculate quantiles of a data frame column split up by two factors: # Calculate the quantiles quarts = tapply(gdf$tt, list(gdf$Runway, gdf$OnHour), FUN=quantile, na.rm = TRUE) This does not work: It seems like it did work. It returned a

Re: [R] How to run Shapiro-Wilk test for each grouped variable?

2010-04-09 Thread David Winsemius
On Apr 9, 2010, at 10:51 AM, Iurie Malai wrote: Thank you, David! Here is the code to read my file: data <- read.table("data.txt", header=TRUE, sep=";", na.strings="NA", dec=".", strip.white=TRUE) Jorge Ivan Velez gave me a working solution, but I am ready to learn yours to. I don't th

Re: [R] Read data in sequences

2010-04-09 Thread Phil Spector
Rock - Here's one way: x = textConnection('A 2.5 3.4 2.7 5.6 5.7 5.4 10.1 9.4 + B 5.3 5.4 6.5 7.5 1.3 4.5 10.5 4.1') dat = read.table(x) names(dat) = c('grp','x1','x2','x3','x4','x5','x6','x7','x8') reshape(dat,idvar='grp',varying=list(c('x1','x3','x5','x7'), +

Re: [R] GARCH estimation with exogenous variables in the mean equation

2010-04-09 Thread Edwin Sun
Hello, I have the similar issue in estimating a GARCH model with exogenous variables in the mean equation. Currently, to my understanding, the garch function in tseries package can handle univariate model, and garchFit in fGarch can handle ARMA specification. I wonder if there is any R function

Re: [R] "fill in" values between rollapply

2010-04-09 Thread Dennis Murphy
Hi: Not exactly elegant, but here's one approach: library(zoo) x <- zoo( rpois(100, 40) ) w <- rollapply(x, 5, mean, by = 5, align = c('left')) x2 <- rep(w, each = 5) Does that work? HTH, Dennis On Fri, Apr 9, 2010 at 12:32 AM, Brad Patrick Schneid wrote: > > Hi, > Sorry ahead of time for not

Re: [R] Ranking correlation with R

2010-04-09 Thread Joshua Wiley
>> cor() requires numeric data.  To use it in this case, you would need >> to come up with rankings based on the position for each file name, and >> use those pairs of numbers with cor(). > > One possible source for such numbers would be row.names(dfrm) since by > default (assuming they are in a da

[R] Trouble with mChoice() in the Hmisc package.

2010-04-09 Thread Jim Java
Hi All:-- I've started using the the Hmisc reporting facilities recently, mostly successfully. I'm having some trouble with mChoice() multiple-choice objects, though. Here's some example code and output from R-help a couple of years ago: library(Hmisc) Symptom1 <- c("Headache", "Headache", NA) Sy

[R] Read data in sequences

2010-04-09 Thread RockO
Dear R users, I tried to find a solution in the search list, but I cannot find it. I would like to read a .txt file with, let say, three variables, with two of which have repeated values in a number a columns. An example: The variables: Treat, x1, x2. The values: A 2.5 3.4 2.7 5.6 5.7 5.4 10.1

Re: [R] I can´t run the example shown in the inline pa ckage

2010-04-09 Thread satu
Dear Romain, you are right. Apologies, here is the complete result from your script: > code <- '#include \nSEXP f(){\n return R_NilValue ; }' > writeLines( code, "test.c" ) > system( "R CMD SHLIB test.c" ) gcc -I"C:/R/R-210~1.1/include"-O3 -Wall -std=gnu99 -c test.c -o test.o gcc -sh

Re: [R] How to replace all non-maximum values in a row with 0

2010-04-09 Thread Dennis Murphy
Hi: This isn't much shorter than the previous solution, but here's another take, operating row-wise. A <- matrix (c(2, 3, 0, 0, 200, 30, 0, 0, 2, 50, 0, 0, 3, 0, 0, 0, 0, 8, 8, 0), nrow = 4, byrow=T) # Write a vector function to apply to each row: begin by i

Re: [R] Ranking correlation with R

2010-04-09 Thread David Winsemius
On Apr 9, 2010, at 12:14 PM, Joshua Wiley wrote: On Fri, Apr 9, 2010 at 8:58 AM, David Nemer wrote: Hello Joshua, Thanks for your help. The ranking list doesn't have numbers (it doesn't matter the name of the file), just the file name, and the ranking is assumed base on the position of t

[R] Bootcov for two stage bootstrap

2010-04-09 Thread tonitogomez
Dear users, I'm trying to implement the nonparametric "two-stage" bootstrap (Davison and Hinkley 1997, pag 100-102) in R. As far as I understood, 'bootcov' is the most appropriate method to implement NONPARAMETRIC bootstrap in R when you have clustered data (?). I read the 'bootcov' manual but I

Re: [R] Ranking correlation with R

2010-04-09 Thread Joshua Wiley
On Fri, Apr 9, 2010 at 8:58 AM, David Nemer wrote: > Hello Joshua, > Thanks for your help. The ranking list doesn't have numbers (it doesn't > matter the name of the file), just the file name, and the ranking is assumed > base on the position of the file name in the list (so the first filename to

Re: [R] Data manipulation problem

2010-04-09 Thread Dieter Menne
Bert Gunter wrote: > > Yes. Don't do this. > > (what you probably really want to do is fit a model with age as a factor, > which can be done statistically e.g. by logistic regression; or > graphically > using conditioning plots, e.g. via trellis graphics (the lattice package). > This avoids the

Re: [R] Read data in sequences

2010-04-09 Thread Dieter Menne
RockO wrote: > > I tried to find a solution in the search list, but I cannot find it. I > would like to read a .txt file with, let say, three variables, with two of > which have repeated values in a number a columns. > > The variables: Treat, x1, x2. > The values: > A 2.5 3.4 2.7 5.6 5.7 5.4 1

[R] Rsge: recursive parallelization

2010-04-09 Thread Peter Danenberg
In principle, I'd like to be able to do something like this: sge.parLapply(seq(10), function(x) parLapply(seq(x), function(x) x^2)) In practice, however, I have to resort to acrobatics like this: sge.options(sge.remove.files=FALSE) sge.options(sge.qsub.options='-cwd -V') sge.parLapply(se

Re: [R] Ranking correlation with R

2010-04-09 Thread Joshua Wiley
Dear David, Are the rankings the numbers? Like List 1: 1 3 2 If so you should be able to do it fairly easily with cor() If you have a lot of file names and need to extract the numbers look at ?strsplit or ?substring. This will be easier or harder depending how variable the names are. For

Re: [R] SSH Through R Script

2010-04-09 Thread Don MacQueen
When I do what you're describing, I get prompted for my password: > system('ssh -l usernm rmthost') use...@rmthost's password: After I enter my password, nothing seems to happen. But if I hit ctrl-c then I get a command line prompt, and it turns out that it's a shell prompt on the remo

Re: [R] How to get the penalty matrix for natural cubic spline?

2010-04-09 Thread Frank E Harrell Jr
Yan Li wrote: Hi, all I am trying to get the basis matrix and penalty matrix for natural cubic splines. In the "splines" package of R,"ns" can generate the B-spline basis matrix for a natural cubic spline. How can I get the basis matrix and penalty matrix for natural cubic spline. Thanks a lot!

[R] garch estimation with exogenouse variables

2010-04-09 Thread Changyou Sun
Hello All, I need to estimate a GARCH model. The mean equation contains exogenous variables like Y = B * X + et. I understand the garch function in tseries package can handle univariate model, and garchFit in fGarch can handle ARMA specification. Is there any function that can handle exogenous var

[R] Dallas R Users Group has a Yahoo Group for signup now

2010-04-09 Thread Larry D'Agostino
If you are interested in joining the Dallas RUG please go to the following link to show your interest and get things started. http://tech.groups.yahoo.com/group/Dallas_RUG/ My first thought would to have some informal meet ups at some local Dallas locations to discuss overall goals, ideas, wishes

Re: [R] How to replace all non-maximum values in a row with 0

2010-04-09 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of ONKELINX, Thierry > Sent: Friday, April 09, 2010 2:25 AM > To: jes...@econinfo.de; r-help@r-project.org > Subject: Re: [R] How to replace all non-maximum values in a row with 0 >

[R] Ranking correlation with R

2010-04-09 Thread David Nemer
Hey Everyone, Im fresh new in R, and Im supposed to write a code to give me a correlation between two rankings. So I have two ranking lists, which contain file names, e.g.: Ranking list 1: file1.java file3.java file2.java Ranking list 2: fiile2.java file4.java file1.java I need to see how much

Re: [R] Beyond reshape: automatically streamlining data

2010-04-09 Thread Steve Lianoglou
Hi Marshall, On Fri, Apr 9, 2010 at 8:59 AM, Marshall Feldman wrote: > ... > For any particular set of analyses, one typically recodes variables and > deletes cases and variables. It would be really nice to have a package that, > for example, if one selected cases from a larger data set based on

Re: [R] How to run Shapiro-Wilk test for each grouped variable?

2010-04-09 Thread Iurie Malai
Thank you very much, Jorge! Your example worked for me. Here is the code: d <- data.frame(data$groupFactor, data[2:17]) d # p-values for the shapiro test (by levels of groupFactor) with(d, aggregate(d[,-1], list(d[,1]), FUN = function(x) shapiro.test(x)$p.value)) Iurie 2010/4/9 Jorge Ivan Velez

Re: [R] Data manipulation problem

2010-04-09 Thread moleps
In the end after going at it from scratch...This worked out allright... ##set up data age.cat<-seq(0,100,10) year<-(1953:(1953+55)) dat.vec<-sample(1:10,(length(age.cat)*length(year))) dat.matrix<-matrix(dat.vec,c(length(age.cat),length(year))) rownames(dat.matrix)<-age.cat colnames(

Re: [R] How to run Shapiro-Wilk test for each grouped variable?

2010-04-09 Thread Iurie Malai
Thank you, David! Here is the code to read my file: > data <- read.table("data.txt", header=TRUE, sep=";", na.strings="NA", > dec=".", strip.white=TRUE) Jorge Ivan Velez gave me a working solution, but I am ready to learn yours to. Iurie 2010/4/9 David Winsemius : > OK, we have the data, now .

Re: [R] Combining ggplot2 objects and/or extracting layers

2010-04-09 Thread Marshall Feldman
Hi Hadley, Thanks for the terrific package! If you'd like I could give you my code, but conceptually what I'm trying to do is pretty simple. The chart on this page

Re: [R] How to run Shapiro-Wilk test for each grouped variable?

2010-04-09 Thread David Winsemius
On Apr 9, 2010, at 9:39 AM, Ivan Calandra wrote: Hi, Maybe you should change the "3" in the loop with "r" like: for (r in 3:18) { by(eval(parse(text=(paste("data",data.n[r],sep="$", data $groupFactor, shapiro.test) } I think it should work, if not, I have already a similar script for

Re: [R] How to run Shapiro-Wilk test for each grouped variable?

2010-04-09 Thread Ivan Calandra
Hi, Maybe you should change the "3" in the loop with "r" like: for (r in 3:18) { by(eval(parse(text=(paste("data",data.n[r],sep="$", data$groupFactor, shapiro.test) } I think it should work, if not, I have already a similar script for that. HTH, Ivan Le 4/9/2010 15:17, David Winsemius a é

Re: [R] I can´t run the example shown in the inline pa ckage

2010-04-09 Thread Romain Francois
What happened to the line that contained "R CMD SHLIB" ? This is the bit that compiles the code. On windows (you were asked to tell us that you are running windows, both through the posting guide and from my previous email) you need to install the same tools that one needs for building a packa

Re: [R] error bars on barplot

2010-04-09 Thread hadley wickham
> bar.err (agricolae) > plotCI (gplots) > xYplot (Hmisc) > error.bars (psych) > dispersion (plotrix) > plotCI (plotrix) > Not to mention: http://biostat.mc.vanderbilt.edu/wiki/Main/DynamitePlots Hadley -- Assistant Professor / Dobelman Family Junior Chair Department of Statistics / Rice Univers

Re: [R] How to run Shapiro-Wilk test for each grouped variable?

2010-04-09 Thread David Winsemius
On Apr 9, 2010, at 8:16 AM, Iurie Malai wrote: I want to run Shapiro-Wilk test for each variable in my dataset, each grouped by variable groupFactor. I have these working commands: data.n<-names(data) # put names into a vector called data.n by(eval(parse(text=(paste("data",data.n[3],sep="$"))

Re: [R] C-index and Cox model

2010-04-09 Thread Terry Therneau
Bessy wrote: > Dear all R users, > > I am building a Cox PH model on a small dataset. I am wondering how to > measure the predictive power of my cox model? Normally the ROC curve or Gini > value are used in logistic regression model. Is there any similar > measurement suitable for Cox model? > >

Re: [R] Okay, here is what I am doing

2010-04-09 Thread satu
Dear Romain, I am working with a PC with Windows-XP I do have Rtools installed and running the code you propose, this is what I get as a result: > code <- '#include \nSEXP f(){\n return R_NilValue ; }' > writeLines( code, "test.c" ) > dyn.load( "test.so" ) Error in inDL(x, as.logical(local), as

[R] Beyond reshape: automatically streamlining data

2010-04-09 Thread Marshall Feldman
Hello, I've been very impressed by the reshape package and how easy it makes reorganizing statistical data structures. This makes me wonder if there's another package out there that addresses another set of tasks that one often does when preparing data for analysis. For any particular set of

Re: [R] NAs are not allowed in subscripted assignments

2010-04-09 Thread Paul Chatfield
Thank you – that’s sorted it. Trying to make things too complicated! J From: Alain Guillet-2 [via R] [mailto:ml-node+1819104-1154170184-120...@n4.nabble.com] Sent: 09 April 2010 10:34 To: Paul Chatfield Subject: Re: NAs are not allowed in subscripted assignments Maybe you can withdr

Re: [R] Combining ggplot2 objects and/or extracting layers

2010-04-09 Thread hadley wickham
> Other then rebuilding the plots, is there any way either (1) to combine > existing ggplot2 plots or (2) to extract a layer from an existing plot > so that it can be added to another? Not really, although you can always pull apart the plot components. Can you give an example of what you are tryin

Re: [R] computation of dispersion parameter in quasi-poisson glm

2010-04-09 Thread Prof Brian Ripley
On Fri, 9 Apr 2010, Sven Garbade wrote: Hi list, can anybody point me to the trick how glm is computing the dispersion parameter in quasi-poisson regression, eg. glm(...,family="quasipoisson")? It isn't. glm() does not need (and does not compute) the dispersion parameter. summary.glm will

Re: [R] error bars on barplot

2010-04-09 Thread Johannes Graumann
Jim Lemon wrote: > On 04/09/2010 08:55 PM, Samantha Reynolds wrote: >> Hi >> >> I was hoping someone might be able to help me I have this data: >> >> birdid timetaken numvisits ptachchoice time bold >> 1087 810 1 AM0 >> 108728 6 1

[R] Combining ggplot2 objects and/or extracting layers

2010-04-09 Thread Marshall Feldman
Hi, Other then rebuilding the plots, is there any way either (1) to combine existing ggplot2 plots or (2) to extract a layer from an existing plot so that it can be added to another? Thanks. -- Dr. Marshall Feldman, PhD Director of Research and Academic Affairs Center for Urban Studies a

Re: [R] error bars on barplot

2010-04-09 Thread Jim Lemon
On 04/09/2010 08:55 PM, Samantha Reynolds wrote: Hi I was hoping someone might be able to help me I have this data: birdid timetaken numvisits ptachchoice time bold 1087 810 1 AM0 108728 6 1 PM0 108713 3

Re: [R] computation of dispersion parameter in quasi-poisson glm

2010-04-09 Thread Achim Zeileis
On Fri, 9 Apr 2010, Sven Garbade wrote: Hi list, can anybody point me to the trick how glm is computing the dispersion parameter in quasi-poisson regression, eg. glm(...,family="quasipoisson")? It's the sum of squared Pearson residuals divided by the residual degrees of freedom. For example:

[R] How to run Shapiro-Wilk test for each grouped variable?

2010-04-09 Thread Iurie Malai
I want to run Shapiro-Wilk test for each variable in my dataset, each grouped by variable groupFactor. I have these working commands: > data.n<-names(data) # put names into a vector called data.n > by(eval(parse(text=(paste("data",data.n[3],sep="$", data$factor, > shapiro.test) #run shapiro.t

[R] computation of dispersion parameter in quasi-poisson glm

2010-04-09 Thread Sven Garbade
Hi list, can anybody point me to the trick how glm is computing the dispersion parameter in quasi-poisson regression, eg. glm(...,family="quasipoisson")? Thanks ®ards, Sven __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-he

Re: [R] erasing an area of a graph

2010-04-09 Thread Jim Lemon
On 04/09/2010 04:51 AM, Terry Therneau wrote: I have a case where the easiest way to draw a particular symbol would be to draw something a little bigger, and then use polygon(... , col=0) to erase the extra stuff. Just how to do this best when par('bg') = 'transparent' is, however, eluding me.

Re: [R] SSH Through R Script

2010-04-09 Thread Jonathan Baron
You might try setting up ssh so that you do not need a password. See man ssh-keygen In essence, you make a key for the machine you are on with (for example): ssh -t dsa which produces a public and a private key. You upload the public key to remoteserver.com, and put it in your .ssh directory b

Re: [R] bootstrap confidence intervals, non iid

2010-04-09 Thread Kay Cichini
hi glen, i need conf.intervals for blocked data, as described in the first place. i've learned in the meantime, that the boot() function can handle this. i had to formulate the function for the boot command, put "sites" to the strata argument and resample from each subsetted level of the fact

Re: [R] plm package twoways effect problem

2010-04-09 Thread seral
well thanks anyway even just for replying, i understand the lack of information causes no response... but if no one tells me that they need more information how could i send. anyway here more information about the procedure that i am applying to define the model after reading and attaching my dat

  1   2   >