[R] Depth vs Temp graph for different transects

2014-09-01 Thread Tinus Sonnekus
Hi All, Have the following code. The graph works well plotting the 15 transect for me however the legend shows a total of 22 transects. The original data has 22 transects numbered from 1 to 22. New data set got only 15. How can I get the legend to show only the transects plotted. # Create Line

[R] Category error resulting in a ylim error

2013-06-21 Thread Tinus Sonnekus
Hi all, So this code works for three of the six seamounts. The problem I am encountering is the fact that some of the seamounts doesn't have all the depth categories (i.e missing the deep category) and thus gives me this error Error in plot.window(...) : need finite 'ylim' values. How can I fix

[R] Help with line graph

2013-06-20 Thread Tinus Sonnekus
Hi Struggling to get this correct today. There is 6 seamounts and I would like each seamount to be a different line colour. The part of data set looks like this Seamount Group.1 DepthmNO3 SiO4 PO4NO2 1 Atlantis Below 177.257182 4.90729821 4.402966 0.4059566

[R] Help reproducing a contour plot

2012-09-19 Thread Tinus Sonnekus
Hi All, I am trying to reproduce this using R instead. [image: Full-size image (38 K)] I tried using the following code *SChla - read.csv(SM_Chla_data.csv)* *Atlantis - SChla[16:66,]* *head(Atlantis)* * * Seamount Station Depth Pico Nano Micro Total_Chdbar Latitude Longitud 16

[R] Maintaining specific order when using aggregate or change order on axis

2012-09-11 Thread Tinus Sonnekus
Hi All, I'm using the following code to produce some stacked bar graphs. *setwd(C:\\Users\\Tinus\\Documents\\NMMU\\R\\Seamounts)* *SChla - read.csv(SM_Chla_data.csv)* * * *#Extract mean values from data file* * * *Coral - SChla[185:223,] #Reduce SChla to Coral only* *coral - with(Coral ,

[R] PCA legend outside of PCA plot

2012-09-09 Thread Tinus Sonnekus
Hi All, I have been trying to get to plot my PCA legend outside of the PCA plot, but success still alludes me. Can you guys please advise how I can achieve this. I used locater() to obtain coordinates for below the Comp.1 axis. Using these coordinates the legend disappears. Below is the code

[R] Producing a table with mean values

2012-09-07 Thread Tinus Sonnekus
Hi All, I have a data set wit three size classes (pico, nano and micro) and 12 different sites (Seamounts). I want to produce a table with the mean and standard deviation values for each site. Seamount PicoNano MicroTotal_Ch 1 Off_Mount 1 0.0691 0.24200 0.00100 0.31210 2