Re: [R] Help LSD multiple comparison test

2009-06-23 Thread Dieter Menne
Chunhao Tu wrote: > > I know this is a old question but I did not see any clear answer. Is there > any way or package to perform LSD test in R such as H0: A=B. H0, A=C and > H0 B=C. > Package agricolae. Dieter -- View this message in context: http://www.nabble.com/Help-LSD-multiple-compa

Re: [R] curvedarrow (some graphics problem)

2009-06-23 Thread casperyc
[quote]> grid.text("t", x=0.3, y=unit(-1, "line"), vp=vp2) Error in valid.units(units) : Invalid unit > grid.text("s", 0.8, unit(-1, "line"), gp=gpar(col="red"), vp=vp2) Error in valid.units(units) : Invalid unit[/quote] Hi, I have loaded the [grid] package. It seems that I have to load anoth

[R] Help LSD multiple comparison test

2009-06-23 Thread Chunhao Tu
Hi R users, I know this is a old question but I did not see any clear answer. Is there any way or package to perform LSD test in R such as H0: A=B. H0, A=C and H0 B=C. Thank you in advance Tu -- View this message in context: http://www.nabble.com/Help-LSD-multiple-comparison-test-tp24178161p24

Re: [R] Plot with a vertical line at zero on x axis

2009-06-23 Thread legen
I got it. Thank you very mcuh. Legen jholtman wrote: > > You need to specify the xlim: > > y<-c(0.037790309,0.020307312,0.021109653,0.050216689, > 0.026979484,0.027619193,0.024070163,0.021996969, > 0.007831769,0.020065109,0.005903177,0.008182403) > d<-data.frame(cbind(y,seq(1:12))) >

Re: [R] curvedarrow (some graphics problem)

2009-06-23 Thread casperyc
baptiste auguie-4 wrote: > > Hi, > > Grid offers several functions to help drawing such graphs, > > see Paul Murrell's "Can R Draw Graphs? " (useR! 2006) > > I came up with this, as a quick example, > > vp <- viewport( > x = unit(0, "npc"), > y = unit(0, "npc"), > just = c("left", "bottom

Re: [R] lapply across using multiple columns

2009-06-23 Thread Kingsford Jones
try: dfr <- data.frame(A=rnorm(50), B=runif(50), X=factor(sample(c('L1','L2'),50,repl=TRUE))) by(dfr[, 1:2], dfr$X, mean) hth, Kingsford Jones On Tue, Jun 23, 2009 at 7:57 PM, R_help Help wrote: > Hi, > > To set a simple an clear picture of what I'd like to do, here is an example. > I wou

Re: [R] lapply across using multiple columns

2009-06-23 Thread Henrique Dallazuanna
If I understand, you can try this: DF <- data.frame(X = rep(1:3, each = 4), A = rnorm(12), B = rnorm(12)) aggregate(DF[,c("A", "B")], list(DF$X), mean) On Tue, Jun 23, 2009 at 10:57 PM, R_help Help wrote: > Hi, > > To set a simple an clear picture of what I'd like to do, here is an > example. >

Re: [R] Long to wide format without time variable

2009-06-23 Thread Rolf Turner
On 24/06/2009, at 9:52 AM, Alan Cohen wrote: Hi all, I am trying to convert a data set of physician death codings (each individual's cause of death is coded by multiple physicians) from long to wide format, but the "reshape" function doesn't seem to work because it requires a "time" vari

Re: [R] Rscript segfaults with lazy loading

2009-06-23 Thread Dirk Eddelbuettel
Gad, On 24 June 2009 at 11:43, Gad Abraham wrote: | Hi, | | I have an RData file containing a GeneSetCollection object | (Bioconductor), http://www.cs.mu.oz.au/~gabraham/c2.RData. I think it | uses lazy loading because packages are only loaded when I access the | object (see below) in the R c

[R] lapply across using multiple columns

2009-06-23 Thread R_help Help
Hi, To set a simple an clear picture of what I'd like to do, here is an example. I would like to calculate mean of column A and B bucketed by factor in column X in a data.frame. lapply or aggregate operates on a single column. I found dapply function in some package which doesn't seem to exist any

[R] Rscript segfaults with lazy loading

2009-06-23 Thread Gad Abraham
Hi, I have an RData file containing a GeneSetCollection object (Bioconductor), http://www.cs.mu.oz.au/~gabraham/c2.RData. I think it uses lazy loading because packages are only loaded when I access the object (see below) in the R console. When I try the same with Rscript, it segfaults. This

Re: [R] first value...

2009-06-23 Thread Carl Witthoft
The various which(is.na) sort of things are fine, but this problem is just screaming to be solved with rle(). Just do rle(is.na(inc))$lengths[1]+1 > On Tue, Jun 23, 2009 at 11:00 AM, Alfredo Alessandrini > wrote: > > > Hi, > > > > I've a vector like this: > > > > > inc > > [1]N

Re: [R] Identify groups by character point in xyplot legend

2009-06-23 Thread Deepayan Sarkar
On Tue, Jun 23, 2009 at 1:38 PM, nmset wrote: > > http://www.nabble.com/file/p24173983/groups.csv groups.csv > http://www.nabble.com/file/p24173983/groups.r groups.r > > Hello, > > Points of an xyplot can be identified to a particular group according to > 'sunflowers', a different one per group. Ho

Re: [R] Customize axis labels in xyplot

2009-06-23 Thread Deepayan Sarkar
On Mon, Jun 22, 2009 at 1:54 AM, nmset wrote: > > I have attached 2 files sample.csv and sample.r to illustrate the problem. No attachments came through. -Deepayan __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] How to exclude insignificant intercepts using "step" function

