[R] Numbers at risk below cumulative incidence function plot

2014-03-04 Thread Sophia J
Hi guys I am using cmprsk-package for CIF plot but I would like to plot the numbers at risk for the different causes of failure at specific timepoints below a cumulative incidence function plotIs anybody know how can I make that plot or which package shall I use to make it?Thanks in advance! Sop

[R] Numbers at risk below cumulative incidence function plot (plot.cuminc, cmprsk-package)

2012-11-28 Thread Kruijsdijk, R.C.M. van
Dear R-community, I would like to plot the numbers at risk for the different causes of failure at specific timepoints below a cumulative incidence function plot (plot.cuminc-function, cmprsk-package). For a Kaplan-Meier plot I know this is possible with the n.risk-argument in the survplot-funct

Re: [R] Numbers not numeric?

2012-04-20 Thread Peter Langfelder
On Fri, Apr 20, 2012 at 12:44 PM, Charles Determan Jr wrote: > Greetings R users, > > I have a curious problem.  I read in a csv file (subset shown below) as > normal > data=read.table("C:/Users/Chaz/Desktop/test.csv",sep=",",header=TRUE, > na.strings=".") > > However, the numbers from the dataset

[R] Numbers not numeric?

2012-04-20 Thread Charles Determan Jr
Greetings R users, I have a curious problem. I read in a csv file (subset shown below) as normal data=read.table("C:/Users/Chaz/Desktop/test.csv",sep=",",header=TRUE, na.strings=".") However, the numbers from the dataset are not registered as numeric: is.numeric(data$Mesh) [1] FALSE When I try

Re: [R] numbers and superscripts in the same unit of measurement.

2011-04-21 Thread Dennis Murphy
Hi: Are you looking for something like plot(1, 1, main = expression('Individuals/100m'^3)) ? See ?plotmath for how to insert mathematical symbols into plots. HTH, Dennis On Thu, Apr 21, 2011 at 7:18 AM, Jose Bustos Melo wrote: > Hola everyone, > > > > I'm doing an analisys about abundance of

[R] numbers and superscripts in the same unit of measurement.

2011-04-21 Thread Jose Bustos Melo
Hola everyone, I'm doing an analisys about abundance of a planctonic specie in Robinson Crusoe Islan and I am having a hard time just adding the superscripts and the 100 (one hundred) in the measure of abundance. Perhaps this is so basic to you, but I need to put the real unit of measure. In

Re: [R] Numbers in a string

2010-12-17 Thread Petr Savicky
On Fri, Dec 17, 2010 at 07:39:46AM -0500, Gabor Grothendieck wrote: > On Thu, Dec 16, 2010 at 11:42 AM, Petr Savicky wrote: [...] > > Can something similar be done in R either specifically for numbers or > > for a general regular expression? > > Dieter's first post in this thread already answered

Re: [R] Numbers in a string

