[R] plotting groups via density and different colors

2011-07-18 Thread Jacob Kasper
I have a data set that looks like this: dene <- data.frame(length = c(35,32,33,34,41,40,46,35,41,40,45,36,38,37,39,40,42,42,42,43,44), sex=c(1,1,1,1,2,2,2,1,2,2,2,1,2,2,2,2,2,2,2,2,2)) I would like to plot the density (frequency of occurrence) of each length class but I want to have different colo

Re: [R] "Ghost" values after subsetting

2011-01-13 Thread Jacob Kasper
umn, and > whether you should drop the unused levels. > > Reading the help for factor may be enlightening. > > Sarah > > On Thu, Jan 13, 2011 at 3:57 AM, Jacob Kasper > wrote: > > I am using subset to select the data I want to use for my analysis and > find > &

[R] "Ghost" values after subsetting

2011-01-13 Thread Jacob Kasper
I am using subset to select the data I want to use for my analysis and find that after I subset my data frame on one column I get ghost values in the other columns. here is an example: > table(data$Dags) 2008/04/12 2008/04/13 2008/04/16 2008/04/17 2008/04/19 2008/05/06 103

[R] ancova help

2010-10-19 Thread Jacob Kasper
I am trying to run an ancova and am having trouble setting it up properly. I have nearly 10,000 measurements of fish length, girth and stage of sexual development. I am suspicious that the stage of development is affecting the length (as they get full of eggs they get more round and are more diffic

[R] ancova help

2010-10-19 Thread Jacob Kasper
I am trying to run an ancova and am having trouble setting it up properly. I have nearly 10,000 measurements of fish length, girth and stage of sexual development. I am suspicious that the stage of development is affecting the length (as they get full of eggs they get more round and are more diffic

[R] superscript troubles

2009-11-02 Thread Jacob Kasper
(bty = "n","topright",paste("r2=",round(summary(lat_x)$r.squared,digits=3),", P=",round(coefficients(summary(lat_x))[2,4], digits=3))) Thank you Jacob -- Jacob Kasper http://twitter.com/Protect_Oceans 66°04' N 23°07' W Coastal & Marin

[R] twoord.plot y lab size

2009-10-22 Thread Jacob Kasper
(1985,2010), xlab="Year",ylab="Individuals", rylab="# Stations") -- Jacob Kasper http://twitter.com/Protect_Oceans 66°04' N 23°07' W Coastal & Marine Management Master's Student University Centre of the Westfjords Sundstræti 14

[R] princomp data input format

2009-10-07 Thread Jacob Kasper
I am trying do to a PCA analysis using princomp. I get a result, but I wonder if I have the data in the correct format. My data contains many stations where fish were sampled as well as environmental information for each station (lat, lon, depth, temp and year). the format is like this: species 1|

[R] italics help in plot

2009-10-06 Thread Jacob Kasper
Part of my script reads: speciesName <- names(data)[i] plot(year,depth, xlab="Year", ylab="Depth(m)",main=expression(italic(paste(speciesName))) ) Unfortunately, this just plots *speciesName *on my graph, not the name of the species in italics. Any suggestions on how to resolve this? Thank you J