Re: [R] how to draw abline correctly?

2010-01-04 Thread milton ruser
You can also try: axis(1) axis(2, las=1) axis(2,at=c(0.1361), las=1) bests milton On Sun, Jan 3, 2010 at 9:26 PM, aegea gche...@gmail.com wrote: Hello, I am frastruated with this graph, just cannot get what I need. Thank you for any suggestions or help. I really appreciate it. I wrote

Re: [R] Likelihood Ratio Tests

2010-01-04 Thread Peter Dalgaard
Jim Silverton wrote: Is there any package available in R to do the following hypothesis tests? Testing the means of two Poissons (equivalent to the difference of two proportions) Testing the equality of two proportions from binomials Testing the equality of proprtions of two negative binomials

Re: [R] Emacs vs Eclipse vs Rcmdr

2010-01-04 Thread Barry Rowlingson
On Sun, Jan 3, 2010 at 10:59 PM, Charlotte Maia mai...@gmail.com wrote: I'm not so much interested in which is the best user interface for R. Rather which is the best ***platform*** for developing ***new*** user interfaces for R. Noting I'm using the term user interface is a very general

Re: [R] how to draw abline correctly?

2010-01-04 Thread Dieter Menne
aegea wrote: 1, the red line is added on the graph but without any marker on the y-axis. I want to display the number '.1361' on the y-axis. So people can easily tell 'method 2' gets a constant estimate, which is 0.1361. 2, since 'method2' is a constant. I prefer in the legend area, it

Re: [R] Boxplot- change the vertical line from dash to solid

2010-01-04 Thread Dieter Menne
elaine kuo wrote: Now I am learning to draw boxplot using graphics(). I want to change the vertical line penetrating the box from dashed line to solid line Check the documentation on bxp; there is an example mimic S-Plus that shows how to customize boxplot. Dieter -- View this

Re: [R] rggobi: Installation problems on OS X Snow Leopard

2010-01-04 Thread Prof Brian Ripley
1) Please use the R-sig-mac list for Mac-specific questions. 2) The isssue here is there is no binary package on CRAN. You could try install.packages(rggobi, type=source) but I can tell you this will run into problems unless you have pkg-config installed and suitably configured. I

[R] spectrogram

2010-01-04 Thread rajesh j
Hi, I need to plot spectrogram of a waveform.What package offers this? -- Rajesh.J [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] How to use read.table with Hebrew column names ?

2010-01-04 Thread Tal Galili
Hi David, Jorge and everyone else. I tried loading the file (with the Hebrew columns) on two machines. On one of them if loaded fine, and on the other it didn't. I also see a difference with the sessionInfo() of the two machines. You're advice would be most welcomed. On both machines I tried the

Re: [R] plot question

2010-01-04 Thread Albert-Jan Roskam
Hi Dennis and Gabor,   Thanks a lot for the useful suggestions! Cheers!! Albert-Jan ~~ In the face of ambiguity, refuse the temptation to guess. ~~ --- On

Re: [R] Interpreting coefficient in selection and outcome Heckman models in sampleSelection

2010-01-04 Thread Arne Henningsen
Hi Mark! On Sun, Jan 3, 2010 at 9:08 PM, Mark Bulling mark.bull...@googlemail.com wrote: Hi there Within sampleSelection, I'm trying to calculate the marginal effects for variables that are present in both the selection and outcome models. For example, age might have a positive effect on

Re: [R] spectrogram

2010-01-04 Thread Dieter Menne
rajesh j wrote: I need to plot spectrogram of a waveform.What package offers this? Try spectrogram in r-help search. Dieter -- View this message in context: http://n4.nabble.com/spectrogram-tp998119p998146.html Sent from the R help mailing list archive at Nabble.com.

[R] Piecewise regression in lmer

2010-01-04 Thread AD Hayward
Dear all, I'm attempting to use a piecewise regression to model the trajectory of reproductive traits with age in a longitudinal data set using a mixed model framework. The aim is to find three slopes and two points- the slope from low performance in early age to a point of high

Re: [R] Extract vector elements until cumsum = x

2010-01-04 Thread Dieter Menne
Dgnn wrote: I have a vector n, and for each n[i] I want to extract n[i], n[i+1], n[i+2]..., until the cumulative sum of n[i] and subsequent elements exceeds a CheckValue, whereupon I move to the next index and repeat. I am trying to find a Vectorized approach, and have seen similar

Re: [R] installation

