[R] Joining two datasets - recursive procedure?

2015-03-17 Thread Luca Meyer
Hello, I am facing a quite challenging task (at least to me) and I was wondering if someone could advise how R could assist me to speed the task up. I am dealing with a dataset with 3 discrete variables and one continuous variable. The discrete variables are: V1: 8 modalities V2: 13 modalities V

Re: [R] density plot not smooth

2015-03-17 Thread Fix Ace
Thank you for the email. What is the default "n"? Thanks! On Tuesday, March 17, 2015 4:06 PM, William Dunlap wrote: Increasing the value of 'n' given to density will give an estimate at more points so it will look smoother.  Try n=2^18. Bill Dunlap TIBCO Software wdunlap tibco.com

[R] Using split.screen with a definition matrix of the screens seems to be a mess. I don't understand!

2015-03-17 Thread Julio Sergio Santana
I have a particular need to divide the device space to draw different plots and texts, so I decided to use split.screen using a matrix to define the different space partitions. My code and explanation is as follows: # -- START OF R CODE dirGraf <- "TEST/" # A directory to put the resul

[R] ggplot2 recycle color palette

2015-03-17 Thread Glenn Schultz
Hello All,  I have a custom color palette as illustrated below.   I have more than 8 variables.  In the case of more than 8 variables I would simply like to recycle the color.  Has anyone done this or know of a way to have to colors recycle if there are more than 8 variables. Best Regards, Gl

[R] Sensitivity calculations and ROC curves

