[R] Basic population dynamics

2009-09-01 Thread Frostygoat
Hello, For insect mortality data I'm trying to get an R script that will take the data from the raw form and convert it to Lx (% survival) for a number of treatments. The raw data has the number of days lived for each individual for the respective treatment. Thus, for example, when R selects th

[R] Inverse plot colors?

2010-03-29 Thread Frostygoat
Hi, I'm looking for a way to get white boxplots on a black background. The following is insufficient because although the box is white, I can't figure out how to change the whisker color to white. x <- rnorm(100) par(bg = "black") boxplot(x) boxplot(x, col = "white", notch=T) Is there no way to

[R] Assign palette (e.g. rainbow) to a series of points on 1 plot

2009-11-29 Thread Frostygoat
I have 11 vectors representing insect survival probabilities in response to different levels of toxins at 10 concentrations lx100=c(1,1,1,.8,.5,.4,.2,0) day100=c(0,1,2,3,4,5,6,7,8) lx90=c(1,1,1,1,.9,.8,.6,.4,.2,.1,0) day90=c(0,1,2,3,4,5,6,7,8,9,10) #...and so on10% and a zero (control) series l

Re: [R] Assign palette (e.g. rainbow) to a series of points on 1 plot

2009-11-29 Thread Frostygoat
Thanks for the suggestion David. With mapply the lines are correctly plotted but they are all red, the points are colored, but along the x axis, not along the individual lines. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-

Re: [R] Assign palette (e.g. rainbow) to a series of points on 1 plot

2009-11-30 Thread Frostygoat
(length( > lx))) > legend('topright',names(lx),pch=1,lty=1,col=rainbow(length(lx))) > title('Survival vs. Time') > >                                         - Phil Spector >                                          Statistical Computing Facility >                                  

[R] Appropriateness of survdiff {survival} for non-censored data

2010-07-07 Thread Frostygoat
I read through Harrington and Fleming (1982) but it is beyond my statistical comprehension. I have survival data for insects that have a very finite expiration date. I'm trying to test for differences in survival distributions between different groups. I understand that the medical field is most

[R] sequential treatment of a vector for formula

2010-05-26 Thread Frostygoat
Please pardon the simplicity of this question of biological nature. I'm trying to calculate a statistic, px, the proportion of a cohort that survives through the interval x:x+1. I have the vector from which the calc is to be made but I can't figure out how to tell R to take the current value and d

Re: [R] sequential treatment of a vector for formula

2010-05-27 Thread Frostygoat
Thanks very much David. Bert, I've seen the Survival package and it does not do what I need, which is to fit Gompertz curves to survival data and compute lifetable statistics for other functions. There is the SSgompertz package for growth curves, not what I need either. ___

[R] transparent grays?

2011-03-31 Thread Frostygoat
Is there a grayscale equivalent to alpha levels in rgb? Example: I have the following to make red transparent circles overlap with previously plotted blue symbols. symbols(x=sites$long,y=sites$lat,circles=log(sites$prop.nem +1),add=T,inches=F,bg=rgb(red=1,green=0,blue=0, alpha=0.5),fg=rgb(red=1,

[R] Rank samples by breaks in hist and assign result as factor

2011-12-06 Thread Frostygoat
Hi R users, My goal is to rank my samples according to how they fall out in a histogram with 10 bins to produce a ranking for each sample according to where it falls on the histogram, with a "1" to represent one tail of the hist, a "10" to represent the other tail, and a "5" for the median/mean. I

[R] Strange horns on notched box plots

2008-10-08 Thread Frostygoat
Hi I'm getting a weird result when I try to switch from a normal box plot to a notched one. The ends of the box fold down toward the median giving a horned appearance. Is just the sample itself? It is small, but the un-notched plot looks okay. Anyway to fix this? e7=as.vector(c(234,37,98,116,4

Re: [R] Strange horns on notched box plots

2008-10-09 Thread Frostygoat
Ben Bolker > >There's not much you can do about this. But at least I understand it now. Thank you. __ 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/postin