2010-01-04 Thread Iasonas Lamprianou
hi all, is there a cd-rom image with a full R pre-installation which I can give to my students so that if they want to run R on their computer, they will be able to run it from the cd-rom without having to install it on their computer. That way, they can have a 'protable' R package

Re: [R] Emacs vs Eclipse vs Rcmdr

2010-01-04 Thread Philippe Grosjean
Hello, You can probably add SciViews in the list. There are many, many interesting features in SciViews-K/Komodo for developing new user interfaces rapidly and easily. Unfortunately, there is no documentation yet, and thus, most of the functions remain hidden (but you can play with it and

Re: [R] installation

2010-01-04 Thread Uwe Ligges
Iasonas Lamprianou wrote: hi all, is there a cd-rom image with a full R pre-installation which I can give to my students so that if they want to run R on their computer, they will be able to run it from the cd-rom without having to install it on their computer. That way, they can have a

Re: [R] Assistance with boot() Package

2010-01-04 Thread Adam Carr
Good Morning Prof. Ripley: Thanks very much for the help. I do have the Davison and Hinkley text but I continued to struggle with the proper syntax to make iteration work. The MASS package is already installed on my machine and I have the manual so I will check the example you mentioned.

[R] metafor: using mixed models

2010-01-04 Thread Joris Meys
Dear all, I'm currently applying a mixed model approach to meta analysis using the package metafor. I use the model.matrix() function to create dummy variables. The option btt gives me the combined test for the dummies. Problem is, I don't know which indices I have to use, and can't really figure

Re: [R] spectrogram

2010-01-04 Thread Olivier Crouzet
Le Mon, 4 Jan 2010 14:17:44 +0530, rajesh j a écrit : Hi, I need to plot spectrogram of a waveform.What package offers this? See the seewave package. on cran: http://cran.r-project.org/web/packages/seewave/index.html and on the package's website for online documentation:

Re: [R] R2HTML Report number format, or Better Way?

2010-01-04 Thread Gregoire Pau
Hi L.A., Use the package 'hwriter' to produce HTML pages/objects. library(hwriter) hwrite(srtype, page=c:/R/reports/myreport1.html) 'hwrite' can be combined with the function 'format' (to manage number format, digits, decimal places, etc...) and supports advanced HTML/CSS formatting

Re: [R] Piecewise regression in lmer

2010-01-04 Thread Dieter Menne
AD Hayward wrote: I'm attempting to use a piecewise regression to model the trajectory of reproductive traits with age in a longitudinal data set using a mixed model framework. You might have a look a Alejandro Jara DPpackage which worked quite well for me in a similar case. There

Re: [R] Boxplot- change the vertical line from dash to solid

2010-01-04 Thread elaine kuo
Dear Dieter, Thanks for the info. However, I did not know which document you refer to. Please kindly indicate the website or the source. Thank you Elaine On Mon, Jan 4, 2010 at 4:24 PM, Dieter Menne dieter.me...@menne-biomed.dewrote: elaine kuo wrote: Now I am learning to draw boxplot

[R] BIOMOD: the format of background data

2010-01-04 Thread elaine kuo
Dear, I am a newbie to R. I am trying BIOMOD to simulate species distributions with presence-only data. As the presence-only data consist of three columns, presence, longitude, latitude, please kindly share how to prepare the background data (maybe using ArcGIS ?) Thank you Elaine

Re: [R] Piecewise regression in lmer

2010-01-04 Thread Walmes Zeviani
AD Hayward wrote: Dear all, I'm attempting to use a piecewise regression to model the trajectory of reproductive traits with age in a longitudinal data set using a mixed model framework. The aim is to find three slopes and two points- the slope from low performance in early age

[R] no rcorrp.cens in hmisc package

2010-01-04 Thread elaine kuo
Dear, I wanna to compare AUC generated by two distribution models using the same sample. I tried improveProb function's example code below. set.seed(1) library(survival) x1 - rnorm(400) x2 - x1 + rnorm(400) d.time - rexp(400) + (x1 - min(x1)) cens - runif(400,.5,2) death - d.time = cens d.time

[R] Are unpaired data suitable for Hmisc's improveProb ?

2010-01-04 Thread elaine kuo
Dear, I wanna to compare AUC generated by two distribution models using the same sample. The AUC for model 1 consists of two columns, column A for 0/1 and column B for probability, eahc with the same row number of 3000. The AUC for model 2 consists of two columns, column A for 0/1 and column B

[R] Are unpaired data suitable for DiagnosisMed's Diagnosis ?

2010-01-04 Thread elaine kuo
Dear, I wanna to compare AUC generated by two distribution models using the same sample. The AUC for model 1 consists of two columns, column A for 0/1 and column B for probability, eahc with the same row number of 3000. The AUC for model 2 consists of two columns, column A for 0/1 and column B

Re: [R] installation

2010-01-04 Thread Prof Brian Ripley
On Mon, 4 Jan 2010, Iasonas Lamprianou wrote: hi all, is there a cd-rom image with a full R pre-installation which I can give to my students so that if they want to run R on their computer, they will be able to run it from the cd-rom without having to install it on their computer. That way,

Re: [R] no rcorrp.cens in hmisc package

2010-01-04 Thread Frank E Harrell Jr
You omitted library(Hmisc) or require(Hmisc) Frank elaine kuo wrote: Dear, I wanna to compare AUC generated by two distribution models using the same sample. I tried improveProb function's example code below. set.seed(1) library(survival) x1 - rnorm(400) x2 - x1 + rnorm(400) d.time -

Re: [R] Are unpaired data suitable for Hmisc's improveProb ?

2010-01-04 Thread Frank E Harrell Jr
improveProb, as the documentation says, takes two predicted probabilities and one outcome variable as its inputs. The predictions must be on the same subjects so improveProb only handles paired data. Frank elaine kuo wrote: Dear, I wanna to compare AUC generated by two distribution models

Re: [R] Are unpaired data suitable for DiagnosisMed's Diagnosis ?

2010-01-04 Thread Frank E Harrell Jr
elaine kuo wrote: Dear, I wanna to compare AUC generated by two distribution models using the same sample. The AUC for model 1 consists of two columns, column A for 0/1 and column B for probability, eahc with the same row number of 3000. The AUC for model 2 consists of two columns, column A

Re: [R] Extract vector elements until cumsum = x

2010-01-04 Thread Gabor Grothendieck
Try this which uses 10 as the check value: f - function(acc, x) if (acc + x 10) x else acc + x x - c(4, 6, 2, 7, 4, 1, 4, 8) Reduce(f, x) On Sun, Jan 3, 2010 at 10:02 PM, Dgnn sharkbrain...@gmail.com wrote: Hi All, I have a vector n, and for each n[i] I want to extract n[i], n[i+1],

Re: [R] Help with function fitdistr in MASS

2010-01-04 Thread Saji Ren
Thank you,man. the problem solved. Plus. when I got the parameters of the data. And I used the truehist(mydata) to get a histogram of the data, How can I draw a line of the distribution of the estimated parameters in the histogram plot? for example: fitdistr(na.exclude(mydata),normal) mean

[R] Odp: multivariate group means

2010-01-04 Thread Petr PIKAL
Hi I did not see any answer to your question yet so I will try one. r-help-boun...@r-project.org napsal dne 30.12.2009 15:41:43: Hello, I look for a simple command computing multivariate group means and What is multivariate group mean? Do you mean means of some groups? In that case you

Re: [R] function in aggregate applied to specific columns only

2010-01-04 Thread Matthew Dowle
That makes eight solutions. Any others? :) A ninth was detailed in two other threads last month. The first link compares to ave(). http://tolstoy.newcastle.edu.au/R/e8/help/09/12/9014.html http://tolstoy.newcastle.edu.au/R/e8/help/09/12/8830.html Dennis Murphy djmu...@gmail.com wrote in