2009-06-23 Thread Chris Friedl
Dieter Menne wrote: > > > > David Winsemius wrote: >> >> >> On Jun 23, 2009, at 3:08 AM, Chris Friedl wrote: >> The point is that in very few applications can one legitimately >> "exclude" an intercept. In this situation (stepwise regression) I am >> able to think of a way to make the i

[R] looping problem

2009-06-23 Thread Roslina Zakaria
Hi R-users,   I have this code below and use some code from sn package for multivariate skew t (rmst) to generate a set of random numbers.   I try to do a looping to produce ‘rand’ for different values of degrees of freedom (degf).  Actually, I’m not sure how to specify the attribut

Re: [R] ask for help xyplot

2009-06-23 Thread Daniel Malter
Aimin, please provide self-contained code. This is not "data" but a printed table. Next time, provide real or simulated data in a way that it can be copied directly into R or an R editor. Also, it is quite impossible to tell from your question how you want to plot it. The grouping is not the proble

Re: [R] Rainbow Colored Scatter Plot

2009-06-23 Thread Duncan Murdoch
On 23/06/2009 7:06 PM, Patrick Gedeon wrote: Hello, I have created a 3d scatter plot using the plot3d command in the rgl package. I have approximately 6500 data points in the scatter plot. I would like to color these points sequentially using the entire color spectrum. (So the first point is red

Re: [R] How to exclude insignificant intercepts using "step" function

2009-06-23 Thread Chris Friedl
David Winsemius wrote: > > > OK, this is on your head. Make sure you know how not to burn yourself > with this: > > > model <- y ~ x1*x2 + one -1 > > data2$one <- 1 > > by(data2, data2$grp, function(x) step(lm(model, data=x))) > > Lets the intercept just be another variable. > > > Dav

[R] Rainbow Colored Scatter Plot

2009-06-23 Thread Patrick Gedeon
Hello, I have created a 3d scatter plot using the plot3d command in the rgl package. I have approximately 6500 data points in the scatter plot. I would like to color these points sequentially using the entire color spectrum. (So the first point is red, next point slightly different, and each point

Re: [R] Problem with ifelse statement

2009-06-23 Thread Daniel Malter
The following works: socstat=rep(c("A","B","D","E"),each=100) male=rep(1:4,100) socstat2=ifelse(socstat=="B"&male==4,"C",socstat) Therefore, your code should work if it were the code you want (in other words, it's a logic not a coding problem). Your mistake is that you recode ALL social statuses

Re: [R] driver file

2009-06-23 Thread jim holtman
Your driver file should probably look like: # setup the parameters ... source('file1.r') source('file.2.r') ...all the rest of your files On Tue, Jun 23, 2009 at 3:05 PM, Derek Lacoursiere wrote: > > Hi, > > How can I, from a single "driver" file, source other files in such a way > that I

Re: [R] Problem with ifelse statement

2009-06-23 Thread jim holtman
Notice what happens in your 'ifelse': any row that does not meet the condition is changed to "B"; that is probably not what you were expecting. You probably want: data$SOCIAL_STATUS<-ifelse(data$SOCIAL_STATUS=="B" & data$MALE>4, "C", data$SOCIAL_STATUS) so you leave the others unchanged. On Tu

Re: [R] Weighting column entries in a data frame

2009-06-23 Thread jim holtman
Try this: > fdata state statenum yearincome popul 1 ALABAMA11 9.703193 3973 2 ALABAMA12 9.745950 3992 3 ALABAMA13 9.762092 4015 4 ALASKA21 10.221640 532 5 ALASKA22 10.169600 544 6 ALASKA23 10.101300 539

[R] Problem with ifelse statement

2009-06-23 Thread Mark Na
Hi R-helpers, I am trying to use this ifelse statement to recode a variable: > data$SOCIAL_STATUS<-ifelse(data$SOCIAL_STATUS=="B" & data$MALE>4, "C", "B") (i.e., if social status is B and there are more than 4 males, then recode social status to C; otherwise, leave it B) But, it's not working. S

Re: [R] Plot with a vertical line at zero on x axis

2009-06-23 Thread jim holtman
You need to specify the xlim: y<-c(0.037790309,0.020307312,0.021109653,0.050216689, 0.026979484,0.027619193,0.024070163,0.021996969, 0.007831769,0.020065109,0.005903177,0.008182403) d<-data.frame(cbind(y,seq(1:12))) colnames(d)<-c("y","x") #--attach(d) plot(d$y,d$x,xlab="",ylab="",axes=F,

Re: [R] Long to wide format without time variable

2009-06-23 Thread jim holtman
This should do it: > x id COD MDid 1 1 A011 2 2 A022 3 3 A033 4 4 A044 5 5 A055 6 1 B016 7 2 A023 8 3 B035 9 4 B047 10 5 A052 > # max number of columns > maxCol <- max(table(x$id)) > # now create the output > y <- lapply(split(x, x$id),

[R] www.rpad.org

2009-06-23 Thread David Katz
I've noticed this website has been down for several days. Does anyone have any information on whether/when it is coming back? Thanks. -- View this message in context: http://www.nabble.com/www.rpad.org-tp24175392p24175392.html Sent from the R help mailing list archive at Nabble.com. ___

[R] Plot with a vertical line at zero on x axis

2009-06-23 Thread legen
Hallo, All, I cannot add one straight vertical line at 0.0 on x axis using the following data and R code: y<-c(0.037790309,0.020307312,0.021109653,0.050216689, 0.026979484,0.027619193,0.024070163,0.021996969, 0.007831769,0.020065109,0.005903177,0.008182403) d<-data.frame(cbind(y,seq(1

[R] ask for help xyplot

2009-06-23 Thread jlfmssm
I want to make such plot using the following data set plot Mean with Sd(+/-) by Dim group by Lac here is data Does anyone know how to plot using xyploy Thanks, Aimin Mean Sd Var Min Max Dim Lac 704 44.0 NA NA 44.0 44.0 -30 3 703 45.9200

Re: [R] question about package biomaRt

2009-06-23 Thread James W. MacDonald
Again, please refrain from crossposting. mau...@alice.it wrote: Can biomaRt connect to data base "http://mirecords.umn.edu"; or a branch of it ... for instance the validated miRNAs list ..? The mirecords website isn't a Biomart, so no. Jim Thank you very much. Maura tutti i telefonini

[R] Long to wide format without time variable

2009-06-23 Thread Alan Cohen
Hi all, I am trying to convert a data set of physician death codings (each individual's cause of death is coded by multiple physicians) from long to wide format, but the "reshape" function doesn't seem to work because it requires a "time" variable to identify the sequence among the repeated obs

Re: [R] Spatial Statistics on Grids

2009-06-23 Thread Jonathan Greenberg
Peter: Definitely check out the sp package and the rgdal package -- these will allow you ACCESS to the raster data, but can you be more specific about what sort of "spatial distributions" you are talking about? There are a lot of "non-spatial" packages in R which could be used to generate the

Re: [R] Apply as.factor (or as.numeric etc) to multiple columns

2009-06-23 Thread baptiste auguie
Wacek helped me out on a similar topic a while back, ize = function (d, columns = names(d), izer = as.factor) { d[columns] = lapply(d[columns], izer) d } d = data.frame(x=1:10, y=1:10, z =1:10) str( ize(d, 'y') ) # y is now a factor str( ize(d, 1:2, `cumsum`) ) # x and y are affected etc

Re: [R] Apply as.factor (or as.numeric etc) to multiple columns

2009-06-23 Thread Gabor Grothendieck
Try this: ix <- 2:5 DF[ix] <- lapply(DF[ix], as.numeric) nms <- c("x", "y") DF[nms] <- lapply(DF[nms], as.factor) On Tue, Jun 23, 2009 at 5:23 PM, Mark Na wrote: > Hi R-helpers, > > I have a dataframe with 60columns and I would like to convert several > columns to factor, others to numeric, and

Re: [R] Apply as.factor (or as.numeric etc) to multiple columns

2009-06-23 Thread hadley wickham
Hi Mark, Have a look at colwise (and numcolwise and catcolwise) in the plyr package. Hadley On Tue, Jun 23, 2009 at 4:23 PM, Mark Na wrote: > Hi R-helpers, > > I have a dataframe with 60columns and I would like to convert several > columns to factor, others to numeric, and yet others to dates. R

Re: [R] Spatial Statistics on Grids

2009-06-23 Thread Don MacQueen
This might be a good question to take to R-sig-geo. Have you looked at any of the R packages for spatial analysis? You can download their reference manuals, or go their websites, to try to figure out which one might be good. Or, go to the CRAN website, click on Task Views on the left, thence

[R] Apply as.factor (or as.numeric etc) to multiple columns

2009-06-23 Thread Mark Na
Hi R-helpers, I have a dataframe with 60columns and I would like to convert several columns to factor, others to numeric, and yet others to dates. Rather than having 60 lines like this: data$Var1<-as.factor(data$Var1) I wonder if it's possible to write one line of code (per data type, e.g. facto

Re: [R] SAS Macro Variable in R

2009-06-23 Thread Don MacQueen
I typically do something like this: nm <- 'TEF' ## split into multiple lines only to make it easier to read dpath <- paste('http:// ichart.yahoo.com/table.csv?s=', nm, '.MC&a=00&b=1&c=2003&d=05&e=23&f=2009&g=d&ignore=.csv', sep='') download.file( dpath, 'c:\\projects\

Re: [R] curvedarrow (some graphics problem)

2009-06-23 Thread Paul Murrell
Hi baptiste auguie wrote: Hi, Grid offers several functions to help drawing such graphs, see Paul Murrell's "Can R Draw Graphs? " (useR! 2006) The recent article in The R Journal http://journal.r-project.org/2009-1/RJournal_2009-1_Murrell.pdf might also be useful. Paul I came up with

Re: [R] values in graph points

2009-06-23 Thread David Winsemius
On Jun 23, 2009, at 5:04 PM, Romildo Martins wrote: Hello, How to add x values in graph points? Most people would call those y-points, nonetheless, you should be looking at: ?text Thanks a lot, Romildo x <- c(22.44, 20.14, 15.85, 15.97) plot(x, type="n", axes=FALSE, ann=FALSE, labels

[R] Identify groups by character point in xyplot legend

2009-06-23 Thread nmset
http://www.nabble.com/file/p24173983/groups.csv groups.csv http://www.nabble.com/file/p24173983/groups.r groups.r Hello, Points of an xyplot can be identified to a particular group according to 'sunflowers', a different one per group. However, this distinction does not appear in the legend gen

[R] Weighting column entries in a data frame

2009-06-23 Thread camillus
Hi Guys, I would like to weight column entries in a data frame by the population of each state. For example, here is some data: state statenum year incomepopul ALABAMA11 9.703193 3973.00 ALABAMA12 9.745950 3992.00 ALABAMA13 9.76209

[R] driver file

2009-06-23 Thread Derek Lacoursiere
Hi, How can I, from a single "driver" file, source other files in such a way that I can access their functions with parameters defined in my "driver" file? I wish to do this to avoid creating a single, self-contained but clunky piece of code. I have searched and found functions such as file(),

[R] Iteration : matrix multiplication / addition

2009-06-23 Thread Arnaud LE MENACH
Hi,   I am trying to perform recurrent matrix multiplication / addition, i.e Given a matrix X, I’d like to do the following: X + X %*% X + X %*% X %*% X + …  and so on. If I use X^n, it does not perform matrix multiplication but computes each element of the matrix   The only way I found to

Re: [R] Error in .subset(x, j) : only 0's may be mixed with negative subscripts

2009-06-23 Thread David Winsemius
On Jun 23, 2009, at 1:18 PM, Russell Ivory wrote: I have a data set called datastep4 with 211484 rows and 95 columns WHY ALL OF THE UNNEEDED EMPTY LINES??? dim(datastep4) [1] 211484 95 The first few column names are given below, note the first one is "RESPONDED" names(datastep4)[

[R] values in graph points

2009-06-23 Thread Romildo Martins
Hello, How to add x values in graph points? Thanks a lot, Romildo x <- c(22.44, 20.14, 15.85, 15.97) plot(x, type="n", axes=FALSE, ann=FALSE, labels=c(22.44, 20.14, 15.85, 15.97)) par(lwd=1) lines(x) points(x, pch=5, bg="grey", cex=1.5) axis(2, las=1) axis(1, at=1:4, lab=c("none", "50-50", "80-

Re: [R] SAS Macro Variable in R

2009-06-23 Thread Thomas Lumley
On Tue, 23 Jun 2009, David Young wrote: Hi I'm new to R and would like to implement a SAS-like macro variable in R. What I'd like to do is take the simple R code below and change the "=TEF" to different letters to refer to different companies' data for download. # DOWNLOADS FILES FROM YAHOO IN

[R] new R-wiki page: display image files

2009-06-23 Thread Robbie Morrison
Hello R-help My recent post on this topic has now been reworked and added to the R-wiki. http://wiki.r-project.org/rwiki/doku.php?id=tips:graphics-misc:display-images I am more than happy to take comments (on or off-line) and enter any relevant changes. Regarding the proposed R documentation

Re: [R] list.files(getwd()) and list.files(getwd(), full.names=TRUE) appear to return directory names

2009-06-23 Thread Romain Francois
Jason Rupert wrote: Is there any way to make list.files(getwd()) or list.files(getwd(),full.names=TRUE) stop returning directories? Right now both appear to return both file names and folders within the location. I would like for it only to return file names and not folders. I am using this

Re: [R] list.files(getwd()) and list.files(getwd(), full.names=TRUE) appear to return directory names

2009-06-23 Thread Duncan Murdoch
On 6/23/2009 3:06 PM, Jason Rupert wrote: Is there any way to make list.files(getwd()) or list.files(getwd(),full.names=TRUE) stop returning directories? Right now both appear to return both file names and folders within the location. I would like for it only to return file names and not fold

Re: [R] list.files(getwd()) and list.files(getwd(), full.names=TRUE) appear to return directory names

2009-06-23 Thread Henrique Dallazuanna
Try this: row.names(subset(file.info(list.files()), !isdir)) On Tue, Jun 23, 2009 at 4:06 PM, Jason Rupert wrote: > > Is there any way to make list.files(getwd()) or > list.files(getwd(),full.names=TRUE) stop returning directories? > > Right now both appear to return both file names and folders

[R] list.files(getwd()) and list.files(getwd(), full.names=TRUE) appear to return directory names

2009-06-23 Thread Jason Rupert
Is there any way to make list.files(getwd()) or list.files(getwd(),full.names=TRUE) stop returning directories? Right now both appear to return both file names and folders within the location. I would like for it only to return file names and not folders. I am using this on Windows with R

Re: [R] SAS Macro Variable in R

2009-06-23 Thread David Huffer
On Tuesday, June 23, 2009 1:40 PM, David Young wrote: > ...Hi I'm new to R and would like to > implement a SAS-like macro variable in R. > What I'd like to do is take the simple R > code below and change the "=TEF" to > different letters to refer to different > c

Re: [R] rmysql query help

2009-06-23 Thread jorgusch
Hello, Okay, this is a help for me too, thanks! However, how do I do it for two variables/entries in the database? Thanks jorgusch Aaron Sims wrote: > > R HELP, > > I am trying to use an R script to connect to a mysql database. I am > having a problem using a variable in the where clause

Re: [R] Spatial Statistics on Grids

2009-06-23 Thread David Winsemius
On Jun 23, 2009, at 1:29 PM, Peter Biber wrote: Thanks David, Actually, I googled quite some time before posting my question. I'm also aware, that there are many packages for spatial data analysis. However, I found no hint if any of them contains methods for characterizing (and I don't m

[R] Model fitting with GAM and "by" term

2009-06-23 Thread Paul Simonin
Hello R Users, I have a question regarding fitting a model with GAM{mgcv}. I have data from several predictor (X) variables I wish to use to develop a model to predict one Y variable. I am working with ecological data, so have data collected many times (about 20) over the course of two years. P

Re: [R] SAS Macro Variable in R

2009-06-23 Thread Henrique Dallazuanna
You can use sprintf: u <- sprintf(' http://ichart.yahoo.com/table.csv?s=%s.MC&a=00&b=1&c=2003&d=05&e=23&f=2009&g=d&ignore=.csv', "TEF") download.file(u, 'c:\\projects\\stock data\\data\\test.csv',quiet=TR

Re: [R] X-window graphics -- preventing window coming to front?

2009-06-23 Thread Barry Rowlingson
On Tue, Jun 23, 2009 at 6:03 PM, Steve Jaffe wrote: > > When I do dev.new(), the  resulting window comes to the front and grabs the > focus. Is there a way to prevent this so I can continue working in other > windows while the graphics are being produced? That's a function of your window manager,

[R] SAS Macro Variable in R

2009-06-23 Thread David Young
Hi I'm new to R and would like to implement a SAS-like macro variable in R. What I'd like to do is take the simple R code below and change the "=TEF" to different letters to refer to different companies' data for download. # DOWNLOADS FILES FROM YAHOO INTERNET download.file('http://ichart.yahoo.c

Re: [R] Using a variable for mysql/database Query

2009-06-23 Thread Dieter Menne
jorgusch web.de> writes: > Collecting data I need to check in a mysql server. As the data are dependent > on each other I have to filter first. > > However, I have now the problem that I find a value and would like to insert > it into a data query for the "real select" command. Obviously, typing

Re: [R] Spatial Statistics on Grids

2009-06-23 Thread Peter Biber
Thanks David, Actually, I googled quite some time before posting my question. I'm also aware, that there are many packages for spatial data analysis. However, I found no hint if any of them contains methods for characterizing (and I don't mean just plotting) the distribution (e.g. pure random, clu

[R] Error in .subset(x, j) : only 0's may be mixed with negative subscripts

2009-06-23 Thread Russell Ivory
I have a data set called datastep4 with 211484 rows and 95 columns > dim(datastep4) [1] 211484 95 The first few column names are given below, note the first one is "RESPONDED" > names(datastep4)[1:5] [1] "RESPONDED" "VAR_30""VAR_31""VAR_32""VAR_33" A table of RESP

[R] R: Cannot install pakages from Bioconductor besides the default installation

2009-06-23 Thread mauede
Yes it is. I copied and pasted all the attempted installation messages. The installed Bioconductor environment is the latest released. Just installed yesterday. The dependencies ... well, should be automatically resolved.- Thank you, Maura -Messaggio originale- Da: Martin Morgan [mailto

Re: [R] How to find b entries using xPath?

2009-06-23 Thread Duncan Temple Lang
g...@ucalgary.ca wrote: We got all rows by: library(XML) doc = htmlParse('http://www.statcan.gc.ca/daily-quotidien/090520/t090520b1-eng.htm') rows = xpathSApply(doc, '//table/tbody/tr') The last row is: row_last = rows[15] row_last [[1]] Unsmoothed composite leading indicator 221.8 218.4

[R] :psych - score.alpha "superseded" = deprecated/obsolete?

2009-06-23 Thread BbF
I'm new to R, and have just found that score.alpha gives me noticeably different Cronbach's Alpha values than score.items, when using the same data frame and (as much as possible) the same options. The help page for the former says its "superseded" by the latter. Is this similar to saying that

[R] X-window graphics -- preventing window coming to front?

2009-06-23 Thread Steve Jaffe
When I do dev.new(), the resulting window comes to the front and grabs the focus. Is there a way to prevent this so I can continue working in other windows while the graphics are being produced? Thanks -- View this message in context: http://www.nabble.com/X-window-graphicspreventing-wind

Re: [R] question about package biomaRt

2009-06-23 Thread Martin Morgan
Please ask Bioconductor questions on the Bioconductor mailing list https://stat.ethz.ch/mailman/listinfo/bioconductor Martin writes: > Can biomaRt connect to data base "http://mirecords.umn.edu"; or a branch of it > ... for instance the validated miRNAs list ..? > > Thank you very much. >

Re: [R] Cannot install pakages from Bioconductor besides the default installation

2009-06-23 Thread Martin Morgan
Please ask Bioconductor questions on the Bioconductor mailing list https://stat.ethz.ch/mailman/listinfo/bioconductor Is the below a complete transcript of the outcome of biocLite('biomaRt')? I would have expected to see R attempt to install each package, and then perhaps XML failing to compi

Re: [R] implementing Maximum Likelihood with distrMod when only the PDF is known

2009-06-23 Thread guillaume.martin
Dear Mathias, That's pretty amazing, thanks a lot ! I'll have to look all this through because I don't easily understand why each part has to be set up, in particular the "initialize method" part seems crucial and is not easy to intuit. From what I get, the actual name we give to a parameter (m

[R] [R-pkgs] plyr 0.1.9

2009-06-23 Thread Hadley Wickham
plyr is a set of tools for a common set of problems: you need to break down a big data structure into manageable pieces, operate on each piece and then put all the pieces back together. For example, you might want to: * fit the same model to subsets of a data frame * quickly calculate summary

Re: [R] an idiom to handle i'th element of a set of lists simultaneously

2009-06-23 Thread Rajarshi Guha
Thanks to all who replied. mapply does the trick On Tue, Jun 23, 2009 at 8:11 AM, Rajarshi Guha wrote: > Hi, I have 3 lists, x, y, z and I'd like to perform a calculation over all > the lists simultaneously. If it were a single list I could use lapply, but > for more than one list I'm using a for

Re: [R] plotting ROC from coefficient in the model

2009-06-23 Thread David Winsemius
On Jun 23, 2009, at 10:25 AM, sunny vic wrote: Hi everyone. Probably this is statistical question rather than an R, but it involves packages from R I am asking here since I am unable to find an answer. In the parametric modeling packages like glmnet, lasso etc..., we are able to o

[R] question about package biomaRt

2009-06-23 Thread mauede
Can biomaRt connect to data base "http://mirecords.umn.edu"; or a branch of it ... for instance the validated miRNAs list ..? Thank you very much. Maura tutti i telefonini TIM! [[alternative HTML version deleted]] __ R-help@r-project.org m

Re: [R] Vector of string

2009-06-23 Thread Sandor Benczik
njhuang86 wrote: > > Hi all. Suppose I have a vector of strings ie: ["12384", "AVC_TYU123123", > "ESPN_TYU", "TYU_TYU", "AVC3939", "hhr1919", "TYU0029"] > > Is there an efficient method that would allow me to return a vector of the > position of strings that start with "TYU"? So essentially,

[R] Cannot install pakages from Bioconductor besides the default installation

2009-06-23 Thread mauede
I am running the last R version on SuSE 11.1. I installed the Bioconductor environment following the instructions on the web. As a consequence some core packages from Bioconductors were installed. I need to add some more packages. So I tried biomaRt as follows. It does not get installed correctl

[R] Fractional Polynomials in Competing Risks setting

2009-06-23 Thread Laura Bonnett
Dear All, I have analysed time to event data for continuous variables by considering the multivariable fractional polynomial (MFP) model and comparing this to the untransformed and log transformed model to determine which transformation, if any, is best. This was possible as the Cox model was the

[R] nlme package - unbalanced data and Croissant (2008)

2009-06-23 Thread Anthony A. Pezzola
Dear listserv members, In Croissant (2008) “Panel Data Econometrics in R: The plm Package” the authors seem to indicate that the nlme package for R cannot correctly handle unbalanced panel data: “Moreover, economic panel datasets often happen to be unbalanced (i.e., they have a different number

[R] How to find b entries using xPath?

2009-06-23 Thread guox
We got all rows by: library(XML) doc = htmlParse('http://www.statcan.gc.ca/daily-quotidien/090520/t090520b1-eng.htm') rows = xpathSApply(doc, '//table/tbody/tr') The last row is: row_last = rows[15] row_last [[1]] Unsmoothed composite leading indicator 221.8 218.4 217.1 211.2 209.4 210.5

Re: [R] Help needed: Fraction for Histogram > 1 ???

2009-06-23 Thread Peter Dalgaard
charles78 wrote: I change the values by multiple 100 (from fraction to percentage) and then use the same code draw the hist. Now it works fine. The y axis labeled between 0 and 0.05. Why using fraction (value between 0 and 1) it does not work? As you have been told multiple times, densities

[R] gradually switching regression

2009-06-23 Thread Benjamin Volland
Hello, I'm trying to find an algorithm to estimate a switching regression model based on the 1990 Economics Letters paper by Ohtani/Kakimoto/Abe or the earlier version from 1985 (Ohtani/Katayama, Economic Studies Quarterly; assuming as a transition path a polynomial of order 1). I found an id

Re: [R] Vector of string

2009-06-23 Thread Henrique Dallazuanna
Try this: s <- c("12384", "TYU123123","AVC3939", "hhr1919", "TYU0029") grep("^TYU", s) On Tue, Jun 23, 2009 at 11:51 AM, njhuang86 wrote: > > Hi all. Suppose I have a vector of strings ie: ["12384", "TYU123123", > "AVC3939", "hhr1919", "TYU0029"] > > Is there an efficient method that would allo

[R] Vector of string

2009-06-23 Thread njhuang86
Hi all. Suppose I have a vector of strings ie: ["12384", "TYU123123", "AVC3939", "hhr1919", "TYU0029"] Is there an efficient method that would allow me to return a vector of the position of strings that start with "TYU"? So essentially, I would like to get back in return [2, 5]. Anyways, any help

[R] vector and NA

2009-06-23 Thread Paolo Sonego
as.vector(na.omit(inc[,5]) ?na.omit Paolo Hi, I've a vector like this: -- > inc[,5] [1]NANANANANANANA [8]NANANANANANANA

Re: [R] Spatial Statistics on Grids

2009-06-23 Thread David Winsemius
On Jun 23, 2009, at 10:21 AM, Peter Biber wrote: Dear colleagues, I'm searching for methods to analyze spatial distributions of cells with certain properties in a regular grid. For instance, consider a grid, where a part of the cells have the property "0", and the others have the propert

[R] GARCH predict

2009-06-23 Thread Ana Ramos
Hi, I've fitted a GARCH(1,1) for the residuals of my time serie (X). X is an ARMA(1,1) process. Now I want to do a n-step forecast for X, knowing these processes. How can I do this? I know that there's a command: predict() for ARIMA processes and so on, but what about GARCH? I've got: arma=arim

Re: [R] Recursive partitioning algorithms in R vs. alia

2009-06-23 Thread jude.ryan
Thanks for your point of view Terry! It is always fascinating to follow the history of the field, especially as told by someone involved with it. Jude Ryan -Original Message- From: Terry Therneau [mailto:thern...@mayo.edu] Sent: Tuesday, June 23, 2009 9:22 AM To: Ryan, Jude; c...@datanal

Re: [R] Help needed: Fraction for Histogram > 1 ???

2009-06-23 Thread charles78
I change the values by multiple 100 (from fraction to percentage) and then use the same code draw the hist. Now it works fine. The y axis labeled between 0 and 0.05. Why using fraction (value between 0 and 1) it does not work? Charles charles78 wrote: > > I have been trying to draw histogram

Re: [R] implementing Maximum Likelihood with distrMod when only the PDF is known

2009-06-23 Thread Matthias Kohl
Dear Guillaume, thanks for your interest in the distrMod package. Regarding your question I took up your example and put a file under: http://www.stamats.de/distrModExample.R Hope that helps ... Don't hesitate to contact me if you have further questions! Best, Matthias guillaume.martin schr

[R] plotting ROC from coefficient in the model

2009-06-23 Thread sunny vic
Hi everyone. Probably this is statistical question rather than an R, but it involves packages from R I am asking here since I am unable to find an answer. In the parametric modeling packages like glmnet, lasso etc..., we are able to obtain the coeffcients that have entered the model. for e

[R] Spatial Statistics on Grids

2009-06-23 Thread Peter Biber
Dear colleagues, I'm searching for methods to analyze spatial distributions of cells with certain properties in a regular grid. For instance, consider a grid, where a part of the cells have the property "0", and the others have the property "1". I'm looking for statistics I could use for characte

Re: [R] first value...

2009-06-23 Thread Petr PIKAL
Hi r-help-boun...@r-project.org napsal dne 23.06.2009 16:04:49: > Try this: > > which(diff(is.na(inc)) < 0) Shall it be which(diff(is.na(inc)) < 0)+1 or sum(is.na(inc))+1 or any other suitable construct with is.na Regards Petr > > On Tue, Jun 23, 2009 at 11:00 AM, Alfredo Alessandrini

Re: [R] first value...

2009-06-23 Thread Stavros Macrakis
I think what you mean is that you want to find the position of the first non-NA value in the vector. is.na returns a boolean vector of the NA values, so: xx <- c(NA,NA,NA,2,3,NA,4) > which(!is.na(xx))[1] [1] 4 The other proposed solution, which(diff(is.na(inc)) < 0) is incorrect: > which(

Re: [R] Merging Irregular Time Series With NAs

2009-06-23 Thread Gabor Grothendieck
On Tue, Jun 23, 2009 at 10:10 AM, Gabor Grothendieck wrote: > On Tue, Jun 23, 2009 at 10:04 AM, David Winsemius > wrote: >> >> On Jun 23, 2009, at 9:50 AM, Gabor Grothendieck wrote: >> >>> Your zoo object is illegal since zoo objects are not supposed to >>> have duplicated times; >> >> They were u

Re: [R] first value...

2009-06-23 Thread Henrique Dallazuanna
You can use this: inc[which(!is.na(inc))[1]] On Tue, Jun 23, 2009 at 11:08 AM, Alfredo Alessandrini wrote: > I've the NA value also between the value of the vector: > > > inc > [1]NANANANANANANA > [8]NANANA

Re: [R] first value...

2009-06-23 Thread Daniel Malter
min(which(is.na(inc)==FALSE)) #index inc[min(which(is.na(inc)==FALSE))] #value hth daniel - cuncta stricte discussurus - -Ursprüngliche Nachricht- Von: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Im Auftrag von Alfr

Re: [R] first value...

2009-06-23 Thread Philipp Pagel
On Tue, Jun 23, 2009 at 04:00:21PM +0200, Alfredo Alessandrini wrote: > I've a vector like this: > > > inc > [1]NANANANANANANA > [8]NANANANANANANA > [15]NANA

Re: [R] first value...

2009-06-23 Thread Wacek Kusnierczyk
Alfredo Alessandrini wrote: Hi, I've a vector like this: inc [1]NANANANANANANA [8]NANANANANANANA [15]NANANANANANA

Re: [R] first value...

2009-06-23 Thread Alfredo Alessandrini
I've the NA value also between the value of the vector: > inc [1]NANANANANANANA [8]NANANANANANANA [15]NANANANANANANA [22]

Re: [R] Merging Irregular Time Series With NAs

2009-06-23 Thread Gabor Grothendieck
On Tue, Jun 23, 2009 at 10:04 AM, David Winsemius wrote: > > On Jun 23, 2009, at 9:50 AM, Gabor Grothendieck wrote: > >> Your zoo object is illegal since zoo objects are not supposed to >> have duplicated times; > > They were unique at the sub-second level. > >> however, ignoring that if the object

  1   2   >