2010-12-17 Thread Gabor Grothendieck
On Thu, Dec 16, 2010 at 11:42 AM, Petr Savicky wrote: > On Thu, Dec 16, 2010 at 06:17:45AM -0800, Dieter Menne wrote: >> Petr Savicky wrote: >> > >> > One of the suggestions in this thread was to use an external program. >> > A possible solution without negation in Perl is >> > >> >   @a = ("AB15E

Re: [R] Numbers in a string

2010-12-17 Thread Martin Maechler
> Petr Savicky > on Wed, 15 Dec 2010 14:21:37 +0100 writes: > On Wed, Dec 15, 2010 at 11:08:06AM -0200, Henrique > Dallazuanna wrote: >> Try this: >> >> gsub("[^0-9]", "", "AB15E9SDF654VKBN?dvb.65") > Consider also > strsplit("AB15E9SDF654VKBN?dvb.65",

Re: [R] Numbers in a string

2010-12-16 Thread William Dunlap
re, TIBCO Software wdunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Petr Savicky > Sent: Thursday, December 16, 2010 8:42 AM > To: r-help@r-project.org > Subject: Re: [R] Numbers in a str

Re: [R] Numbers in a string

2010-12-16 Thread Petr Savicky
On Thu, Dec 16, 2010 at 06:17:45AM -0800, Dieter Menne wrote: > Petr Savicky wrote: > > > > One of the suggestions in this thread was to use an external program. > > A possible solution without negation in Perl is > > > > @a = ("AB15E9SDF654VKBN?dvb.65" =~ m/[0-9]/g); > > print @a, "\n"; > >

Re: [R] Numbers in a string

2010-12-16 Thread Dieter Menne
Petr Savicky wrote: > > One of the suggestions in this thread was to use an external program. > A possible solution without negation in Perl is > > @a = ("AB15E9SDF654VKBN?dvb.65" =~ m/[0-9]/g); > print @a, "\n"; > 15965465 > > Which is gsub("[^0-9]", "", "AB15E9SDF654VKBN?dvb.65")

Re: [R] Numbers in a string

2010-12-15 Thread Petr Savicky
On Wed, Dec 15, 2010 at 01:29:16PM -0500, David Winsemius wrote: > > On Dec 15, 2010, at 6:01 AM, Nick Sabbe wrote: > > >Hi Felipe, > > > >gsub("[^0123456789]", "", "AB15E9SDF654VKBN?dvb.65") > >results in "15965465". > >Would that be what you are looking for? > > > I tried figuring out how to

Re: [R] Numbers in a string

2010-12-15 Thread David Winsemius
? -- David. Nick Sabbe -- ping: nick.sa...@ugent.be link: http://biomath.ugent.be wink: A1.056, Coupure Links 653, 9000 Gent ring: 09/264.59.36 -- Do Not Disapprove -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org ] On Behalf Of Rainer Schu

Re: [R] Numbers in a string

2010-12-15 Thread Petr Savicky
On Wed, Dec 15, 2010 at 11:08:06AM -0200, Henrique Dallazuanna wrote: > Try this: > > gsub("[^0-9]", "", "AB15E9SDF654VKBN?dvb.65") Consider also strsplit("AB15E9SDF654VKBN?dvb.65", "[^.0-9][^.0-9]*") [[1]] [1] """15" "9" "654" ".65" PS. > On Wed, Dec 15, 2010 at 6:55 AM, Luis Fe

Re: [R] Numbers in a string

2010-12-15 Thread Henrique Dallazuanna
Try this: gsub("[^0-9]", "", "AB15E9SDF654VKBN?dvb.65") On Wed, Dec 15, 2010 at 6:55 AM, Luis Felipe Parra < felipe.pa...@quantil.com.co> wrote: > Hello, I have stings which have all sort of characters (numbers, letters, > punctuation marks, etc) I would like to stay only with the numbers in th

Re: [R] Numbers in a string

2010-12-15 Thread Nick Sabbe
ring: 09/264.59.36 -- Do Not Disapprove -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Rainer Schuermann Sent: woensdag 15 december 2010 11:19 To: r-help@r-project.org Subject: Re: [R] Numbers in a string If your OS is Linux, you might want to

Re: [R] Numbers in a string

2010-12-15 Thread Rainer Schuermann
Felipe Parra > An: r-help > Betreff: [R] Numbers in a string > Hello, I have stings which have all sort of characters (numbers, letters, > punctuation marks, etc) I would like to stay only with the numbers in > them, > does somebody know how to do this? > &g

Re: [R] Numbers in a string

2010-12-15 Thread Dieter Menne
Luis Felipe Parra wrote: > > Hello, I have stings which have all sort of characters (numbers, letters, > punctuation marks, etc) I would like to stay only with the numbers in > them, > does somebody know how to do this? > > What to do if for AA3213Be45C02? A site search would have given a few

[R] Numbers in a string

2010-12-15 Thread Luis Felipe Parra
Hello, I have stings which have all sort of characters (numbers, letters, punctuation marks, etc) I would like to stay only with the numbers in them, does somebody know how to do this? Thank you Felipe Parra [[alternative HTML version deleted]] __

Re: [R] numbers on barplot

2009-07-27 Thread Greg Snow
ent: Monday, July 27, 2009 8:02 AM > To: r-h...@stat.math.ethz.ch > Subject: [R] numbers on barplot > > Hello all, > I have this simple barplot code: > > ifn <- "id.dat" > dat <- read.table(ifn) > ofn <- "id.png" > > bitmap(ofn, type =

Re: [R] numbers on barplot

2009-07-27 Thread John Kane
-- On Mon, 7/27/09, Mohsen Jafarikia wrote: > From: Mohsen Jafarikia > Subject: [R] numbers on barplot > To: r-h...@stat.math.ethz.ch > Received: Monday, July 27, 2009, 10:01 AM > Hello all, > I have this simple barplot code: > > ifn <- "id.dat" > dat <- read

Re: [R] numbers on barplot

2009-07-27 Thread Nutter, Benjamin
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Mohsen Jafarikia Sent: Monday, July 27, 2009 10:02 AM To: r-h...@stat.math.ethz.ch Subject: [R] numbers on barplot Hello all, I have this simple barplot code: ifn <- "id.dat"

[R] numbers on barplot

2009-07-27 Thread Mohsen Jafarikia
Hello all, I have this simple barplot code: ifn <- "id.dat" dat <- read.table(ifn) ofn <- "id.png" bitmap(ofn, type = "png256", width = 30, height = 30, pointsize = 30, bg = "white",res=50) par(mar=c(5, 5, 3, 2),lwd=5) par(cex.main=1.6,cex.lab=1.6,cex.axis=1.6) names(dat)<-c("NumberOfPeople","Av

Re: [R] numbers loop in R

2009-04-17 Thread hadley wickham
On Fri, Apr 17, 2009 at 12:19 PM, jim holtman wrote: > try this: > >> matrixx<-function(A){ > +     B=matrix(NaN,nrow=(A+1),ncol=4) > +     k <- 1 > +     for (i in 3:A){ > +         for (j in i:A) { > +             B[k,] <- c(NaN, i-2, i-1, j) > +             k <- k + 1 > +         } > +     } >

Re: [R] numbers loop in R

2009-04-17 Thread jim holtman
try this: > matrixx<-function(A){ + B=matrix(NaN,nrow=(A+1),ncol=4) + k <- 1 + for (i in 3:A){ + for (j in i:A) { + B[k,] <- c(NaN, i-2, i-1, j) + k <- k + 1 + } + } + B + } > matrixx(5) [,1] [,2] [,3] [,4] [1,] NaN123 [

Re: [R] numbers loop in R

2009-04-17 Thread David Winsemius
I would have expected to see the assignment to B[k,] inside the loops. And to see some connection with the k index in the inner loops if you did not want all of the rows to be similar. Because the assignment is outside the loops, it happens only once. -- David Winsemius On Apr 17, 2009, a

[R] numbers loop in R

2009-04-17 Thread emj83
I would like to create a matrix in R that looks similar to this: [,1] [,2] [,3] [,4] [1,] NaN 1 2 3 [2,] NaN 1 2 4 [3,] NaN 1 2 5 [4,] NaN 2 3 4 [5,] NaN 2 3 5 [6,] NaN345 I have the loop below: where A for example is 5 matrixx<-function(A){ B=matrix(NaN,

Re: [R] numbers not behaving as expected

2009-04-09 Thread Thomas Lumley
On Thu, 9 Apr 2009 steve_fried...@nps.gov wrote: My apologies for sending a binary file. I was following advice from someone (from this list) who insisted I send data via dput. I guess that is frown upon. dput() creates a text file, not a binary file. The problem is probably that your em

Re: [R] numbers not behaving as expected

2009-04-09 Thread Stavros Macrakis
On Thu, Apr 9, 2009 at 2:05 PM, wrote: > WetMonths <- Cell.ave[Cell.ave$month  >= "5" and Cell.ave$month <= "11",] > Error: unexpected symbol in "WetMonths <- Cell.ave[Cell.ave$month  >= "5" > and"  Cell.ave$month <= "11",] a) you are comparing with the *string* "5", not the *number* 5 (as I men

Re: [R] numbers not behaving as expected

2009-04-09 Thread Steve_Friedman
@gmail.co cc m r-help@r-project.org Subject Re: [R] numbers not behaving as 04/09/2009

Re: [R] numbers not behaving as expected

2009-04-09 Thread Uwe Ligges
steve_fried...@nps.gov wrote: If someone can explain this odd behavior I'd appreciate it. I have a data.frame Cell.ave (attached and created via dput(Cell.ave, "Cell.ave") which contains three columns of parameters year, month and AveRain. I need to subset the data.frame by months such that

Re: [R] numbers not behaving as expected

2009-04-09 Thread Stavros Macrakis
On Thu, Apr 9, 2009 at 1:39 PM, wrote: > I have a data.frame Cell.ave (attached and created via dput(Cell.ave, > "Cell.ave") I'm afraid your attachment didn't make it into the r-help mail. Mailing list policy forbids binary attachments other than PS and PDF, but should be forwarding plaintext at

[R] numbers not behaving as expected

2009-04-09 Thread Steve_Friedman
If someone can explain this odd behavior I'd appreciate it. I have a data.frame Cell.ave (attached and created via dput(Cell.ave, "Cell.ave") which contains three columns of parameters year, month and AveRain. I need to subset the data.frame by months such that DrySeaonMonths are 1,2,3,4, 11, a

Re: [R] Numbers

2009-03-06 Thread Christos Hatzis
quot;L") > letters2num(x) A X F W G V L 1 24 6 23 7 22 12 -Christos > -Original Message- > From: r-help-boun...@r-project.org > [mailto:r-help-boun...@r-project.org] On Behalf Of Leandro Marino > Sent: Friday, March 06, 2009 10:06 AM > To: r-help@r-project

Re: [R] Numbers

2009-03-06 Thread Dimitris Rizopoulos
try this: x <- c("A", "X", "F", "W", "G", "V", "L") match(x, LETTERS) I hope it helps. Best, Dimitris Leandro Marino wrote: Hi, I know the function LETTERS, but, now I have some letters to convert it in numbers, like A=1,B=2, etc... Is any function to do that? Atenciosamente, Leandro Li

[R] Numbers

2009-03-06 Thread Leandro Marino
Hi, I know the function LETTERS, but, now I have some letters to convert it in numbers, like A=1,B=2, etc... Is any function to do that? Atenciosamente, Leandro Lins Marino Centro de Avaliação Fundação CESGRANRIO Rua Santa Alexandrina, 1011 - 2º andar Rio de Janeiro, RJ - CEP: 20261-903 R (21)

Re: [R] Numbers as Points in Graphs

2008-07-06 Thread markleeds
milton: that was totally your solution. i just changed it for what hippie dream wanted. hippie dream: you can do ?text to get a better explanation but the basic idea is that the first two parameters in text specify the coordinates at which you put the text and the third param is the text. so

Re: [R] Numbers as Points in Graphs

2008-07-06 Thread hippie dream
Actually Ted, Mark's code worked perfectly although I am not really sure why. I am fairly confused by Ted'scode anyways, even though I'm sure it is right. Here is what it amounted to for my case: plot(Length ~ Width, data=infiltration1, col="blue", xlab = "Width (cm)", ylab = "Length (m)", xlim=

Re: [R] Numbers as Points in Graphs

2008-07-06 Thread Ted Harding
I think what he is trying to do is more on the following lines: D<-NULL; for(i in (1:5)){D<-cbind(D,2.5*i+(0:10)+ 0.5*rnorm(11))} {plot((0:10),D[,1],pch=49,col="blue",ylim=c(0,25))} for(i in (2:5)){points((0:10),D[,i],pch=(48+i),col="blue")} Ted. On 06-Jul-08 22:47:49, milton ruser wrote: > Hi H

Re: [R] Numbers as Points in Graphs

2008-07-06 Thread milton ruser
Thanks Mark Leeds! Just putting something more on the code: x<-runif(20) y<-rnorm(20) code.level<-sample(1:15,20, replace=T) df<-data.frame(cbind(x,y, code.level)) plot(y~x, data=df, type="n") text(df$x, df$y, df$code.level) Peace, Miltinho Astronauta Brazil On 7/6/08, [EMAIL PROTECTED] <[EM

Re: [R] Numbers as Points in Graphs

2008-07-06 Thread markleeds
below is milton's example with the text command changed to be the values of y itself ? is that what you wanted ? x<-runif(20) y<-rnorm(20) df<-data.frame(cbind(x,y)) plot(y~x, data=df, type="n") text(df$x, df$y, df$y) On Sun, Jul 6, 2008 at 6:59 PM, hippie dream wrote: Thanks Milton, I

Re: [R] Numbers as Points in Graphs

2008-07-06 Thread hippie dream
Thanks Milton, I am finding this a little hard to explain. The code you gave me produced all 0.0 points whereas what I am looking for are the points to correspond to a specific column. I'll be explicit. I am graphing the location of 15 objects numbered 1 to 15. plot(Length ~ Width, data=infiltra

Re: [R] Numbers as Points in Graphs

2008-07-06 Thread milton ruser
Hi Hippien Dream If I understood, the code below may help you. Cheers, Miltinho Astronauta Brazil === x<-runif(20) y<-rnorm(20) df<-data.frame(cbind(x,y)) par(mfrow=c(1,2)) plot(y~x, data=df) plot(y~x, data=df, type="n") text(df$x, df$y, "o.o") On 7/6/08, hippie dream <[EMAIL PROTECT

[R] Numbers as Points in Graphs

2008-07-06 Thread hippie dream
I am trying to produce a simple plot where the points in the plot are actually integers from my data. That is, I am making a length/width plot and I would like the points, rather dots or triangles, appear as different numbers corresponding to a column in my data. I have tried using this: ...,pch=

Re: [R] numbers as part of long character

2008-06-12 Thread Charilaos Skiadas
On Jun 12, 2008, at 6:34 PM, Hua Li wrote: Thanks, Marc and Haris! I didn't know the values of the numbers beforehand, so the scan method won't work, but "[^+-\\d.]+" will do! And Haris, I didn't intend to keep the information of which number is B, which is C etc when asking the question,

Re: [R] numbers as part of long character

2008-06-12 Thread Hua Li
Oh, Sorry, Marc. The scan method does work! Hua --- On Thu, 6/12/08, Charilaos Skiadas <[EMAIL PROTECTED]> wrote: > From: Charilaos Skiadas <[EMAIL PROTECTED]> > Subject: Re: [R] numbers as part of long character > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED], r-h

Re: [R] numbers as part of long character

2008-06-12 Thread Hua Li
tedious way to do it (use strspilt and unlist over and over again, after I get the number). But if you have a easier way to do it, I'd like to know! Hua --- On Thu, 6/12/08, Charilaos Skiadas <[EMAIL PROTECTED]> wrote: > From: Charilaos Skiadas <[EMAIL PROTECTED]> > Subject

Re: [R] numbers as part of long character

2008-06-12 Thread Charilaos Skiadas
On Jun 12, 2008, at 5:06 PM, Marc Schwartz wrote: on 06/12/2008 03:46 PM Hua Li wrote: Hi, I'm looking for some way to pick up the numbers which are contained and buried in a long character. For example, outtree.new="(((B:1204.25,E:1204.25):7581.11,F:8785.36):8353.85,C: 17139.21);" num.char

Re: [R] numbers as part of long character

2008-06-12 Thread Marc Schwartz
on 06/12/2008 03:46 PM Hua Li wrote: Hi, I'm looking for some way to pick up the numbers which are contained and buried in a long character. For example, outtree.new="(((B:1204.25,E:1204.25):7581.11,F:8785.36):8353.85,C:17139.21);" num.char = unlist(strsplit(unlist(strsplit(unlist(strsplit

[R] numbers as part of long character

2008-06-12 Thread Hua Li
Hi, I'm looking for some way to pick up the numbers which are contained and buried in a long character. For example, outtree.new="(((B:1204.25,E:1204.25):7581.11,F:8785.36):8353.85,C:17139.21);" num.char = unlist(strsplit(unlist(strsplit(unlist(strsplit(unlist(strsplit(unlist(strsplit(outtre