Re: [R] determining the order in which points are plotted

2011-01-24 Thread Mike Miller
On Mon, 24 Jan 2011, Peter Ehlers wrote: 10 x 10 strikes me as pretty near the limit of usefulness of a pairs plot. You might want to investigate the xysplom() function in pkg:HH. You'll have to write your own panel function, possibly subsetting your data with the scale() function. The 10 x

[R] ggplot geom_boxplot and stat_smooth

2011-01-24 Thread Petr PIKAL
Dear all I would like to superpose some smoothing line through boxplot in ggplot > dput(ad) structure(list(konc.f = structure(c(1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 6L, 6L, 6L, 7L, 7L, 7L, 7L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 4L, 4L, 4L

Re: [R] How to look up explanations for %in%?

2011-01-24 Thread casshyr
Oh, right, I should have seen that... Thanks! Date: Mon, 24 Jan 2011 19:18:14 -0800 From: ml-node+3235360-1742955110-207...@n4.nabble.com To: cass...@hotmail.com Subject: Re: How to look up explanations for %in%? ?'%in%' Thanks,

[R] RODBC help

2011-01-24 Thread pirar01
Hi I am new in the R world and hopefully this is the right forum to ask. My backend is an Ingres database to which I connect via ODBC I have defined a DSN which connects ok to myh backend But when I try the following library(RODBC) channel <- odbcConnect("pirar01") load("a.rdata") sqlSave(chan

[R] how to resize heatmap without rescaling?

2011-01-24 Thread Anton Kratz
I am using R version 2.12.1 on Win XP. I have done a heatmap with dendrogram using the heatmap.2 function. The heatmap basically looks like I want it to be, but the labels of the columns are cut off. I.e. the textual labels of the columns, although they are not very long (less than 12 characters

[R] Defining an objective function in fPortfolio

2011-01-24 Thread Luis Felipe Parra
Hello I am using the fPortfolio package and I see there is the option in the model slot "objRisk" which permits the user to define its own objective function. I have the ebook Portfolio Optimization with Rmetrics and there it says examples on this option are on the advanced version of the book, whi

Re: [R] Downloading data from internet

2011-01-24 Thread Gabor Grothendieck
On Mon, Jan 24, 2011 at 8:48 PM, Megh Dal wrote: > Dear all, I need to download an excel file from net, on which I have address > like http://www.2shared.com/file/MMSMWv4B/MyData.html. Can I somehow > directly download this file into my R workbook? > If you have a direct URL to the file (not the

Re: [R] How to look up explanations for %in%?

2011-01-24 Thread Arun.stat
?'%in%' Thanks, -- View this message in context: http://r.789695.n4.nabble.com/How-to-look-up-explanations-for-in-tp3235274p3235360.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.c

[R] Downloading data from internet

2011-01-24 Thread Megh Dal
Dear all, I need to download an excel file from net, on which I have address like http://www.2shared.com/file/MMSMWv4B/MyData.html. Can I somehow directly download this file into my R workbook? Thanks, [[alternative HTML version deleted]] __ R-

Re: [R] data and parameters

2011-01-24 Thread analys...@hotmail.com
Thanks. I finally got around to implementing it and it works. But I think the steps to produce master_reduced can be compressed into master_reduced = merge(master,control) > master clientId date value 11 1001 10001 22 1002 10002 33 1003 10003 44 1004 10004 5

[R] Paired data survival analysis

2011-01-24 Thread Marcus Michelangeli (Sci)
Hi, Im an honours student at Monash University. I'm trying to analyse some data for my project, which involved 2 treatments. My subjects were exposed to both treatments, and i gave them 60 minutes to perform a certain behaviour. 3 of my subjects performed the behaviour in one treatment but not th

Re: [R] crazy loop error.

2011-01-24 Thread Roy Mathew
Thanks for the reply Erik, As you mentioned, grouping consecutive elements of 'a' was my idea. I am unaware of any R'ish way to do it. It would be nice if someone in the community knows this. The error resulting in the NA was pretty easy to fix, and my loop works, but the results are still wrong (

[R] How to look up explanations for %in%?

2011-01-24 Thread casshyr
I tried googling that, but the search engine just ignores the "%" sign and is not giving me meaningful search results. I ended up doing a trial and error and kinda figured out what it does. But I am wondering if there is a good website that shows you all the meanings behind R's commands that invol

Re: [R] R package rating site?

2011-01-24 Thread Erik Iverson
http://crantastic.org/ On 01/24/2011 09:08 PM, zubin wrote: We should really have an R package rating site, comments, reviews or such, like folks do for apps or movie reviews. Does anyone know of a site trying to do this. If i remember correctly a few R user conferences ago this was talked abo

[R] R package rating site?

2011-01-24 Thread zubin
We should really have an R package rating site, comments, reviews or such, like folks do for apps or movie reviews. Does anyone know of a site trying to do this. If i remember correctly a few R user conferences ago this was talked about but not sure if anything was ever implemented.

Re: [R] determining the order in which points are plotted

2011-01-24 Thread Peter Ehlers
On 2011-01-24 16:39, Mike Miller wrote: On Mon, 24 Jan 2011, David Winsemius wrote: On Jan 24, 2011, at 6:49 PM, Mike Miller wrote: I make plenty of scatterplots, especially using scatterplot.matrix from library(car). One thing I don't know how to do is determine which points are plotted las

Re: [R] determining the order in which points are plotted

2011-01-24 Thread Mike Miller
On Mon, 24 Jan 2011, David Winsemius wrote: On Jan 24, 2011, at 6:49 PM, Mike Miller wrote: I make plenty of scatterplots, especially using scatterplot.matrix from library(car). One thing I don't know how to do is determine which points are plotted last. Sometimes I plot a large number of p

Re: [R] determining the order in which points are plotted

2011-01-24 Thread David Winsemius
On Jan 24, 2011, at 6:49 PM, Mike Miller wrote: I make plenty of scatterplots, especially using scatterplot.matrix from library(car). One thing I don't know how to do is determine which points are plotted last. Sometimes I plot a large number of points for multiple groups represented by

Re: [R] error with source(): invalid 'times' value

2011-01-24 Thread Duncan Murdoch
On 11-01-24 5:09 PM, mat wrote: Le 24. 01. 11 20:43, Duncan Murdoch a écrit : On 11-01-24 12:07 PM, Matthieu Stigler wrote: hi I am seeing a strange behavior I can't understand... doing: source("/tmp/RFile.r",echo=TRUE) Error in rep.int(c(prompt.echo, continue.echo), c(leading, length(dep

[R] determining the order in which points are plotted

2011-01-24 Thread Mike Miller
I make plenty of scatterplots, especially using scatterplot.matrix from library(car). One thing I don't know how to do is determine which points are plotted last. Sometimes I plot a large number of points for multiple groups represented by different colors. I would like to guarantee that poi

Re: [R] How to measure/rank "variable importance" when using rpart?

2011-01-24 Thread Tal Galili
Hello Andy and other R-help readers, I've just realized that your function *does* answer my needs at full. (That's what happens when reading something late at night I guess...) Thanks again Andy for your help! Best, Tal Contact Details:--

Re: [R] Masking commands - Permutation in gregmisc and e1071

2011-01-24 Thread Peter Langfelder
On Mon, Jan 24, 2011 at 2:47 PM, Yanika Borg wrote: > I am using the function permutations from the package *gregmisc*. However, I > am also making use of the package *e1071*, which also contains a function > called permutations. I want to use the function permutations from the * > gregmisc* packa

[R] Masking commands - Permutation in gregmisc and e1071

2011-01-24 Thread Yanika Borg
I am using the function permutations from the package *gregmisc*. However, I am also making use of the package *e1071*, which also contains a function called permutations. I want to use the function permutations from the * gregmisc* package, however, the other package is masking this function. This

Re: [R] crazy loop error.

2011-01-24 Thread Erik Iverson
Roy Mathew wrote: Thanks for the reply Erik, As you mentioned, grouping consecutive elements of 'a' was my idea. I am unaware of any R'ish way to do it. It would be nice if someone in the community knows this. Is this the idea you're trying to execute? It uses ?rle and ?mapply. a <- c(2,3

Re: [R] How to measure/rank "variable importance" when using rpart?

2011-01-24 Thread Tal Galili
Hi Andy, Thank you for your response. I've already came by this function but also noticed that the help file states that: "This method does *not* currently provide class–specific measures of importance when the *response is a factor*." Which is the case I need to deal with. Any suggestions as t

Re: [R] Strange result from sort: sort(c("aa", "ff")) gives "ff" "aa" with R.2.12.1 on windows 7

2011-01-24 Thread Prof Brian Ripley
On Mon, 24 Jan 2011, Søren Højsgaard wrote: Dear list, Please consider the following call of sort sort(c("a","f")) [1] "a" "f" sort(c("f","a")) [1] "a" "f" sort(c("aa","ff")) [1] "ff" "aa" sort(c("ff","aa")) [1] "ff" "aa" The last two results look strange to me. Is that a bug??? It

Re: [R] error with source(): invalid 'times' value

2011-01-24 Thread William Dunlap
> -Original Message- > From: mat [mailto:matthieu.stig...@gmail.com] > Sent: Monday, January 24, 2011 2:09 PM > To: William Dunlap > Cc: jim holtman; r-help@r-project.org; murdoch.dun...@gmail.com > Subject: Re: [R] error with source(): invalid 'times' value > > indeed this makes the tric

Re: [R] error with source(): invalid 'times' value

2011-01-24 Thread mat
Le 24. 01. 11 20:43, Duncan Murdoch a écrit : On 11-01-24 12:07 PM, Matthieu Stigler wrote: hi I am seeing a strange behavior I can't understand... doing: > source("/tmp/RFile.r",echo=TRUE) Error in rep.int(c(prompt.echo, continue.echo), c(leading, length(dep) - : invalid 'times' value

Re: [R] error with source(): invalid 'times' value

2011-01-24 Thread mat
indeed this makes the trick! quite strange... is this a known bug/issue? thanks! Matthieu Le 24. 01. 11 19:48, William Dunlap a écrit : Put a space after the # in the line #line 516 to avoid the problem. A similar problem also appears in parse(). > parse(text="#line 102\nlog(pi)\n") E

Re: [R] crazy loop error.

2011-01-24 Thread Petr Savicky
On Mon, Jan 24, 2011 at 07:16:58PM +0100, Roy Mathew wrote: > Dear R-users, > This is a loop which is part of a bigger script. I managed to isolate the > error in this loop and simplified it to the bare minimum and made it > self-contained. > > a<-c(2,3,4,5,5,5,6,6,6,7) > > for(n in 1:10) > { > p

[R] Is there any way to get score vector in each iteration in glm??

2011-01-24 Thread Akram Khaleghei Ghosheh balagh
Hello everyone, I am doing the hypothesis test and I need the score vector of each iteration in glm (family=binomial); how could I do it. I tried trace option but it gives me just AIC of each iteration nothing more. thanks; [[alternative HTML version deleted]]

Re: [R] error with source(): invalid 'times' value

2011-01-24 Thread mat
Hi Well this is the output of str(dep) on a small example: str(dep) chr [1:8] "###" ... Browse[1]> dep [1] "###" [2] "### chunk number 1:" [3] "###" [4]

[R] Strange result from sort: sort(c("aa", "ff")) gives "ff" "aa" with R.2.12.1 on windows 7

2011-01-24 Thread Søren Højsgaard
Dear list, Please consider the following call of sort > sort(c("a","f")) [1] "a" "f" > sort(c("f","a")) [1] "a" "f" > > sort(c("aa","ff")) [1] "ff" "aa" > sort(c("ff","aa")) [1] "ff" "aa" The last two results look strange to me. Is that a bug??? The result seems to come from calls to order: > o

Re: [R] LTA

2011-01-24 Thread Ingmar Visser
Sebastian, There is a number of packages that fit hidden (or latent) Markov models which are in most regards identical to latent transition analysis. Best, Ingmar 2011/1/24 Sebastián Daza > Hi everyone, > Does anyone know if there is a package to run Latent Transitional Analysis > using R? > >

Re: [R] Setting bioconductor repository in .Rprofile. Is there a permanent way?

2011-01-24 Thread Kevin Wright
Now that is _simple_. Thanks. Kevin On Mon, Jan 24, 2011 at 1:49 PM, Kevin Wright wrote: > Of course, before posting my question, I did RTFM and RTFcode and > RTFmailinglists.  The key word in my question was "simpler".  I > rejected copying a modified version of the "repositories" file to my

Re: [R] ggplot2 - ribbon

2011-01-24 Thread Brian Diggs
On 1/24/2011 7:44 AM, Sam wrote: Dear List, I am having trouble setting the transparency of a ribbon in ggplot2 and was wondering if anybody had any suggestions so far i have a plot exactly as i want it and i want to add a ribbon connecting the ymax and ymin, whci i do with the following comm

Re: [R] sensitivity logical operators in R

2011-01-24 Thread Berend Hasselman
kognDisso wrote: > > Hi again, > > I have checked the same code (see below) using MATLAB. It produces the > same error (i.e., equal numbers are evaluated as unequal). Do I miss > something? > > 1. It is NOT an error 2. The numbers are NOT equal 3. Please read FAQ 7.31. 3. Do t - tt and y

Re: [R] sensitivity logical operators in R

2011-01-24 Thread Nordlund, Dan (DSHS/RDA)
Marc You have been given the answer already and a solution. See the R FAQ 7.31. As you have discovered this issue is not specific to R. In order to eliminate this "problem" entirely, you will need a computer system with infinite precision. Dan Daniel J. Nordlund Washington State Departmen

Re: [R] Setting bioconductor repository in .Rprofile. Is there a permanent way?

2011-01-24 Thread Henrik Bengtsson
It is easier than that. Use http://www.bioconductor.org/packages/release/bioc or http://www.bioconductor.org/packages/devel/bioc /Henrik On Mon, Jan 24, 2011 at 10:56 AM, Martin Morgan wrote: > On 01/24/2011 10:45 AM, Kevin Wright wrote: >> I currently set the Bioconductor repository in my .

Re: [R] Find the sign

2011-01-24 Thread Francesco Petrogalli
if (x*y>0) {...} On Mon, Jan 24, 2011 at 1:27 PM, Rainer Schuermann wrote: > On Monday, January 24, 2011 07:18:03 pm Alaios wrote: >> Hello :) >> I wanted to right an expression to check when x and y have the same sign >> and I wrote the following: >> >>  if ((x<0 && y<0) || (x>0 && y>0)) >> >> w

Re: [R] Setting bioconductor repository in .Rprofile. Is there a permanent way?

2011-01-24 Thread Kevin Wright
Of course, before posting my question, I did RTFM and RTFcode and RTFmailinglists. The key word in my question was "simpler". I rejected copying a modified version of the "repositories" file to my home directory since it has changed numerous times with addition of "R-forge" etc. Here is another

Re: [R] sensitivity logical operators in R

2011-01-24 Thread Marc Jekel
Hi again, I have checked the same code (see below) using MATLAB. It produces the same error (i.e., equal numbers are evaluated as unequal). Do I miss something? Thanks for help! Marc Marc Jekel schrieb: Hello R Fans, Another question for the community that really frightened me today. The

Re: [R] error with source(): invalid 'times' value

2011-01-24 Thread Duncan Murdoch
On 11-01-24 12:07 PM, Matthieu Stigler wrote: hi I am seeing a strange behavior I can't understand... doing: > source("/tmp/RFile.r",echo=TRUE) Error in rep.int(c(prompt.echo, continue.echo), c(leading, length(dep) - : invalid 'times' value > traceback() 3: rep.int(c(prompt.echo, con

Re: [R] how many records can R handle

2011-01-24 Thread jim holtman
Exactly what do you want to do with the data? It is 5M rows with 100 columns of data? Do you want to read it all in at once? If so, and if they are numeric, you will need 4GB to hold one copy, and be running on a 64-bit version of R. If you want to do any processing with everything in memory, I

Re: [R] Setting bioconductor repository in .Rprofile. Is there a permanent way?

2011-01-24 Thread Martin Morgan
On 01/24/2011 10:45 AM, Kevin Wright wrote: > I currently set the Bioconductor repository in my .Rprofile using this > code (which needs editing for every version number change of > Bioconductor): > > # Choose repositories > repos <- structure(c(CRAN="http://streaming.stat.iastate.edu/CRAN";, >

Re: [R] crazy loop error.

2011-01-24 Thread Erik Iverson
Roy, I have no idea what you're actually trying to do here, but it looks like there would be a more natural R'ish way if you're concerned about grouping consecutive elements of 'a'. At any rate, within your while loop, you're incrementing n by 1, and eventually n will be 10, which will be transf

Re: [R] error with source(): invalid 'times' value

2011-01-24 Thread William Dunlap
Put a space after the # in the line #line 516 to avoid the problem. A similar problem also appears in parse(). > parse(text="#line 102\nlog(pi)\n") Error in `Encoding<-`(`*tmp*`, value = character(0)) : 'value' must be of positive length > parse(text="# line 102\nlog(pi)\n") expressio

[R] Setting bioconductor repository in .Rprofile. Is there a permanent way?

2011-01-24 Thread Kevin Wright
I currently set the Bioconductor repository in my .Rprofile using this code (which needs editing for every version number change of Bioconductor): # Choose repositories repos <- structure(c(CRAN="http://streaming.stat.iastate.edu/CRAN";, CRANextra="http://www.stats.ox.ac.uk/pu

[R] crazy loop error.

2011-01-24 Thread Roy Mathew
Dear R-users, This is a loop which is part of a bigger script. I managed to isolate the error in this loop and simplified it to the bare minimum and made it self-contained. a<-c(2,3,4,5,5,5,6,6,6,7) for(n in 1:10) { print(paste("n: ",n)) z1<-a[n] #make a list container ldata<-list() t=1 while(z1

Re: [R] Train error:: subscript out of bonds

2011-01-24 Thread jim holtman
put options(error=utils::recover) in the script and when the error occurs use the browser to examine the values to see where the error is. On Mon, Jan 24, 2011 at 12:44 PM, Neeti wrote: > > Hi, > I am trying to construct a svmpoly model using the "caret" package (please > see code below). Usin

[R] R factorial microarray analysis with a looped design

2011-01-24 Thread meyer.ann
Hi I'm using the Limma package to analyze microarray data from a 2x2 factorial loop design. u --- t ll ll v --- v.t The samples hybridized to my arrays are: u/t, t/v.t, v.t/t, v.t/v, v/u, and u/v. My design matrix is: v t v.t v 1 0 0 t 0 1 0 v+

[R] tolerance limits for nls predicted values

2011-01-24 Thread Grant M Domke
Greetings, I would like to calculate tolerancelimits for a series of predicted values from nonlinear regression models. I've been using the tolerance package but the self-starting functions are not in the derivitive tables. When I spellout the functions and supply starting values I repeatedly

[R] ggplot2 - ribbon

2011-01-24 Thread Sam
Dear List, I am having trouble setting the transparency of a ribbon in ggplot2 and was wondering if anybody had any suggestions so far i have a plot exactly as i want it and i want to add a ribbon connecting the ymax and ymin, whci i do with the following command m10 + stat_summary(geom="rib

[R] Train error:: subscript out of bonds

2011-01-24 Thread Neeti
Hi, I am trying to construct a svmpoly model using the "caret" package (please see code below). Using the same data, without changing any setting, I am just changing the seed value. Sometimes it constructs the model successfully, and sometimes I get an “Error in indexes[[j]] : subscript out of bou

[R] how to get loglik parameter from splm package?

2011-01-24 Thread zhaowei
splm package is a r implemention of spatial panel data models. and the loglik paremeter is most important infomation for splm methods. but i found the loglik always been null ,it's craze to get right estimation in splm with null loglik. Any one knows the splm package and can get the right logl

[R] how many records can R handle

2011-01-24 Thread Richard White
How many records can the R recursive partitioning software handle? We are analyzing 5,000,000 medical records looking at 100 risk factors for the outcome of interest Richard H. White, MD Hibbard E. Williams Endowed Professor of Medicine Chief, Division of General Medicine DIrector, Antic

Re: [R] Problem with factor analysis

2011-01-24 Thread Mark Difford
>> Does anyone know what I am doing wrong? Could be a lot or could be a little, but we have to guess, because you haven't given us the important information. That you are following Crawley is of little or no interest. We need to know what _you_ did. What is "model" and what's in it? ## str(mode

[R] Relative Importance Package question

2011-01-24 Thread Paul Rheeder
I have installed the latest relaimpo library ( form their website with the 8 functions) When running pvmd as a type in c=type("pmvd") in calc.relimp I get the error message ...could not find function "pmvdcalc" (this is in R version 2.12.1) Can anyone help? Paul Prof P Rheeder School of Health

Re: [R] Find the sign

2011-01-24 Thread Rainer Schuermann
On Monday, January 24, 2011 07:18:03 pm Alaios wrote: > Hello :) > I wanted to right an expression to check when x and y have the same sign > and I wrote the following: > > if ((x<0 && y<0) || (x>0 && y>0)) > > which looks pretty ugly to me. > > Can you please suggest me a better way for that?

Re: [R] Find the sign

2011-01-24 Thread Henrique Dallazuanna
Try this: !diff(sign(c(x, y))) On Mon, Jan 24, 2011 at 4:18 PM, Alaios wrote: > Hello :) > I wanted to right an expression to check when x and y have the same sign > and I wrote the following: > > if ((x<0 && y<0) || (x>0 && y>0)) > > which looks pretty ugly to me. > > Can you please suggest

Re: [R] error with source(): invalid 'times' value

2011-01-24 Thread jim holtman
Do 'str(dep)' to see what dep is and where it comes from. If you have the 'options' set as I suggested, you can do this examination when the error occurs. On Mon, Jan 24, 2011 at 12:41 PM, Matthieu Stigler wrote: > ok, thanks Jim > > The problem comes from length(dep)> length(dep) > [1] 183 > >

[R] Find the sign

2011-01-24 Thread Alaios
Hello :) I wanted to right an expression to check when x and y have the same sign and I wrote the following: if ((x<0 && y<0) || (x>0 && y>0)) which looks pretty ugly to me. Can you please suggest me a better way for that? Regards Alex __ R-help@r-

[R] sm.density.compare, date on x axis?

2011-01-24 Thread Claudia Penaloza
Is it possible to generate a density plot comparing several (6 or 7) groups of data and have the x-axis in date format (e.g.: "%d%b", 10Mar)? When I try to input the data in date format I get an error saying "this function only allows 1-d data". Thank you, Claudia [[alternative HTML vers

Re: [R] error with source(): invalid 'times' value

2011-01-24 Thread Gabor Grothendieck
On Mon, Jan 24, 2011 at 12:29 PM, Matthieu Stigler wrote: > Le 24. 01. 11 18:22, Gabor Grothendieck a écrit : >> >> On Mon, Jan 24, 2011 at 12:07 PM, Matthieu Stigler >>  wrote: >>> >>> hi >>> >>> I am seeing a strange behavior I can't understand... doing: >>> source("/tmp/RFile.r",echo=TRUE

Re: [R] error with source(): invalid 'times' value

2011-01-24 Thread Matthieu Stigler
ok, thanks Jim The problem comes from length(dep) length(dep) [1] 183 c(leading, length(dep) - leading) [1] 516 -333 But 183 seems to be the right number: $ wc -l /tmp/RFile.r 183 /tmp/RFile.r So now need to understand what is this "dep", and why it has a bigger length... tried to check sour

Re: [R] error with source(): invalid 'times' value

2011-01-24 Thread jim holtman
It sounds like you have some invalid expressions. Dump out the values of 'leading' and 'length(dep) - leading'. Learn some simple debugging techniques. One is to set options(error=utils::recover) so that on the error you can use the browser to examine what the values are. On Mon, Jan 24, 2011

Re: [R] Implementing step-wise linear regression

2011-01-24 Thread Bert Gunter
FWIW, I think it fair to say that modern statistical practice generally views stepwise regression as a bad idea, especially in the hands of non-experts lke yourself. The procedures you describe are "dangerous": they have an uncomfortably high chance of choosing the wrong variables and leading to wi

Re: [R] error with source(): invalid 'times' value

2011-01-24 Thread Matthieu Stigler
Le 24. 01. 11 18:22, Gabor Grothendieck a écrit : On Mon, Jan 24, 2011 at 12:07 PM, Matthieu Stigler wrote: hi I am seeing a strange behavior I can't understand... doing: source("/tmp/RFile.r",echo=TRUE) Error in rep.int(c(prompt.echo, continue.echo), c(leading, length(dep) - : invalid

Re: [R] error with source(): invalid 'times' value

2011-01-24 Thread Gabor Grothendieck
On Mon, Jan 24, 2011 at 12:07 PM, Matthieu Stigler wrote: > hi > > I am seeing a strange behavior I can't understand... doing: > >> source("/tmp/RFile.r",echo=TRUE) > Error in rep.int(c(prompt.echo, continue.echo), c(leading, length(dep) -  : >  invalid 'times' value >> traceback() > 3: rep.int(c(

[R] pairs(), no axis labels/values for upper panel?

2011-01-24 Thread Steffen Fleischer
Dear all, I want to draw a graph that contains the scatterplot matrix in the lower panel and coefficients in the upper panel. I used and adapted the example for the function pairs but cannot figure out how to get no values and ticks in the upper panel (the values should only be in the lower pan

[R] error with source(): invalid 'times' value

2011-01-24 Thread Matthieu Stigler
hi I am seeing a strange behavior I can't understand... doing: > source("/tmp/RFile.r",echo=TRUE) Error in rep.int(c(prompt.echo, continue.echo), c(leading, length(dep) - : invalid 'times' value > traceback() 3: rep.int(c(prompt.echo, continue.echo), c(leading, length(dep) - leading))

Re: [R] Linear mixed model: question about t-values

2011-01-24 Thread Ben Bolker
Kostenko, Olga nioo.knaw.nl> writes: > I have a question about the output of linear mixed model fitted in R > using nlme package. In particular, what are the t-values that are given > in an output, how are they calculated and based on what test? I guess it > cannot be a simple Student t-test, oth

Re: [R] Help with expression

2011-01-24 Thread David Scott
Thanks. Exactly what I wanted. As usual, I played around with all sorts of things to try and get the expression right, but never thought of as.name. David Scott On 25/01/2011 4:32 a.m., Charles C. Berry wrote: On Tue, 25 Jan 2011, David Scott wrote: I have a problem with expressions. I am

Re: [R] Ordering box plots

2011-01-24 Thread Stuart Luppescu
On Sun, 2011-01-23 at 17:37 -0600, Stuart Luppescu wrote: [snip] Thanks to Ben and Dennis for their help, but right after I sent the original message, I figured out how to solve my problem. I noticed that boxplot() contains the at= argument. To get the box locations, I used a line like this: box.l

Re: [R] Help with expression

2011-01-24 Thread Charles C. Berry
On Tue, 25 Jan 2011, David Scott wrote: I have a problem with expressions. I am trying to create a title where the parameter of interest is displayed as a Greek character. Which parameter is being considered is stored in a character variable. As an example, if I have param <- "alpha" param

Re: [R] How to measure/rank "variable importance" when using rpart?

2011-01-24 Thread Liaw, Andy
Check out caret::varImp.rpart(). It's described in the original CART book. Andy From: Tal Galili > > Hello all, > > When building a CART model (specifically classification tree) > using rpart, > it is sometimes interesting to know what is the importance of > the various > variables introduc

Re: [R] How to carry out a hierarchical cluster analysis

2011-01-24 Thread Tal Galili
This is a nice tutorial on doing this: http://www.r-tutor.com/gpu-computing/clustering/hierarchical-cluster-analysis Contact Details:--- Contact me: t

Re: [R] How to measure/rank ?variable importance when using rpart?

2011-01-24 Thread Tal Galili
Hi Terry, I've actually already written such a function (based on an old similar question I once asked on this list), which I attached bellow to this e-mail. But I have a few problems with my function: 1) I wasn't sure how to include the surrogate variable importance level into the function (ho

Re: [R] How to measure/rank ?variable importance when using rpart?

2011-01-24 Thread Terry Therneau
--- included message Thus, my question is: *What common measures exists for ranking/measuring variable importance of participating variables in a CART model? And how can this be computed using R (for example, when using the rpart package)* ---end Consider the following printout from rpa

[R] Help with expression

2011-01-24 Thread David Scott
I have a problem with expressions. I am trying to create a title where the parameter of interest is displayed as a Greek character. Which parameter is being considered is stored in a character variable. As an example, if I have param <- "alpha" and then do plot(0, 0, main = bquote(Parameter=

[R] How to simulate a variable Xt=Wit+0.5Wit-1 with Wit~U(0,2)

2011-01-24 Thread carpan
Dear all I simulate a panel data: n <- 10 t <- 5 nt <- n*t pData <- data.frame(id = rep(paste("JohnDoe", 1:n, sep = "."), each = t),time = rep(1981:1985, n)) rho <-0.99#simulate alphai corelated with the xi print(rho) alphai <- rnorm(n,mean=0,sd=1)#alphai simulation x<- as.matrix(rnorm(n

[R] lm() and post hoc test

2011-01-24 Thread nutini . francesco
Dear Alex, I have read your question about post-hoc test: "Let's assume that according to Anova(lm(y~a*b, data=d)) the a:b interaction is significant, and I would like to know if there are specific combinations of a and b levels that differ from the control group. Are there any caveats against

Re: [R] Offset - usersplits function package RPART

2011-01-24 Thread Terry Therneau
> What is the meaning of offset? As in glm() an offset is a variable on the right hand side of the equation that is a fixed part of the predictor. When doing linear regression, or rpart with continuous Y, there is no need for an offset; adding +offset(x3) on the right hand side of the equation

[R] LTA

2011-01-24 Thread Sebastián Daza
Hi everyone, Does anyone know if there is a package to run Latent Transitional Analysis using R? Regards! -- Sebastián Daza sebastian.d...@gmail.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

[R] augPred and NAs

2011-01-24 Thread Morten Gram Pedersen
I have a problem using augPred from the nlme package on a data set with NAs. Consider this example, modified from the augPred help page: > library(nlme) > Orthodont[100,]$age=NA Insert NA somewhere in the data set > fm1 <- lme(Orthodont, random = ~1,na.action=na.exclude) Can still

[R] Detrended fluctuation analysis

2011-01-24 Thread ctlai
Hi All I was using the DFA() in the fractal package to examine a set of time series data. And I was not sure what the H estimate meant from the summary table. is it the alpha of the power law equation? __ R-help@r-project.org mailing list https://st

[R] arima/arima0 function

2011-01-24 Thread Christoph Ortlieb
does the arima/arima0 function use the state space form of the model equation even when fitting with the "CSS"-method? regards Christoph [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman

[R] Problem with factor analysis

2011-01-24 Thread Simon Hayward
Hi all, I am using the example on page 737 of "The R Book" by Michael J Crawley, to plot factor loadings against each other (in a multivariate analysis). However the following line code plot(loadings(model)[,1],loadings(model)[,2],pch=16,xlab="Factor 1", ylab="Factor 2") throws a

[R] Linear mixed model: question about t-values

2011-01-24 Thread Kostenko, Olga
Dear all, I have a question about the output of linear mixed model fitted in R using nlme package. In particular, what are the t-values that are given in an output, how are they calculated and based on what test? I guess it cannot be a simple Student t-test, otherwise how can the simple Student t-

[R] writeRaster with raster package

2011-01-24 Thread ben
Hello, I have a problem writing a raster with the raster package. I have the raster object "mask" which has the following geoinformation: R output > mask class : RasterLayer filename: E:/Daten/FE/HyMAP/Luxembourg_2010/Kehlen_Useldange/mosaik/LUX_LC_noOverlap_mask nrow: 51

Re: [R] Problem reading PostgreSQL data with RODBC

2011-01-24 Thread Bart Joosen
I think this is a problem with quotes. If you look good, you see: seiz.df <- sqlFetch(chnl, 'source.MAIN') ... 'source.main': table not found on channel You asked "MAIN", but your db can't find "main". If you use seiz.df <- sqlFetch(chnl, '\"source\".\"MAIN\"') , you problem should be gone.

Re: [R] Function comparable to cutpt.coxph from "Survival Analysis using S"

2011-01-24 Thread Terry Therneau
Quoting Frank H: "These relationships rarely occur in nature..." I agree; I have seen cutpoint relationships only a handful of times in 25 years of medical work. A better approach is to look at the data using a smoothing spline: options(na.action=na.exclude) fit <- coxph(Surv(time,st

[R] How to carry out a hierarchical cluster analysis

2011-01-24 Thread Juan Andres Hernandez
I would appreciate any information about how to carry out a hierarchical cluster analysis with cluster of subjects. I need to find cluster of subjects that share many variables. I know that fcp package have a lot of options to carry out the regular hierarchical cluster analysis (cluster of variable

Re: [R] Implementing step-wise linear regression

2011-01-24 Thread Ben Bolker
Tal Galili gmail.com> writes: > > Hello Troy. > > A tiny question (without answering your question), why did you choose to do > it this way instead of using > ?step > or > ?stepAIC > > ? [snip snip] > > My questions are: > > > > Should I be using var.test to run the F-test to decide which

Re: [R] Extracting information from text data

2011-01-24 Thread Peter Ehlers
On 2011-01-23 19:28, Deb Midya wrote: Hi R-Users, Thanks in advance. I am using R-2.12.0 on Windows XP. I am trying to produce an n X m matrix from text data stored in different files. Where n = number of words (say w1, w2, …, wn). M is the number of documents (say d1, d2, …, dm) A. Using p

Re: [R] using loglog link in VGAM or creating loglog link for GLM

2011-01-24 Thread Gavin Simpson
On Sun, 2011-01-23 at 10:56 -0800, torbjore wrote: > I think you guys make it more difficult than it has to be. Estimating > probability of success with a loglog-link is equivalent to estimating > probability of failure with a cloglog-link, so all you have to do is to > change the response variable

Re: [R] Passing in arguments into function

2011-01-24 Thread Henrique Dallazuanna
Isn't necessary a formula, but a class that could be coerced to that class: x <- rnorm(100) y <- rnorm(100) z <- rnorm(100) lm("x ~ y + z") On Sun, Jan 23, 2011 at 2:46 PM, Paul Evans wrote: > Hi, > > I had a function that looked like: > > diff <- lm(x ~ y + z) > > How can I pass the argument

Re: [R] how to slice a zoo object

2011-01-24 Thread Blair Sutton
My previous post had a typo. So as not to confuse future readers of the list it should have read ZOO_OBJ[,cbind("COL2", "COL5")]. Thanks Gabor. On Mon, Jan 24, 2011 at 10:54 AM, Blair Sutton wrote: > I've solved my own problem using ZOO_OBJ[,"COL2", "COL5"]. The trick > was preceding the list o

Re: [R] how to slice a zoo object

2011-01-24 Thread Gabor Grothendieck
On Mon, Jan 24, 2011 at 4:51 AM, Blair Sutton wrote: > Hi > > Would anyone have any pointers on how to slice up a large zoo table. I > have the following structure: - > >> str(ZOO_OBJ) >  zoo [1:632, 1:83] 30.4 30.4 30.4 30.4 30.3 ... >  - attr(*, "dimnames")=List of 2 >   ..$ : NULL >   ..$ : chr

Re: [R] how to slice a zoo object

2011-01-24 Thread Blair Sutton
I've solved my own problem using ZOO_OBJ[,"COL2", "COL5"]. The trick was preceding the list of names with a comma as described in the standard ts document. On Mon, Jan 24, 2011 at 9:51 AM, Blair Sutton wrote: > Hi > > Would anyone have any pointers on how to slice up a large zoo table. I > have t

  1   2   >