Re: [R] multiple logical comparisons

2010-03-21 Thread baptiste auguie
try this one, `%ni%` <- Negate(`%in%`) Best, baptiste __ 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 and provide commented, minimal, self-c

Re: [R] Find a rectangle of maximal area

2010-03-21 Thread Erwin Kalvelagen
Hans W Borchers googlemail.com> writes: > > For an application in image processing -- using R for statistical purposes -- I > need to solve the following task: > > Given n (e.g. n = 100 or 200) points in the unit square, more or less randomly > distributed. Find a rectangle of maximal area wit

Re: [R] lattice grob

2010-03-21 Thread Paul Murrell
Hi baptiste auguie wrote: Dear list, I'm trying to arrange various grid objects on a page using a frameGrob. It works fine with basic grobs (textGrob, gTree, etc.), and also with ggplot2 objects using the ggplotGrob() function. I am however stuck with lattice. As far as I understand, lattice pr

Re: [R] Problem specifying Gamma distribution in lme4/glmer

2010-03-21 Thread David Winsemius
On Mar 21, 2010, at 5:16 PM, Ben Bolker wrote: Dieter Menne menne-biomed.de> writes: Ben Bolker wrote: 3. zero-inflated data may not be particularly well-represented by a Gamma distribution: if you actually have a significant number of exactly-zero values, you may want to analyze your dat

[R] Problem using ESS. Error message: "cannot change working directory"

2010-03-21 Thread Nicolas Leveroni
Greetings R wizards. I have the following problem using Emacs Speaks Statistics: When trying to set a working directory, or when trying to read a file that is in a directory that has the character "á" (note that it has a "spanish accent symbol": ´ ) R being ran from emacs tells me that the direct

Re: [R] multiple logical comparisons

2010-03-21 Thread David Winsemius
Just read the help page: ?"%in% "%w/o%" <- function(x,y) x[!x %in% y] #-- x without y (1:10) %w/o% c(3,7,12) -- David. On Mar 21, 2010, at 5:57 PM, Martin Batholdy wrote: thanks! Now I have one more question; How can I do the reverse? when %in% is == (for two vectors of different length

Re: [R] calling external .EXE file in R macOSX

2010-03-21 Thread Sharpie
Alex Anderson wrote: > > Hi All, > I am currently working on an analysis which requires a call to an > external FORTRAN routine contained within a file called MCDS.EXE. This > file is usually called from within a WINDOWS program called DISTANCE. I > have some R script from the developers of

Re: [R] Find a rectangle of maximal area

2010-03-21 Thread Jim Lemon
On 03/21/2010 10:12 PM, Hans W Borchers wrote: For an application in image processing -- using R for statistical purposes -- I need to solve the following task: Given n (e.g. n = 100 or 200) points in the unit square, more or less randomly distributed. Find a rectangle of maximal area within the

[R] fixed effects regression

2010-03-21 Thread Roy Lowrance
Hi All: I am trying to move a model from Stata to R. It is a linear regression model with about 90,000 indicator variables. What is the best approach to follow in R? - Roy [[alternative HTML version deleted]] __ R-help@r-project.org mailing

[R] calling external .EXE file in R macOSX

2010-03-21 Thread Alex Anderson
Hi All, I am currently working on an analysis which requires a call to an external FORTRAN routine contained within a file called MCDS.EXE. This file is usually called from within a WINDOWS program called DISTANCE. I have some R script from the developers of the original software which appar

Re: [R] add euro sign to a plot

