Re: [R] R Code for paper?

2010-09-30 Thread Abhijit Dasgupta, PhD
Reading Gilbert's paper and references, and going on the web, I see that Gilbert provided Fortran source code for his method as well as Tarone's method. It might be possible to wrap this in R On 09/30/2010 06:40 PM, Jim Silverton wrote: Does anyone has the Rcode for Gilbert's 2005 paper on th

[R] barplots with 2 different scales

2010-09-30 Thread Jeremy Claisse
Is there a way to create barplots with pairs of bars plotted on 2 different scales (i.e some bars would be plotted according to the scale on the y-axis on the left and other bars plotted according to a different scale on the right axis)? Thank you, Jeremy [[alternative HTML version d

Re: [R] Sweave and LaTeX beamer class

2010-09-30 Thread Charles C. Berry
On Thu, 30 Sep 2010, Johannes Huesing wrote: I am failing to uncover Sweave chunks step by step using the LaTeX beamer class. The following minimal example: \documentclass{beamer} \usepackage{Sweave} \begin{document} \begin{frame}[fragile] In the year \uncover<2->{25}\uncover<3->{\Sexpr{5*5}}

[R] second element of a list

2010-09-30 Thread Gregory Ryslik
Hi, I have a list of of n elements (where n is unknown beforehand). Each element of the list has two subelements. The first is a matrix, the second is a number. I want to make a list of just the matrices. I want to do something like mylists[[ ,2]] but that obviously doesn't work. Is there a si

Re: [R] second element of a list

2010-09-30 Thread Greg Snow
Is the matrix the 1st or 2nd? Your description does not seem consistent. Here is one way to grab just the 2nd element from each sublist from a list: lapply( mylist, '[[', 2 ) -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -

Re: [R] second element of a list

2010-09-30 Thread Phil Spector
Gregory - I'm confused -- if the first element is the matrix you want, why would you use 2 as an index? Here's a way to get a list with the first elements of each member of a list: lapply(thelist,'[[',1) - Phil Spector

Re: [R] second element of a list

2010-09-30 Thread Gregory Ryslik
Thank you both for your help! I was interested in how to get at either element specifically. Your solutions work fine though. If I need the first element its lapply(thelist,'[[',1) and if I need the second its lapply(thelist,'[[',1). Thanks again, you just saved me a slow for loop! Kind regards

Re: [R] time in year, month, day, hour ?

2010-09-30 Thread MacQueen, Don
Here is an example of how I would do it. Just replace my ‘indx’ with the values in your first column. indx <- 1:13 t0 <- as.POSIXct('2009-01-01 00:00') tms <- t0 + (indx -1 )* 3 * 60 * 60 > tms [1] "2009-01-01 00:00:00 PST" "2009-01-01 03:00:00 PST" [3] "2009-01-01 06:00:00 PST" "2009-01-01 0

[R] Populating values in a PowerPoint table

2010-09-30 Thread Saar Golde
Dear R-help, I managed (thanks to the R2PPT package) to create a PowerPoint presentation and create a table in it but for the life of me I can't find a way to populate the table with values and text. I'm aware of the function 'PPT.AddDataFrame' which creates an Excel object from a data frame, but

[R] colored rasterImage()

2010-09-30 Thread Ben Tupper
Hello, I have been exploring the possibility to transition some code that currently uses image() to use the new rasterImage(). To date, I haven't been able to specify a color look-up strategy that works. For example... nx <- 100 ny <- 100 m <- matrix(data = rep(seq(0,1, length = nx), ny

[R] Place constrictions on parameters when using Optim and MaxLik

2010-09-30 Thread Sally Luo
Hi R users, I am trying to restrct the range of two of the parameters in a maximization problem. Both parameters should be between -1 and 1. As far as I know, if I choose the estimation method ="L-BFGS-B" under Optim, I can restrict the parameter space. However, the "L-BFGS-B" always require fi

[R] Scatterplot matrix - Pearson linear correlation and Density Ellipse

2010-09-30 Thread ashz
Hi, I have modified a known script to generate a scatterplot matrix: panel.cor = function(x, y, digits=2, prefix="Rho=", cex.cor) { usr = par("usr"); on.exit(par(usr)) par(usr = c(0, 1, 0, 1)) r = abs(cor(x, y, use="pairwise.complete.obs", method = "pearson")) txt = format(c(r,

Re: [R] Inserting a plot into another

2010-09-30 Thread Filoche
Ty sire. I'll take a look at it. With regards, Phil -- View this message in context: http://r.789695.n4.nabble.com/Inserting-a-plot-into-another-tp2720936p2802966.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org

Re: [R] Place constrictions on parameters when using Optim and MaxLik

2010-09-30 Thread Ravi Varadhan
There are several options to implement box constraints including "nlminb", "BB", "minqa", "Rcgmin", "Rvmmin". See the "optimx" package which integrates all of these. Ravi. Ravi Varadhan, Ph.D. Assistant Professor, Division o

[R] Format of Output of Residuals

2010-09-30 Thread Michael Just
An excerpt from dataset ChickWeight:     weight Time Chick Diet 1   42    0 1    1 2   51    2 1    1 3   59    4 1    1 I am interested in the residuals of the dataset.  Specifically in saving them to another format. I have been creating text files with sink. CW.lm <- lm(

[R] [Help]:How to use "loop" to achieve this aim?

2010-09-30 Thread qcshare
Hello, Everyone, how to use "loop" to make the process automatic and fast? When compute each sample, the script type in R almost the same, just the input and output file's name is changed(chr1 change to chr2, chr3,chr4...). The first sample's script like this: >chr1=MEDIPS.readAlignedSeqences(BSg

Re: [R] interactive session

2010-09-30 Thread Steven McKinney
For those that want it all... > {cat("?"); a<-readLines(n=1) + print("hey") + print(b<-paste("t",a,sep=""))} ?ada [1] "hey" [1] "tada" > b [1] "tada" > Steven McKinney > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On > Behalf Of Peter

Re: [R] colored rasterImage()

2010-09-30 Thread Michael Sumner
Use the matrix of colours directly: nx <- 100 ny <- 100 m <- matrix(data = rep(seq(0,1, length = nx), ny), ncol = nx, nrow = ny, byrow = TRUE) plot(1:nx, 1:ny, type = "n") my.color <- matrix(data = (rainbow(100))[m*100], ncol = nx, nrow = ny, byrow = TRUE) rasterImage(my.color, 1, 1, nx, ny) Als

[R] RGL and Windows 7

2010-09-30 Thread Sven Wagner
Hi! For saving 3d plots I make use of the "rgl.snapshot" command provided within the rgl-Package. So far there was no problem using Windows XP, but under Windows 7 the result is a black image, however in the png-format (see attachment http://r.789695.n4.nabble.com/file/n2844487/Koll_perf.png ).

<    1   2