Re: [R] Returning to parent function

2015-03-16 Thread Saptarshi Guha
Example was complicated, but here is a simpler form continueIfTrue - function(mm=return()){ eval(mm) } telemStats - function(){ y - substitute(return()) continueIfTrue(y) print(I would not like this message to be printed) } telemStats() Ideally, calling telemStats() should

Re: [R] Returning to parent function

2015-03-16 Thread David Winsemius
On Mar 16, 2015, at 3:08 PM, Saptarshi Guha wrote: Hello, I would like a function X to return to the place that called the function XParent that called this function X. Y calls XParent Y = function(){ XParent() print(hello) } XParent calls X XParent = function(){ X()

Re: [R] How to filter data using sets generated by flattening with dcast, when I can't store those sets in a data frame

2015-03-16 Thread Michael Lawrence
The data structures you mention are complex, and too much of their complexity leaks into client code. Instead, aim to use higher level code constructs on simpler data structures. In R, the most convenient operations are those that are statistical in nature. For example, one might solve your

Re: [R] Add the Gauss curve on histogram

2015-03-16 Thread Jeff Newmiller
Not reproducible (sample data missing). http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example --- Jeff NewmillerThe . . Go Live...

[R] Add the Gauss curve on histogram

2015-03-16 Thread varin sacha
Dear R-Experts, I can easily plot an histogram and its density curve. But when I try to add the Gauss curve on the histogram with the following Rcode here below, I don't get it. What is wrong ? Or what is missing in my code ? ##Plot an histogram h=hist(newdata$math.test, prob=TRUE, col=blue,

Re: [R] Unsupported Fortran 90 compiler or Fortran 90

2015-03-16 Thread Prof Brian Ripley
On 16/03/2015 10:38, Srikanth Gumma wrote: Hi, I'm trying to install diveRsity package in our R installation. however it always fails with the error message Unsupported Fortran 90 compiler or Fortran 90. Below is the full output. Appreciate any help. Ask the maintainer of the package

[R] Unsupported Fortran 90 compiler or Fortran 90

2015-03-16 Thread Srikanth Gumma
Hi, I'm trying to install diveRsity package in our R installation. however it always fails with the error message Unsupported Fortran 90 compiler or Fortran 90. Below is the full output. Appreciate any help. R R version 3.1.2 (2014-10-31) -- Pumpkin Helmet Copyright (C) 2014 The R Foundation

Re: [R] measure of goodness of fit for the model without an intercept

2015-03-16 Thread PIKAL Petr
Hi see Faq 7.41 Why does summary() report strange results for the R^2 estimate when I fit a linear model with no intercept? And some explanation in http://stackoverflow.com/questions/20333600/why-does-summary-overestimate-the-r-squared-with-a-no-intercept-model-formula I found somewhere

Re: [R] textplot() in wordcloud package

2015-03-16 Thread Fraser D. Neiman
Just a quick note to thank David Carlson and Jim lemon for the helpful replies on this... The easiest solution are to punt on WordCloud and use either the plotrix or maptools packages. In plotrix the function is thigmophobe.labels(). In mapTools it's pointLabel() Neither complains when you

Re: [R] textplot() in wordcloud package

2015-03-16 Thread David L Carlson
Another possibility is to use pointLabel() in package maptools. For your example library(maptools) plot(x,y) pointLabel(x, y, text1) Advantages of pointLabel() are that it returns a list of the x and y coordinates of the labels that you can tweak if necessary and, at least in your example, it

Re: [R] Course and book announcements on r-help

2015-03-16 Thread Martin Maechler
Spencer Graves spencer.gra...@prodsyse.com on Sat, 14 Mar 2015 10:02:46 -0700 writes: While answering a question, I believe it's acceptable (even encouraged) to cite a relevant book, even if it's yours ;-) Spencer Definitely, Spencer. I was talking

Re: [R] textplot() in wordcloud package

2015-03-16 Thread David L Carlson
You should contact the package maintainer about this. The problem is that the pos= argument is being passed to strwidth() and strheight() and those functions do not know what to do with it. In the meantime: suppressWarnings(textplot(x,y, text1, new=F, show.lines=F, pos=4)) will

[R] lme random interactions

2015-03-16 Thread Middleton, Brian J
I have a method comparison problem, comparing Labs where a set of compounds are assayed on 3 different dates for each lab. Both labs will be used to assess compounds in the future, so the scientists will potentially contrast a compound at assayed at Lab A with one assayed at Lab B, This implies

Re: [R] How to filter data using sets generated by flattening with dcast, when I can't store those sets in a data frame

2015-03-16 Thread William Dunlap
William noted that 'reshape2' is not 'R', but a user-contributed package that runs in R. I agree, and I'm not confusing one with the other. But what I don't like is that somewhere in the interaction between them, generality is lost. That lack of generality is something that you can

Re: [R] Persons with objects – Objects and persons

2015-03-16 Thread David Winsemius
On Mar 15, 2015, at 3:46 AM, Jim Lemon wrote: Hi mareki, The transformation is not too difficult, but the table format in your example will cause a bit of difficulty. The following function from the plotrix package: categoryReshape-function(x) { dimx-dim(x) if(is.null(dimx) ||

Re: [R] How to filter data using sets generated by flattening with dcast, when I can't store those sets in a data frame

2015-03-16 Thread David Winsemius
On Mar 15, 2015, at 1:06 PM, Jocelyn Ireson-Paine wrote: David, and also William Dunlap, thanks for taking the time to reply, with examples. Both your answers are very helpful. William noted that 'reshape2' is not 'R', but a user-contributed package that runs in R. I agree, and I'm not

[R] Package related error, starting with Error in namespaceExport(ns, exports)

2015-03-16 Thread Karri Hellström
Hi everyone! I�m very new to R (2 weeks now) and very rusty with programming (last time I studied it was 20 years ago)Recently started a course in R, because Excel just doesnt cut it anymore. System: R 3.1.2. , Windows 7, Platform: i386-w64-mingw32/i386 (32-bit), updated to R 3.1.3 during the

Re: [R] Add the Gauss curve on histogram

2015-03-16 Thread Rolf Turner
On 17/03/15 13:34, varin sacha wrote: Dear R-Experts, I can easily plot an histogram and its density curve. But when I try to add the Gauss curve on the histogram with the following Rcode here below, I don't get it. What is wrong ? Or what is missing in my code ? Coherency and appropriate

[R] Returning to parent function

2015-03-16 Thread Saptarshi Guha
Hello, I would like a function X to return to the place that called the function XParent that called this function X. Y calls XParent Y = function(){ XParent() print(hello) } XParent calls X XParent = function(){ X() print(H) } X returns to the point just after the call to XParent.

Re: [R] Plotting straight line

2015-03-16 Thread Adams, Jean
Something like this might help you get started. x - seq(-5, 5, 1) m - seq(0.5, 5, 0.5) plot(0, 0, type=n, xlab=, ylab=, xlim=range(x), ylim=range(outer(m, x)+1)) invisible(lapply(m, function(slope) abline(1, slope))) Jean On Sun, Mar 15, 2015 at 11:03 PM, Partha Sinha pnsinh...@gmail.com wrote:

Re: [R] ggplot2 help

2015-03-16 Thread Jim Lemon
Hi Glenn, I think it may be your column names. When I substitute the following for the last three sections of your example, I get a plot that looks correct. Obviously I have just made up the colors. colnames(BO.Vector) - c(LoanAge, minus05, minus04, minus03, minus02, minus01)