2010-03-21 Thread Rodrigo Aluizio
Hi Martin, here as example code that may help you to get what you want (once you didn't specified were in the plot you want the symbol). plot(1:10) title(main= "\u20ac", font = 5) Ps.: This coding may differ between operational system, this one worked in a Windows Vista 32 bits. This works for al

[R] add euro sign to a plot

2010-03-21 Thread Martin Batholdy
hi, Is it possible to add special characters like the euro sign to a plot? thanks! __ 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 and provid

[R] using lmer weights argument to represent heteroskedasticity

2010-03-21 Thread J
Hi- I want to fit a model with crossed random effects and heteroskedastic level-1 errors where inferences about fixed effects are of primary interest. The dimension of the random effects is making the model computationally prohibitive using lme() where I could model the heteroskedasticity with th

Re: [R] lattice grob

2010-03-21 Thread Felix Andrews
What's wrong with using grid.grabExpr? p1 <- xyplot(1:10 ~ 1:10) g1 <- grid.grabExpr(print(p1)) I can imagine there would be potential problems to do with the plot-time aspect and layout calculations... On 19 March 2010 21:51, baptiste auguie wrote: > Dear list, > > I'm trying to arrange vari

Re: [R] multiple logical comparisons

2010-03-21 Thread Erik Iverson
Martin Batholdy wrote: thanks! Now I have one more question; How can I do the reverse? when %in% is == (for two vectors of different lengths); what is the equivalent to != ? a %in% b returns a logical vector, so !a %in% b returns its negation. See order of precedence in ?Syntax.

Re: [R] multiple logical comparisons

2010-03-21 Thread Martin Batholdy
thanks! Now I have one more question; How can I do the reverse? when %in% is == (for two vectors of different lengths); what is the equivalent to != ? On 21.03.2010, at 22:33, Erik Iverson wrote: > Martin Batholdy wrote: >> Hi, >> I would like to compare a column of data with a vector. >>

Re: [R] different forms of nls recommendations

2010-03-21 Thread Bernardo Rangel Tura
On Sat, 2010-03-20 at 14:55 -0800, emorway wrote: > Hello, > > Using this data: > http://n4.nabble.com/file/n1676330/US_Final_Values.txt US_Final_Values.txt > > and the following code i got the image at the end of this message: > > US.final.values<-read.table("c:/tmp/US_Final_Values.txt",heade

Re: [R] Problem specifying Gamma distribution in lme4/glmer

2010-03-21 Thread David Winsemius
On Mar 21, 2010, at 5:16 PM, Ben Bolker wrote: Dieter Menne menne-biomed.de> writes: Ben Bolker wrote: 3. zero-inflated data may not be particularly well-represented by a Gamma distribution: if you actually have a significant number of exactly-zero values, you may want to analyze your dat

Re: [R] multiple logical comparisons

2010-03-21 Thread Erik Iverson
Martin Batholdy wrote: Hi, I would like to compare a column of data with a vector. I have this data.frame for example; x <- data.frame(A = c(1:5), B = c(1,1,2,2,2)) Now I have a search vector: search <- c(1,3,5) when I now try to get all the data-rows which have a 1, a 3, or a 5 in column

Re: [R] using a condition given as string in subset function - how?

2010-03-21 Thread William Dunlap
> -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Albert-Jan Roskam > Sent: Sunday, March 21, 2010 2:25 AM > To: Mark Heckmann; jim holtman > Cc: r-help@r-project.org > Subject: Re: [R] using a condition given as string in subset

Re: [R] Problem specifying Gamma distribution in lme4/glmer

2010-03-21 Thread Ben Bolker
Dieter Menne menne-biomed.de> writes: > Ben Bolker wrote: > > 3. zero-inflated data may not be particularly well-represented > > by a Gamma distribution: if you actually have a significant number > > of exactly-zero values, you may want to analyze your data in two > > stages, first as a presen

[R] multiple logical comparisons

2010-03-21 Thread Martin Batholdy
Hi, I would like to compare a column of data with a vector. I have this data.frame for example; x <- data.frame(A = c(1:5), B = c(1,1,2,2,2)) Now I have a search vector: search <- c(1,3,5) when I now try to get all the data-rows which have a 1, a 3, or a 5 in column A and a 2 in column B,

Re: [R] calculus using R

2010-03-21 Thread Gabor Grothendieck
Try this: > library(Ryacas) # http://ryacas.googlecode.com Loading required package: XML > > x <- Sym("x") > h <- Sym("h") > > # limit > Limit(1/(1-x), x, Infinity) [1] "Starting Yacas!" expression(0) > > # differentiation > deriv(x^3, x) expression(3 * x^2) > > # integration: indefinite and defin

Re: [R] using a condition given as string in subset function - how?

2010-03-21 Thread Thomas Lumley
On Sun, 21 Mar 2010, Albert-Jan Roskam wrote: Hi, Is eval always used in conjunction with parse? Based on other languages, I'd expect the expression already to work without the use of parse(), but indeed it doesn't, or at least not as intended. Just a newbie question.. parse() turns a chara

Re: [R] calculus using R

2010-03-21 Thread David Winsemius
On Mar 21, 2010, at 11:26 AM, ATANU wrote: can anyone suggest how can i do calculus (e.g.limit,differentiation,integrate,mean value theorem,definite integral,convergence,maxima minima of functions,checking continuity) using R?? ?D ?integrate ?pmax ?pmin package:RYacas Continuity? Limits?

Re: [R] sapply, lattice functions

2010-03-21 Thread Santosh
Dear R-gurus.. How do I implement the following: a) Overlay frequency(instead of density) with line of density plot, vertical lines of confidence intervals and reference levels? b) Control the breaks (using "nint?"), order of the panel, and the layout, place units for each conditioning variable?

[R] Applying SVM model to a new data