Re: [R] metafor: using mixed models

2010-01-04 Thread Viechtbauer Wolfgang (STAT)
Dear Joris, When you call rma() with the (default) argument intercept=TRUE, then the intercept is added to the X matrix (a column of 1s is added). So, if you use: fac - c(1,1,2,3,3,4,4,5,5,5) X - model.matrix(~factor(fac))[,2:5] and then: rma(ai, bi, ci, di, mods=X, data=testdata, measure=OR)

Re: [R] Interpreting coefficient in selection and outcome Heckman models in sampleSelection

2010-01-04 Thread Ott-Siim Toomet
Hi Mark, why do you need that? If your task is to estimate how much your y changes if x change, why not use simple OLS? (Well, right, you should be able to use sampleSelection as well). It shouldn't probably be hard to compute it -- it is just OLS marginal effect + som kind of derivative of

[R] help, how self-oganizing map show 2D picture and put all samples into the picture?

2010-01-04 Thread bbslover
http://n4.nabble.com/file/n998182/pca.jpg pca.jpg http://n4.nabble.com/file/n998182/som.jpg som.jpg http://n4.nabble.com/file/n998182/all%2Bindepents.xls all+indepents.xls As we know, som is a good tool to cluster hign demension to 2D and show as a 2D picture, just like in the attachment