2015-03-17 Thread Bodien, Yelena Guller
Dear R gurus, I have some data that require sensitivity and specificity calculation and generation of an ROC curve. I first calculated the sensitivity and specificity in Excel using generic formulas (true positives/(true positive+false negative) etc. To make the ROC curves I switched to R and u

Re: [R] density plot not smooth

2015-03-17 Thread William Dunlap
Fix Ace wrote What is the default "n"? 512: > length(density(rnorm(10^6))$x) [1] 512 > args(density.default) function (x, bw = "nrd0", adjust = 1, kernel = c("gaussian", "epanechnikov", "rectangular", "triangular", "biweight", "cosine", "optcosine"), weights = NULL, w

[R] Segmented (piecewise linear) regression/cointegration

2015-03-17 Thread jpm miao
Hi, If the relation between y and x is piecewise linear, the package "segmented" can be used to model it. It works pretty well. My situation is a little different: y and x are both I(1). Is there an R-package dealing with this situation? If not, is there an econometrics paper on this issue?

Re: [R] Returning to parent function

2015-03-17 Thread Martin Morgan
On 03/16/2015 05:05 PM, Saptarshi Guha wrote: 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") } t

Re: [R] Returning to parent function

2015-03-17 Thread Rolf Turner
On 18/03/15 13:22, Bert Gunter wrote: With all due respect: I don't think much respect is due. Fortune nomination! cheers, Rolf -- Rolf Turner Technical Editor ANZJS Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276 Home phone: +64-9-480-4619 ___

Re: [R] Returning to parent function

2015-03-17 Thread Jeff Newmiller
Perhaps read ?try --- Jeff NewmillerThe . . Go Live... DCN:Basics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Resear

Re: [R] Returning to parent function

2015-03-17 Thread Bert Gunter
With all due respect: I don't think much respect is due. I doubt that the OP has made much of an effort to learn R and is merely trying to slap on some prior CS class concepts onto R. Ergo the confusion and nonsensical post. http://www.jabberwocky.com/carroll/jabber/jabberwocky.html seems relev

Re: [R] density plot not smooth

2015-03-17 Thread William Dunlap
Increasing the value of 'n' given to density will give an estimate at more points so it will look smoother. Try n=2^18. Bill Dunlap TIBCO Software wdunlap tibco.com On Tue, Mar 17, 2015 at 12:06 PM, Fix Ace wrote: > > > I have a dataset with 6187 elements, ranged from 3 to 104028. When I > tr

[R] density plot not smooth

2015-03-17 Thread Fix Ace
I have a dataset with 6187 elements, ranged from 3 to 104028. When I tried to examine only small range of data, I found that the plot was not smooth (as shown below): plot(density(test$V2), xlim=c(0,1000))  Is there away to make it smoother? Thanks a lot!!     ___

Re: [R] Returning to parent function

2015-03-17 Thread Spencer Graves
On 3/17/2015 10:01 AM, David Winsemius wrote: On Mar 16, 2015, at 5:05 PM, Saptarshi Guha wrote: Example was complicated, but here is a simpler form continueIfTrue <- function(mm=return()){ eval(mm) } What are you trying to accomplish by passing `return()` to a formal parameter?

[R] Problem with paxckage "survMisc"

2015-03-17 Thread Endy BlackEndy
Hi R users. I would like your help on the following strange, to me, behavior of the package "survMisc". I have a simple routine, the following: proc<-function(){ rm(list=ls()) library(survMisc) d<-read.table("C:\\Program Files\\R\\Data\\Survival\\HosmLem.txt",fill=TRUE,header=TRUE) d4<-as.

Re: [R] Returning to parent function

2015-03-17 Thread David Winsemius
On Mar 16, 2015, at 5:05 PM, Saptarshi Guha wrote: > Example was complicated, but here is a simpler form > > continueIfTrue <- function(mm=return()){ >eval(mm) > } What are you trying to accomplish by passing `return()` to a formal parameter? > telemStats <- function(){ >y <- substitu

Re: [R] ggplot2 boxplot points (size,color,shape)

2015-03-17 Thread Thierry Onkelinx
You need to set the shape manually library(ggplot2) n <- 200 dataset <- data.frame( Type = sample(c("A", "B"), n, replace = TRUE), Value = rnorm(n) ) ggplot(dataset, aes(x = Type, y = Value)) + geom_boxplot() + geom_jitter(aes(shape = Type)) + scale_shape_manual(values = c(1, 19)) ir. Thierr

[R] ggplot2 boxplot points (size,color,shape)

2015-03-17 Thread Brian Smith
Hi, I am trying to create a boxplot (with geom_jitter) such that the points from one set of values are shown as circles, and the second set of points also as circles, but with no fill. In other words, how can I control the shape and color for the points appearing in this boxplot? === library(

Re: [R] Add the Gauss curve on histogram

2015-03-17 Thread varin sacha
Sorry for that Rolf, Yes, it perfectly works. Many thanks. Cheers, - Mail original - De : Rolf Turner À : varin sacha Cc : R help Envoyé le : Mardi 17 mars 2015 12h40 Objet : Re: [R] Add the Gauss curve on histogram Please keep your replies on-list. I am not your private consul

Re: [R] Add the Gauss curve on histogram

2015-03-17 Thread Rolf Turner
Please keep your replies on-list. I am not your private consultant. Not, at least, until you start paying me!!! Again your example is not reproducible. WTF makes you think I have access to the file "/Users/Caro/Desktop/Mesures d'association using R/test.txt" ??? I have no idea what

Re: [R] Add the Gauss curve on histogram

2015-03-17 Thread varin sacha
Hi Jeff, Here is I hope a reproducible code. My R code gives something but not what I am expecting. Indeed, I am expecting a gauss curve and I get a straight line. I have followed the advices of Rolf as well but I still don't get a gauss curve... Thanks for your time Dataset <- read.table("/User

Re: [R] lme random interactions

2015-03-17 Thread Thierry Onkelinx
Dear Brian, You want data$CompLab <- interaction(data$Compound, data$Lab) lme ( data=data, Resp ~ Lab * Compound, random = list(CombLab = ~ 1, Date = pdIdent(~0 + Lab)) , weights = varIdent(form=~1|Lab) ) Note that this is untested since you didn't provide a reproducible example. However

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

2015-03-17 Thread Srikanth Gumma
Thank you Prof. Brian Ripley. I'm writing a mail to glasso maintainer. Let me see if I could get some help from them. Regards Srikanth. On Mon, 16 Mar 2015 at 19:21 Prof Brian Ripley wrote: > On 16/03/2015 10:38, Srikanth Gumma wrote: > > Hi, > > > > I'm trying to install diveRsity package in o