2010-03-21 Thread m_r_nour
Hi I'm using Libsvm, I made a function to save models, confusion matrix of different models but when I want to use saved model, I can't let suppose output of function is : models=list(model1,model2,) but how can I use these models? using predict(models[[1]],y) causes error message: "Err

[R] calculus using R

2010-03-21 Thread ATANU
can anyone suggest how can i do calculus (e.g.limit,differentiation,integrate,mean value theorem,definite integral,convergence,maxima minima of functions,checking continuity) using R?? -- View this message in context: http://n4.nabble.com/calculus-using-R-tp1676727p1676727.html Sent from the R h

Re: [R] EM algorithm in R

2010-03-21 Thread Daniel Nordlund
> -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] > On Behalf Of tj > Sent: Saturday, March 20, 2010 10:35 AM > To: r-help@r-project.org > Subject: Re: [R] EM algorithm in R > > > here is my program... Im trying to fit 1 component to 6 compone

Re: [R] Problem specifying Gamma distribution in lme4/glmer

2010-03-21 Thread Dieter Menne
Ben Bolker wrote: > > > 3. zero-inflated data may not be particularly well-represented > by a Gamma distribution: if you actually have a significant number > of exactly-zero values, you may want to analyze your data in two > stages, first as a presence-absence problem and then as a conditional

Re: [R] Problem specifying Gamma distribution in lme4/glmer

2010-03-21 Thread Ben Bolker
Matthew Giovanni gmail.com> writes: > > Dear R and lme4 users- > > I am trying to fit a mixed-effects model, with the glmer function in > lme4, to right-skewed, zero-inflated, non-normal data representing > understory grass and forb biomass (continuous) as a function of tree > density (indicate

Re: [R] Levene's Test for Homogeneity of Variance

2010-03-21 Thread John Fox
Dear Iurie, "Pr(>F)" is the p-value for the test of the null hypotheses that the population variances are equal. This is the typical format for labelling a p-value in R output. I hope this helps, John John Fox Senator William McMaster Professor of Social Stat

Re: [R] Levene's Test for Homogeneity of Variance

2010-03-21 Thread Philippe Glaziou
On 21 March 2010 13:13, Iurie Malai wrote: > To calculate Levene's Test for Homogeneity of Variance I use R Commander, > and this is the output: > >> levene.test(Dataset$age, Dataset$sex) > Levene's Test for Homogeneity of Variance >      Df F value Pr(>F) > group  1  0.8739 0.3567 >      33 > > I

[R] Levene's Test for Homogeneity of Variance

2010-03-21 Thread Iurie Malai
Hi, All! To calculate Levene's Test for Homogeneity of Variance I use R Commander, and this is the output: > levene.test(Dataset$age, Dataset$sex) Levene's Test for Homogeneity of Variance Df F value Pr(>F) group 1 0.8739 0.3567 33 I am not sure what means "Pr(>F)"? Can anyone expl

[R] Find a rectangle of maximal area

2010-03-21 Thread Hans W Borchers
For an application in image processing -- using R for statistical purposes -- I need to solve the following task: Given n (e.g. n = 100 or 200) points in the unit square, more or less randomly distributed. Find a rectangle of maximal area within the square that does not contain any of these points

Re: [R] using a condition given as string in subset function - how?

2010-03-21 Thread Albert-Jan Roskam
Hi, Is eval always used in conjunction with parse? Based on other languages, I'd expect the expression already to work without the use of parse(), but indeed it doesn't, or at least not as intended. Just a newbie question.. Cheers!! Albert-Jan ~~~

Re: [R] Converting a character string into a data frame name and performing assignments to that data frame

2010-03-21 Thread Dieter Menne
Kavitha Venkatesan-2 wrote: > > variable.df is a character string that contains the name of the data > frame that I want to do the following operations on: > > variable.df <- data.frame(); > # I can do the above command using > assign( variable.df, data.frame() ) > > How can I perform the assi

Re: [R] different forms of nls recommendations

2010-03-21 Thread Dieter Menne
emorway wrote: > > > So I wanted to try a different equation of the general form a/(b+c*x^d) > > US.nls.2<-nls(US.final.values$ECe~(a/(b+c*US.final.values$WTD^d)),data=US.final.values,start=list(a=100.81,b=73.7299,c=0.0565,d=-6.043),trace=TRUE,algorithm="port") > > but that ended with "Conver

Re: [R] Frequencies from a matrix - spider from frequencies

2010-03-21 Thread Uwe Dippel
Jim Lemon wrote: Yes, I realized that I had forgotten to require(plotrix) after I sent the message. From your example, you might also want to look at the diamondplot function, also in plotrix. Jim, thanks for the hint to diamondplot. It is much closer natively to what I wanted to do, and