[R] problem with number formation

2010-01-04 Thread venkata kirankumar
Hi all, this is kiran I got one problem with formating a number that is if I have a number like ---2.33 that one ihave to convert to --2.33000 and if I have a number like ---0.33 that one ihave to convert to --0.33000 is this posible in R-project if its posible please help me to

Re: [R] Interpreting coefficient in selection and outcome Heckman models in sampleSelection

2010-01-04 Thread Mark Bulling
Hi Ott The reason for calculating would be to add context to the OLS estimates (from the probit) - e.g. a 1 year increase in age might increase the dependent variable by 1 unit, but given that the selection model is based on a subset of the full data set, if the probability of reaching the

Re: [R] multivariate group means

2010-01-04 Thread Walmes Zeviani
Ondřej Mikula wrote: Hello, I look for a simple command computing multivariate group means and returning an object of class matrix rather than list. Does any such function exist in standard packages? I'm beginning with R, so I'm sorry if the solution is trivial. Ondra Mikula

[R] locator and print

2010-01-04 Thread Thomas Roth
Hi, Using the following R-Code the printing via print takes place after locator although print is placed before locator ### test = function() { plot(1:10) print(test) locator(1) } test ### Is there some way to force the printing before locator is being evaluated. I assume that there is some

[R] How to uninstall R packages

2010-01-04 Thread wenjun zheng
Dear all, I am puzzled that how can i uninstall a R package that have been installed earlier (especially in MacOS). Any suggestion will be appreciated. -- Wenjun [[alternative HTML version deleted]] __ R-help@r-project.org mailing list

Re: [R] How to uninstall R packages

2010-01-04 Thread Uwe Ligges
On 04.01.2010 16:20, wenjun zheng wrote: Dear all, I am puzzled that how can i uninstall a R package that have been installed earlier (especially in MacOS). Any suggestion will be appreciated. ?remove.packages Uwe Ligges __

Re: [R] Piecewise regression in lmer

2010-01-04 Thread Douglas Bates
On Mon, Jan 4, 2010 at 6:24 AM, Walmes Zeviani walmeszevi...@hotmail.com wrote: AD Hayward wrote: Dear all, I'm attempting to use a piecewise regression to model the trajectory of reproductive traits with age in a longitudinal data set using a mixed model framework. The aim is to find

Re: [R] How to uninstall R packages

2010-01-04 Thread David Winsemius
On Jan 4, 2010, at 10:23 AM, Uwe Ligges wrote: On 04.01.2010 16:20, wenjun zheng wrote: Dear all, I am puzzled that how can i uninstall a R package that have been installed earlier (especially in MacOS). Any suggestion will be appreciated. ?remove.packages Or delete the folder in the

Re: [R] locator and print

2010-01-04 Thread Duncan Murdoch
On 04/01/2010 10:18 AM, Thomas Roth wrote: Hi, Using the following R-Code the printing via print takes place after locator although print is placed before locator ### test = function() { plot(1:10) print(test) locator(1) } test ### Is there some way to force the printing before locator is

[R] Plot graph

2010-01-04 Thread cirtey
Hi; I want to obtain this graphic. http://n4.nabble.com/file/n998283/plot.gif Instead whith my code : par(mfrow=c(1,7),mar=c(0,0,0,0)) plot(EntreesMoyennesMensuelles2003, type=l,main=2003,col=yellow) plot(EntreesMoyennesMensuelles2004, type=l,main=2004,col=red)

Re: [R] Plot graph

2010-01-04 Thread Sarah Goslee
The first one is one plot created with calls to lines() and to abline(). Yours is seven different plots. That should be enough to get you started. This looks like it might be homework - if so, any other questions should go to your instructor. If not, a reproducible example would be far more

Re: [R] How to uninstall R packages

2010-01-04 Thread Guo-Hao Huang
?remove.packages Guo-Hao Huang -- From: wenjun zheng wjzhen...@gmail.com Sent: Monday, January 04, 2010 11:20 PM To: R-help@r-project.org Subject: [R] How to uninstall R packages Dear all, I am puzzled

Re: [R] Question on Reduce + rollmean

2010-01-04 Thread Muhammad Rahiz
Thanks Gabor, It works alright. But is there alternative ways to perform rollmean apart from permutating the data? Possibly combining the Reduce and rollmean functions? The easiest but traditional way is (x[[1]]+x[[2]]) / 2 (x[[2]]+x[[3]]) / 2 Muhammad Rahiz | Doctoral Student in

