[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

[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,

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 wdun...@tibco.com 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

[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 result

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.

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 rip...@stats.ox.ac.uk wrote: On 16/03/2015 10:38, Srikanth Gumma wrote: Hi, I'm trying to install

Re: [R] Returning to parent function

2015-03-17 Thread Berend Hasselman
On 16-03-2015, at 23:08, Saptarshi Guha saptarshi.g...@gmail.com 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 =

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 ace...@rocketmail.com wrote: I have a dataset with 6187 elements, ranged from 3 to

Re: [R-es] ELIMINAR FILAS DUPLICADAS DENTRO DE UNA MATRIZ

2015-03-17 Thread Jorge I Velez
?duplicated --JIV On Wednesday, March 18, 2015, David Contreras davidcontrera...@gmail.com wrote: Buen d�a, Necesito quitar filas duplicadas dentro de una matriz, estaba usando la funci�n unique pero �sta no lleva a cabo el proceso que requiero, para ilustrar un poco m�s lo que requiero,

[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!!    

[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)

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?

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, window = kernel,

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) }

[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 Jeff Newmiller
Perhaps read ?try --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go... Live: OO#..

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

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. SNIP 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

[R-es] ELIMINAR FILAS DUPLICADAS DENTRO DE UNA MATRIZ

2015-03-17 Thread David Contreras
Buen día, Necesito quitar filas duplicadas dentro de una matriz, estaba usando la función unique pero ésta no lleva a cabo el proceso que requiero, para ilustrar un poco más lo que requiero, por ejemplo: Tengo la matriz A, que contiene 3 filas y 8 columnas: 0 1 0 1 0 1 0 1 1 1 1 1 1 1 0 0 0 1 0

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 -

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
Sorry for that Rolf, Yes, it perfectly works. Many thanks. Cheers, - Mail original - De : Rolf Turner r.tur...@auckland.ac.nz À : varin sacha varinsa...@yahoo.fr Cc : R help R-help@r-project.org Envoyé le : Mardi 17 mars 2015 12h40 Objet : Re: [R] Add the Gauss curve on histogram

[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? ===

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. Thierry

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 -