[R] Legend outside the plot? xpd?

2011-02-05 Thread Matt Cooper
Hi All, BG: Will try be brief. I'd like 3 graphs on a page (below each other mfrow=c(3,1)), saved to pdf. The three plot data on the same subject so I'm having one legend, to the right of the center graph. I'm using mar=c(5,15,4,15) to bring the sides in so that the graphs are square and not stret

Re: [R] boostrap an nls regression

2011-02-05 Thread Paul Johnson
Hello! On Thu, Feb 3, 2011 at 6:27 AM, m234 wrote: > > II functional response for 2 data sets: > > nls(eaten~(a*suppl)/(1+a*h*suppl) > > where eaten is the number of prey eaten by a predator and suppl is the > number of prey initially supplied to the same predator. > > I have parameter estimates

Re: [R] different results in MASS's mca and SAS's corresp

2011-02-05 Thread Paul Johnson
On Sat, Feb 5, 2011 at 9:19 AM, David Winsemius wrote: > > On Feb 4, 2011, at 7:06 PM, Gong-Yi Liao wrote: > >> Dear list: >> >>  I have tried MASS's mca function and SAS's PROC corresp on the >>  farms data (included in MASS, also used as mca's example), the >>  results are different: >> >>  R: m

Re: [R] Creating covariance matrices for simple and complex factor structure

2011-02-05 Thread William Revelle
At 6:00 PM + 2/5/11, LOUDERMILK, BRANDON wrote: Hello all, I'm trying to create covariance matrices that, when processed via CFA methods (in the sem package) will produce exact fit with simple structure down to poor fit with cross loadings. What is the best way to do this? I don't reall

Re: [R] very basic HLM question

2011-02-05 Thread Paul Johnson
2011/2/5 Sebastián Daza : > Hi everyone, > > I need to get a between-component variance (e.g. random effects Anova), but > using lmer I don't get the same results (variance component) than using > random effects Anova. I am using a database of students, clustered on > schools (there is not the same

Re: [R] Multiplying elements of vectors

2011-02-05 Thread Phil Spector
If the seq(5,205) was a typo, and should have been seq(5,20,5), then what you're looking for is the outer product of x and y: x = seq(5,20,5) y = seq(5,20,5) x %o% y [,1] [,2] [,3] [,4] [1,] 25 50 75 100 [2,] 50 100 150 200 [3,] 75 150 225 300 [4,] 100 200 300 400 out

Re: [R] Passing Bablok

2011-02-05 Thread dtholmes
Hi Benjamin, I was frustrated by the same thing. I pulled the papers last week and wrote this little function. Produces the same results as MethVal, a commercial clinical chemistry package. I have not tested it thoroughly but I hope that helps you. Dan Holmes, MD, Vancouver

[R] Multiplying elements of vectors

2011-02-05 Thread Mariana Martinez-Morales
Hi guys: Sorry if this question is very basic. I’m learning basic matrix and vectors multiplication to develop a population matrix model for plants. I’m trying to multiply the elements of two vectors (each of the “x” values by each of the “y” values) to obtain a square matrix of xy values. f.e. x

Re: [R] Multiplying elements of vectors

2011-02-05 Thread Mariana Martinez-Morales
Sorry I just sent a message, but I forgot to say thanks for any suggestion and help!! Mariana __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html

Re: [R] exact logistic regression

2011-02-05 Thread Denis Kazakiewicz
Dear Łukas Thank you very much ...FOR EACH ROW... That's cool data2elrm<-cbind(mydata,n=1) With best regards Denis У Пят, 04/02/2011 у 22:16 +0100, Łukasz Ręcławowicz піша: > > > 2011/2/4 Den > To use elrm() I have to aggregate my data,which is really time > consuming >

[R] Creating covariance matrices for simple and complex factor structure

2011-02-05 Thread LOUDERMILK, BRANDON
Hello all, I'm trying to create covariance matrices that, when processed via CFA methods (in the sem package) will produce exact fit with simple structure down to poor fit with cross loadings. What is the best way to do this? I don't really need to have the exact loop code, but maybe an expla

Re: [R] exact logistic regression

2011-02-05 Thread Denis Kazakiewicz
Dear Brad Dear Jinko Dear David Sorry for the noise out of nothing. It was because of my ignorance and misunderstanding of algorithms of elrm. elrm is great for the assessment of multivariable model where Stata simply runs out of memory fails, while Stata can make exact calculations on one variab

[R] Gompert-Makeham and Siler models

2011-02-05 Thread Sarunas J
Hello R users, I am absolutely new with R. I would like to ask could you help me to build (basic ideas) Gompertz-Makeham and Siler's mortality models in R? I now that there are some information about that in M. J. Crawley "R book" conerning survival analysis. Could you suggest more literature

Re: [R] A list within a list?

2011-02-05 Thread David Scott
On 6/02/2011 3:38 p.m., Jim Silverton wrote: Hello, I am planning of building a list of lists specifically, my first list is some what of the sort: lidta<- list(m, p, r, s, q, A, B) where A and B are matrices that may be of different number of rows . The number of rows in matrix A and matrix B d

Re: [R] A list within a list?

2011-02-05 Thread Greg Snow
How are your lists being created? You can add each list to a mega list in a for loop, or use lapply to run a function multiple times which outputs a list each time and these will automatically be put together into a mega list. If these don't work for you then tell us more about how you are crea

Re: [R] Lightweight store plots as images.

2011-02-05 Thread Greg Snow
I would use a pdf file, see ?pdf for examples. This plots a bunch of plots to a single file. You can also use tools like png (see ?png for examples) which will create 1 file per plot. You can either specify a name each time, or set a name pattern and have it fill in automatically. Either way

Re: [R] A list within a list?

2011-02-05 Thread Jim Silverton
Hello, I am planning of building a list of lists specifically, my first list is some what of the sort: lidta <- list(m, p, r, s, q, A, B) where A and B are matrices that may be of different number of rows . The number of rows in matrix A and matrix B depends on the the values of m. The question i

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

2011-02-05 Thread Duncan Murdoch
This is somewhat fixed now in R-patched and R-devel, as of revision 54235. It won't die with an error, but it still might not be perfect. The problem is that the line #line 516 "VolStocksDec2010.Rnw" is taken as a statement by you that the next few lines are copied from line 516 and followin

Re: [R] beanplot

2011-02-05 Thread Jim Lemon
On 02/06/2011 09:12 AM, Paul Ossenbruggen wrote: Hello, sample1, sample2 and sample3 are vectors of numbers. The boxplot works properly but beanplot gives the following error for following run: boxplot(sample1, sample2, sample3, ylim = ylim, main = "boxplot", names = 1:3)

[R] very basic HLM question

2011-02-05 Thread Sebastián Daza
Hi everyone, I need to get a between-component variance (e.g. random effects Anova), but using lmer I don't get the same results (variance component) than using random effects Anova. I am using a database of students, clustered on schools (there is not the same number of students by school).

Re: [R] Setting maximum value of the legend on an image.plot and animation

2011-02-05 Thread Peter Ehlers
Steve, I think that your second question may be answered by either setting the appropriate value for 'outdir' in ani.options() or by adding an outdir="yourdir" to the argument list in saveHTML. Peter Ehlers On 2011-02-05 09:22, Uwe Ligges wrote: On 01.02.2011 16:10, steve_fried...@nps.go

Re: [R] Seeking help to define method for '+'

2011-02-05 Thread Martin Morgan
On 02/05/2011 02:58 PM, Bogaso Christofer wrote: > Thanks Martin for your help. Although your suggestion is working for > somewhat restrictive case, I would like to make thing more generic. For > example: > > setMethod("Arith", c("Me", "Me"), function(e1, e2) callGeneric(e1@x1, > e2@x1)) > > with

Re: [R] Seeking help to define method for '+'

2011-02-05 Thread Duncan Murdoch
On 05/02/2011 5:58 PM, Bogaso Christofer wrote: Thanks Martin for your help. Although your suggestion is working for somewhat restrictive case, I would like to make thing more generic. For example: setMethod("Arith", c("Me", "Me"), function(e1, e2) callGeneric(e1@x1, e2@x1)) with in (new1 + new

Re: [R] Seeking help to define method for '+'

2011-02-05 Thread Bogaso Christofer
Thanks Martin for your help. Although your suggestion is working for somewhat restrictive case, I would like to make thing more generic. For example: setMethod("Arith", c("Me", "Me"), function(e1, e2) callGeneric(e1@x1, e2@x1)) with in (new1 + new2) is working perfectly, however if I want to add

Re: [R] Seeking help to define method for '+'

2011-02-05 Thread Martin Morgan
On 02/05/2011 02:19 PM, Bogaso Christofer wrote: > Dear all, I am trying to define "+" method for my newly defined s4 class > which is as follows: > > > > setClass("Me", sealed=F,representation(x1 = "numeric", x2 = "character")) > > new1 <- new("Me", x1=2, x2="comment1") > > new2 <- new("Me",

[R] survfit - help avoiding re-inventing the wheel.

2011-02-05 Thread Charles Annis, P.E.
Greetings, R-ians: I would like to calculate the loglikelihood based on a Surv object and non-mle parameter estimates. I already have the mles as provided by survreg( Surv(time, time2, event, type) ). I can compute a loglikelihood based on a given density, censoring types, and parameter va

[R] beanplot

2011-02-05 Thread Paul Ossenbruggen
Hello, sample1, sample2 and sample3 are vectors of numbers. The boxplot works properly but beanplot gives the following error for following run: > boxplot(sample1, sample2, sample3, ylim = ylim, main = "boxplot", names = > 1:3) > beanplot(sample1, sample2, sample3, ylim = y

[R] Seeking help to define method for '+'

2011-02-05 Thread Bogaso Christofer
Dear all, I am trying to define "+" method for my newly defined s4 class which is as follows: setClass("Me", sealed=F,representation(x1 = "numeric", x2 = "character")) new1 <- new("Me", x1=2, x2="comment1") new2 <- new("Me", x1=3, x2="comment1") setMethod("+", "Me", definition=function(x,

[R] Lightweight store plots as images.

2011-02-05 Thread Alaios
Dear all I would like to store a few hundrends images to my hard disk so I need your comment that is the most efficient way in R to do for i in c(1:100){ A. create plot with title # I do not want to give output to screen\ B. store it as an image using plot's title as filename C. Destroy tha

Re: [R] Getting variable names in function output

2011-02-05 Thread Uwe Ligges
I realy think you are on a completely non-R way of implementing something that could be done much better. But since I do not know what you are going to do, here is the answer for your question: Just add names(end) <- end one line before your return() statement. Uwe Ligges On 03.02.2011 0

Re: [R] problem with parLapply from snow

2011-02-05 Thread Uwe Ligges
I just tried with SOCK rather than MPI on my machine and it worked. Just ask R to update.packages(checkBuilt=TRUE) and try again. If you have the same problems, try SOCK rather than MPI. If MPI is the culprit, please debug your MPI setup. Uwe Ligges On 03.02.2011 03:44, mark.pal...@csiro.au

Re: [R] drawing from one cell to another using layout() - possible?

2011-02-05 Thread Uwe Ligges
On 02.02.2011 16:49, Mark Heckmann wrote: Is it possible to cross the cell boundaries set by layout using base graphics? I.e. I want to draw e.g. a line from one layout cell to another. Is there a way to do that? layout(matrix(c(1,2), byrow=TRUE, ncol=2)) plot.new() text(0,0,paste(rep("a", 200

Re: [R] Help with Help

2011-02-05 Thread Uwe Ligges
On 02.02.2011 21:15, John Filben wrote: I have recently been reading several books on data mining which contain a few data sets. The books offer some perspective on model choices, tuning decisions, result interpretation. Are there any good resources that can walk me through the thought proces

Re: [R] use "summary"

2011-02-05 Thread Uwe Ligges
Perhaps you display an object but forgot to load the package that ships the summary method for the class of the object? I guess library("VGAM") summary(RES_TOBIT) should solve your problem. BTW: Please always report which package you are talking about (vghlm is not part of R base, obviously)

Re: [R] Error in solve.default(inf, tol = tol.solve) :

2011-02-05 Thread Uwe Ligges
On 04.02.2011 08:37, Marie-Line Glaesener wrote: Hello, I'm trying to run a lagsarlm (maximum likelihood estimation of a spatial lag model) in the spdep library ; but R gives following error message: Error in solve.default(inf, tol = tol.solve) : system is computationally singular:

Re: [R] customizing names in an ordination biplot

2011-02-05 Thread Uwe Ligges
On 04.02.2011 12:21, swertie wrote: Hello, I would like to change the names of the sites in an ordination biplot (resulting from the function "rda" in vegan). Can somebody give me some trick? Thank you very much See ?plot.cca how to put things together separately and control labels. Proba

Re: [R] spline interpolation

2011-02-05 Thread Mike Marchywka
> Date: Sat, 5 Feb 2011 18:08:43 +0100 > From: cbelei...@units.it > To: r-help@r-project.org > Subject: Re: [R] spline interpolation > > Hi, > > Just pure curiosity: > may I ask why you want to do spline interplation on fluorescence intensity as >

Re: [R] multivariate regression

2011-02-05 Thread Uwe Ligges
On 04.02.2011 13:54, Deniz SIGIRLI wrote: How can I run multivariate linear regression in R (I have got 3 dependent variables and only 1 independent variable)? I tried lm function, but it gave different R2 and p values for every dependent variable. I need one R2 and p value for the model.

[R] (no subject)

2011-02-05 Thread pete
-- View this message in context: http://r.789695.n4.nabble.com/no-subject-tp3262024p3262024.html Sent from the R help mailing list archive at Nabble.com. [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.

[R] clustering fuzzy

2011-02-05 Thread pete
After ordering the table of membership degrees , i must get the difference between the first and second coloumns , between the first and second largest membership degree of object i. This for K=2,K=3,to K.max=6. This difference is multiplyed by the Crisp silhouette index vector (si). Too it d

Re: [R] Performance of graph and igraph package

2011-02-05 Thread Uwe Ligges
On 05.02.2011 06:21, William Tu wrote: Dear R users, I'm using graph library to create a mesh-like network topology and implement a load balance routing algorithm. The current implementation uses graph, RBGL, and Rgraphviz libraries. I have a few attributes on every edge to represent the netwo

Re: [R] using SNOW and clusterApplyLB to run jobs parallel

2011-02-05 Thread Uwe Ligges
On 01.02.2011 23:07, kparamas wrote: I have this function and want to run it parallel with different sets of data. Using SNOW and clusterApplyLB. Nice, but what is your question? PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self

Re: [R] Setting maximum value of the legend on an image.plot and animation

2011-02-05 Thread Uwe Ligges
On 01.02.2011 16:10, steve_fried...@nps.gov wrote: Hello, I'm doing the following: library(ncdf) library(fields) library(animation) saline<- open.ncdf("salinity_1990.nc") salt = get.var.ncdf(nc=saline, varid="Salinity") # create an animation of the complete temporal domain in the ncdf fil

Re: [R] spline interpolation

2011-02-05 Thread Claudia Beleites
Hi, Just pure curiosity: may I ask why you want to do spline interplation on fluorescence intensity as function of concentration? Particularly as it looks quite typical for an unknown problem's calibration plot? Claudia On 02/05/2011 03:29 PM, Asan Ramzan wrote: Hello R-help I have the

Re: [R] Where does R look for library packages - there is no package called 'BRugs'

2011-02-05 Thread Uwe Ligges
On 05.02.2011 00:32, conor1725 wrote: I created a file called .Renviron and set R_LIBS_USER to the same path I had set R_LIBS to. I put this file in C:/Users/myusername/Documents/mysubdirectory. I also commented out the line I had put in the Renviron.site file. Now I get the same error as I or

Re: [R] spline interpolation

2011-02-05 Thread Mike Marchywka
> From: dwinsem...@comcast.net > To: asanram...@yahoo.com > Date: Sat, 5 Feb 2011 10:24:04 -0500 > CC: r-help@r-project.org > Subject: Re: [R] spline interpolation > > > On Feb 5, 2011, at 9:29 AM, Asan Ramzan wrote: > > > Hello R-help > > I have the following data for a standard curve

Re: [R] spline interpolation

2011-02-05 Thread David Winsemius
On Feb 5, 2011, at 10:37 AM, Mike Marchywka wrote: From: dwinsem...@comcast.net To: asanram...@yahoo.com Date: Sat, 5 Feb 2011 10:24:04 -0500 CC: r-help@r-project.org Subject: Re: [R] spline interpolation On Feb 5, 2011, at 9:29 AM, Asan Ramzan wrote: Hello R-help I have the following data f

Re: [R] spline interpolation

2011-02-05 Thread Greg Snow
Also ?splinefun (like approxfun but using splines instead of lines). -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Be

[R] plot two pearson correlation matrix on one heatmap

2011-02-05 Thread Wendy
Hi all, I am trying to plot two pearson correlation coefficient matrices on one heatmap using heatmap.2. I combined two matrices as following A = [0.8 0.9; 0.75 0.95] B = [0.82 0.87 0.94 0.74] combined = [0.8 0.9 0 0; 0.75 0.95 0 0 0 0 0.82 0.87

Re: [R] spline interpolation

2011-02-05 Thread David Winsemius
On Feb 5, 2011, at 9:29 AM, Asan Ramzan wrote: Hello R-help I have the following data for a standard curve concentration(nM),fluorescence 0,48.34 2,58.69 5,70.83 10,94.73 20,190.8 50,436.0 100, 957.9 (1)Is there function in R to plot a spline. ?spline (2)How can I interpolation,say 1000 poi

Re: [R] different results in MASS's mca and SAS's corresp

2011-02-05 Thread David Winsemius
On Feb 4, 2011, at 7:06 PM, Gong-Yi Liao wrote: Dear list: I have tried MASS's mca function and SAS's PROC corresp on the farms data (included in MASS, also used as mca's example), the results are different: R: mca(farms)$rs: 1 2 1 0.059296637 0.0455871427

Re: [R] [OT] BLUE vs. BLUP

2011-02-05 Thread Douglas Bates
On Fri, Feb 4, 2011 at 8:44 PM, Laura Smith wrote: > Hi! > Does anyone have a numeric example for calculating BLUE and BLUP, please? You will need to be more specific. BLUE is an acronym for "Best Linear Unbiased Estimator" and BLUP for "Best Linear Unbiased Predictor". So the phrase "calculati

Re: [R] clustering fuzzy

2011-02-05 Thread pete
After ordering the table of membership degrees , i must get the difference between the first and second coloumns , between the first and second largest membership degree of object i. This for K=2,K=3,to K.max=6. This difference is multiplyed by the Crisp silhouette index vector (si). Too it d

[R] spline interpolation

2011-02-05 Thread Asan Ramzan
Hello R-help I have the following data for a standard curve concentration(nM),fluorescence 0,48.34 2,58.69 5,70.83 10,94.73 20,190.8 50,436.0 100, 957.9   (1)Is there function in R to plot a spline. (2)How can I interpolation,say 1000 point from 0nM-100nM and store this as a data frame of concent

Re: [R] stochastic models for population growth

2011-02-05 Thread Vassily Shvets
Hello, It's not easy to express clearly what I have in mind. I've been working with a couple of titles -Stochastic Models in Biology, for one, but both date back a decade or more. I'll try to illustrate the model a little more. A reasonably comparable situation is Bolker's analysis of how many

Re: [R] Quadratic regression: estimating the maximizing value

2011-02-05 Thread Mike Marchywka
> From: greg.s...@imail.org > To: ghe...@blm.gov; r-help@r-project.org > Date: Fri, 4 Feb 2011 17:49:51 -0700 > Subject: Re: [R] Quadratic regression: estimating the maximizing value > > No, your approach is not correct. For one you have not taken t

Re: [R] Failing to install {rggobi} on win-7 R 2.12.0

2011-02-05 Thread Michael Lawrence
Hi Tal, Thanks for working through this. GGobi needs to be rebuilt for the new version of GTK+. I'm probably the person to do that, but my time is short these days. I'll try to get to it soon. The new binary will just include the necessary DLLs, so that this GTK+ installation step is unnecessary.

Re: [R] Create factorial design

2011-02-05 Thread Petr Savicky
On Sat, Feb 05, 2011 at 11:01:33AM +0100, Sascha Vieweg wrote: > I have got data with one column indicating the area where the data > was recorded: > > R: n <- 43 > R: df <- data.frame("area"=sample(1:7, n, repl=T), "dat"=rnorm(n)) > > In each of the 7 different areas I want to implement one of

Re: [R] Failing to install {rggobi} on win-7 R 2.12.0

2011-02-05 Thread Tal Galili
Dear Prof Brian Ripley and others, After (finally) checking again, I found that ggobi doesn't work with the newer GTK (probably needed for R 2.12.0). Here is the results of my experimentations: *What works:* Installing ggobi and the GTK (version 2.12.9) provided on: http://www.ggobi.org/downloa

[R] Create factorial design

2011-02-05 Thread Sascha Vieweg
I have got data with one column indicating the area where the data was recorded: R: n <- 43 R: df <- data.frame("area"=sample(1:7, n, repl=T), "dat"=rnorm(n)) In each of the 7 different areas I want to implement one of 7 specific strategies. The assignment should be random. Therefore, I pair

Re: [R] Help!!! from R beginner

2011-02-05 Thread Tae-Jin Lee
Hello Jim, Thank you so much!!! It is a magic!!! Now I understand the use of ifelse. Thank you again!!! Tae-Jin On Feb 5, 2011, at 12:49 AM, jim holtman wrote: You should be able to use 'ifelse' Os.chr4.gene.new$color <- ifelse(Os.chr4.gene.new$if_TE_related == "TE_related", "black",