Re: [R] R2HTML Report number format, or Better Way?

2010-01-04 Thread L.A.
Thanks, All Jim your solution works and I'm playing around with it trying to learn the ins outs I'd still like to figure out how to get this to work in R2HTML. I think I worded my question wrong making it appear more difficult, so I'll Try again. Here is the data and code Par-9683 sal-578

Re: [R] Question on Reduce + rollmean

2010-01-04 Thread Gabor Grothendieck
This is due to the non-idempotent nature of apply. Instead of apply, you can use - aaply in the plyr package http://tolstoy.newcastle.edu.au/R/devel/06/06/5687.html - or the idempotent apply (iapply) posted here by Hadley Wickham: and in either case you won`t have to permute the result.

Re: [R] problem with number formation

2010-01-04 Thread Berend Hasselman
dvkirankumar wrote: Hi all, this is kiran I got one problem with formating a number that is if I have a number like ---2.33 that one ihave to convert to --2.33000 ?sprintf Example: a - 2.33 sprintf(%.5f, a) Berend -- View this message in context:

[R] Adding a distance scale to a plot?

2010-01-04 Thread Jason Rupert
Do you know what steps I need to take to add a scale to a plot? I'm pulling my example out of An Introduction to R: Software for StatisticalModelling Computing (see the R code around Figure 76). I would like to add a scale to the image produced by the following code.  I would like to the

Re: [R] Help with function fitdistr in MASS

2010-01-04 Thread Peter Ehlers
Saji Ren wrote: Thank you,man. the problem solved. Plus. when I got the parameters of the data. And I used the truehist(mydata) to get a histogram of the data, How can I draw a line of the distribution of the estimated parameters in the histogram plot? for example:

Re: [R] Question on Reduce + rollmean

2010-01-04 Thread Henrique Dallazuanna
For this example try this: lapply(lapply(list('head', 'tail'), do.call, list(x, n = -1)), function(x)Reduce('+', x)/2) On Mon, Jan 4, 2010 at 1:54 PM, Muhammad Rahiz muhammad.ra...@ouce.ox.ac.uk wrote: Thanks Gabor, It works alright. But is there alternative ways to perform rollmean apart

[R] vectors into a matrix

2010-01-04 Thread Victor Kyros
Dear all, I'm writing code to do automatically several calculations and gather the results in a matrix. I have the following vectors and I just want to make a matrix with them: VD1 VD2 VD3 ... VD12 *In this case, this series of vectors stops there, in 12, but it could be a higher number or

[R] glmer (lme4), glmmPQL (MASS) and xtmepoisson (Stata)

2010-01-04 Thread Antonio.Gasparrini
Dear R users, I'm trying to specify a generalized linear mixed model in R, basically a Poisson model to describe monthly series of counts in different regions. My aim is to fit subject-specific curves, modelling a non-linear trend for each region through random effects for linear splines

Re: [R] vectors into a matrix

2010-01-04 Thread David Winsemius
On Jan 4, 2010, at 12:32 PM, Victor Kyros wrote: Dear all, I'm writing code to do automatically several calculations and gather the results in a matrix. I have the following vectors and I just want to make a matrix with them: VD1 VD2 VD3 ... VD12 cbind( 1:12, matrix(c(VD1, ..., VD12),

Re: [R] Adding a distance scale to a plot?

2010-01-04 Thread Walmes Zeviani
JustADude wrote: Do you know what steps I need to take to add a scale to a plot? I'm pulling my example out of An Introduction to R: Software for StatisticalModelling Computing (see the R code around Figure 76). I would like to add a scale to the image produced by the following

Re: [R] vectors into a matrix

2010-01-04 Thread David Winsemius
On Jan 4, 2010, at 1:13 PM, David Winsemius wrote: On Jan 4, 2010, at 12:32 PM, Victor Kyros wrote: Dear all, I'm writing code to do automatically several calculations and gather the results in a matrix. I have the following vectors and I just want to make a matrix with them: VD1 VD2

Re: [R] Question on Reduce + rollmean

2010-01-04 Thread Gabor Grothendieck
Here is a variation which also uses head and tail: mapply(function(x, y) (x + y)/2, tail(x, -1), head(x, -1), SIMPLIFY = FALSE) On Mon, Jan 4, 2010 at 12:37 PM, Henrique Dallazuanna www...@gmail.com wrote: For this example try this: lapply(lapply(list('head', 'tail'), do.call, list(x, n =

Re: [R] vectors into a matrix

2010-01-04 Thread Henrique Dallazuanna
Try this: cbind(ID = as.numeric(gsub(VD, , ls(patt = VD\\d+))) , t(sapply(ls(patt = VD\\d+), get))) On Mon, Jan 4, 2010 at 3:32 PM, Victor Kyros varend...@gmail.com wrote: Dear all, I'm writing code to do automatically several calculations and gather the results in a matrix. I have the

Re: [R] lapack error on Redhat Linux Fedora 11

2010-01-04 Thread Patrick Connolly
On Thu, 24-Dec-2009 at 01:14PM -0800, Hongbin Zhang wrote: | | | Hi, | | The following errors occurs when I run the nlme's example: | | -- | Error in chol.default((value + t(value))/2) : | lapack routines cannot be loaded | In

Re: [R] xyplot - help with multiple Y's vs. X of a member data in multiple panels

2010-01-04 Thread Santosh
Hi Jim and others, I tried suggestions and somehow the graphs do not seem to be aligned on X-axis (i.e. they appear to be shifted on x-axis).. I guess panel.xyplot or panel.superpose is needed? I am not sure what the group variable be panel.xyplot, whether it is the ID or the newFactor. I tried

Re: [R] glmer (lme4), glmmPQL (MASS) and xtmepoisson (Stata)

2010-01-04 Thread Ben Bolker
Antonio.Gasparrini at lshtm.ac.uk writes: I'm trying to specify a generalized linear mixed model in R, basically a Poisson model to describe monthly series of counts in different regions. My aim is to fit subject-specific curves, modelling a non-linear trend for each region through random

Re: [R] Extract vector elements until cumsum = x

2010-01-04 Thread Dgnn
Thanks a lot, everybody! I've been working with these data for a while, and didn't realize that some of my assumptions lead me to leave out some important info. Specifically, that the vector contains time values of intervals between adjacent events, and so are always positive. Thanks again for

[R] How to dynamically display title for a graph

2010-01-04 Thread noclue_
I have written a function (see below) which encloses a boxplot. My function xbox takes in a variable name (such as age), and do a boxplot. Now I would like to add a title for the graph dynamically displaying the variable name as part of title. But, in reality, the title displays VALUES of my

Re: [R] vectors into a matrix

2010-01-04 Thread Bert Gunter
This is one of those times where do.call() comes in very handy: first convert the vector names into a list using lapply and get() and then call do.call with cbind on the list: do.call(cbind,lapply(paste(VD,1:12,sep=),get)) This also illustrates the virtue of putting such vectors in a list to

Re: [R] How to dynamically display title for a graph

2010-01-04 Thread Duncan Murdoch
On 04/01/2010 11:30 AM, noclue_ wrote: I have written a function (see below) which encloses a boxplot. My function xbox takes in a variable name (such as age), and do a boxplot. Now I would like to add a title for the graph dynamically displaying the variable name as part of title. But, in

[R] how to plot multiple density functions in one graph

2010-01-04 Thread John Westbury
Hello, I am new to R and have two easy questions. How can you plot multiple density functions in one graph? I have five beta densities that I would like to plot in one graph. I understand how to plot one beta density as a line: plot (x,(dbeta(x,shape1=,shape2=,), type =l) Does the Pareto

Re: [R] how to plot multiple density functions in one graph

2010-01-04 Thread John Kane
?lines ?points --- On Mon, 1/4/10, John Westbury jrwestb...@gmail.com wrote: From: John Westbury jrwestb...@gmail.com Subject: [R] how to plot multiple density functions in one graph To: r-help@r-project.org Received: Monday, January 4, 2010, 3:13 PM Hello, I am new to R and have two

Re: [R] how to plot multiple density functions in one graph

2010-01-04 Thread David Winsemius
On Jan 4, 2010, at 3:13 PM, John Westbury wrote: Hello, I am new to R and have two easy questions. How can you plot multiple density functions in one graph? I have five beta densities that I would like to plot in one graph. I understand how to plot one beta density as a line: plot

[R] log-normal overlay

2010-01-04 Thread emorway
Hello, Using the following lines of code, I created the following graph:

[R] ggplot2 = bar size

2010-01-04 Thread Leandro Marino
Hi, i am newbie into ggplot and i thow that i have to learn a lot about this package. I am doing this function to draw an graphic: library(ggplot2) posx - theme_text(angle=45,hjust=1,face='bold',size=12) posy - theme_text(angle=0,hjust=1,face='bold',size=12) y1 - c(1,4,6,1,8,10,6,1,5,4) x -

[R] Linear Discriminant Analysis in R

2010-01-04 Thread cobbler_squad
Dear R-gurus, Here is what I need to do.. I have two .txt files that are in a matrix form (each looks something like this: 0.0334820.02238 0.026677 0.0345530.0232260.028855 0.0350170.0232620.02941 0.0362620.023306

Re: [R] log-normal overlay

2010-01-04 Thread Peter Ehlers
Hmm, I just answered this on R-devel where I forgot to say that this is certainly not an R-devel type of query. Please don't cross-post and don't abuse the R-devel list. -Peter Ehlers emorway wrote: Hello, Using the following lines of code, I created the following graph:

[R] polygamma or Hurwitz zeta function

2010-01-04 Thread HAKAN DEMIRTAS
Hi, Is there any R library that is capable of handling polygamma function (Hurwitz zeta function also works)? I am aware of digamma(0 and trigamma(), but could not find more advanced versions. I'd appreciate any help. Hakan Demirtas __

Re: [R] polygamma or Hurwitz zeta function

2010-01-04 Thread Duncan Murdoch
On 04/01/2010 5:27 PM, HAKAN DEMIRTAS wrote: Hi, Is there any R library that is capable of handling polygamma function (Hurwitz zeta function also works)? I am aware of digamma(0 and trigamma(), but could not find more advanced versions. RSiteSearch(polygamma) points to the psigamma

Re: [R] How to uninstall R packages

2010-01-04 Thread Charlie Sharpsteen
On Mon, Jan 4, 2010 at 7:37 AM, David Winsemius dwinsem...@comcast.net wrote: On Jan 4, 2010, at 10:23 AM, Uwe Ligges wrote: On 04.01.2010 16:20, wenjun zheng wrote: Dear all, I am puzzled that how can i uninstall a R package that have been installed earlier (especially in MacOS). Any

[R] MLE optimization

2010-01-04 Thread jckval
Folks, I'm kind of newbie in R, but with some background in Matlab and VBA programming. Last month I was implementing a Maximum Likelihood Estimation in Matlab, but the algorithms didn't converge. So my academic advisor suggested using R. My problem is: estimate a mean reverting jump diffusion

Re: [R] MLE optimization

2010-01-04 Thread Ravi Varadhan
should write a function that uses the parameters and the sample data as input and outputs the likelihood. Is it correct? Yes, that is correct. Take a look at the optim() function. ?optim What type of convergence problems did you experience with Matlab? I am not sure if using R can overcome

Re: [R] MLE optimization

2010-01-04 Thread Liviu Andronic
Hello On 1/4/10, jckval jcnogueirafi...@gmail.com wrote: Alternatively, could anyone suggest a good MLE tutorial and package? Search for MLE on Rseek.org and among other results check the Task Views. Also, search for MLE in vignettes on RSiteSearch [1]. [1]

Re: [R] how to plot multiple density functions in one graph

2010-01-04 Thread Dennis Murphy
Hi: Another approach to multiple plotting in base graphics is to use matplot, which is particularly convenient for something such as densities because the plots are of a similar character with the same domain. Here's an example: x - seq(0, 1, by = 0.01) d1 - dbeta(x, 2, 2) d2 - dbeta(x, 3, 3) d3

[R] Dynamic arguments in rbind function

2010-01-04 Thread Steven Kang
Hi, all Basically, I have unknown number of data that need to be imported and collapsed row-wisely. The code below works fine, however the rbind function may require 50 arguments if there are 50 data files... Thus, I would like to explore whether there are any methods in using dynamic objects

Re: [R] Dynamic arguments in rbind function

2010-01-04 Thread Duncan Murdoch
On 04/01/2010 7:31 PM, Steven Kang wrote: Hi, all Basically, I have unknown number of data that need to be imported and collapsed row-wisely. The code below works fine, however the rbind function may require 50 arguments if there are 50 data files... Thus, I would like to explore whether

Re: [R] Dynamic arguments in rbind function

2010-01-04 Thread Sundar Dorai-Raj
Use a list instead of assign then do.call(rbind, thelist). import.files - c(a.txt, b.txt, c.txt, d.txt, e.txt) imp - vector(list, length(import.files)) for (i in 1:length(import.files)) { imp[[i]] - read.delim(import.files[i], sep = , header = TRUE) } combined - do.call(rbind, imp) HTH,

[R] R matching lat/lon pairs from two datasets?

2010-01-04 Thread Douglas M. Hultstrand
Hello, I am trying to match lat/lon from one dataset with the lat/lon from a second dataset and use that rows data for calculations. I am using match, but this is finding the first match and not comparing the pair, how can I determine if the lat/lon are the same? See example below. Is

Re: [R] MLE optimization

2010-01-04 Thread jckval
First of all, thanks for your answer! About the optimization problem, I'm pretty careful on constraints for the parameters. Regular papers usually do this kind of estimation just restricting the weight of the mixture (bivariate) between 0 and 1, but this can lead to some strange results, like

Re: [R] R matching lat/lon pairs from two datasets?

2010-01-04 Thread Don MacQueen
I guess you want the subset of data whose lat/long pairs are present in data2? Try renaming your columns so that V1 and V2 are the same in both data frames (either lat,long, or long,lat, but not one way in one dataframe and the other way in the other one. Then use merge() -Don At 5:37 PM

Re: [R] xyplot - help with multiple Y's vs. X of a member data in multiple panels

2010-01-04 Thread Peter Ehlers
Can you clarify how many curves you want in each panel? You have 3 Ys and your original email indicated at least 7 ID values. Do you really want 21 curves in each panel? Or do you want separate panels for the Ys? Re your code: note that, regarding a formula of the type y1 + y2 ~ x, ?xyplot says:

Re: [R] R matching lat/lon pairs from two datasets?

2010-01-04 Thread jim holtman
couple of approaches: merge(data1, data2, by.x=c(V1, V2), by.y=c(V2, V1)) V1 V2 V3 1 47.82 -123.75 11 2 47.82 -123.76 8 library(sqldf) sqldf(select * from data2 x2, data1 x1 where x2.V1=x1.V2 and x2.V2=x1.V1) V1V2 V3 V1V2 1 -123.76 47.82 8 -123.76 47.82 2

Re: [R] Extract vector elements until cumsum = x

2010-01-04 Thread Gabor Grothendieck
Mark Leeds pointed out to me that the last line should have been: Reduce(f, x, accumulate = TRUE) On Mon, Jan 4, 2010 at 8:43 AM, Gabor Grothendieck ggrothendi...@gmail.com wrote: Try this which uses 10 as the check value: f - function(acc, x) if (acc + x 10) x else acc + x x - c(4, 6, 2,

[R] Bar plots with stacked and grouped (juxtaposed) bars together

2010-01-04 Thread Elmer Wix
Using barplot, I can generate stacked bars if I pass beside=FALSE. I can generate grouped (juxtaposed) bars if I pass beside=TRUE. How can I generate stacked and grouped bars together? __ R-help@r-project.org mailing list

[R] Checking for normality and homogeneity of variance

2010-01-04 Thread Haiyang AI
Dear all, I'm a beginner of R and I need to carry out some three-way mixed ANOVAs. Following examples at http://personality-project.org/r/r.anova.html, I managed to get the ANOVA part, but I don't know how can I check data normality and homogeneity of variance in R (since they're the required

[R] Error on checking a package with some functions ignored

2010-01-04 Thread rusers.sh
Hi, Say i have three functions in a new package, a,b and c. I only want the one function a to be exported for use. b and c are not very stable. If i specify to export all the three functions in the NAMESPACE file (export(a,b,c)), no errors appeared after checking the package. But if i only

Re: [R] xyplot - help with multiple Y's vs. X of a member data in multiple panels

2010-01-04 Thread Santosh
Hi, Thanks for your email.. Each panel (in a multiple panel) is identified by DS1, DS2 DS3 in the dataset sent earlier. I would like an overlay of Y1, Y2 Y3 (each by different lines) for each ID in the group. Each ID in the group is represented by a color. Regards Thanks, Santosh On Mon, Jan

Re: [R] Checking for normality and homogeneity of variance

2010-01-04 Thread Schalk Heunis
For normality check out: ?shapiro.test HTH! Schalk On Tue, Jan 5, 2010 at 5:32 AM, Haiyang AI aihaiy...@gmail.com wrote: Dear all, I'm a beginner of R and I need to carry out some three-way mixed ANOVAs. Following examples at http://personality-project.org/r/r.anova.html, I managed to get

Re: [R] xyplot - help with multiple Y's vs. X of a member data in multiple panels

2010-01-04 Thread Duncan Mackay
Hi I missed the earlier emails and I am not too sure of what you want but have a look at requiire(latticeExtra) ? useOuterStrips It may improve the layout and readability Duncan Mackay Department of Agronomy and Soil Science University of New England ARMIDALE NSW 2351 Email Home:

  1   2   >