[R] package sampling, function strata

2012-02-01 Thread Elena Guijarro
Dear all, I have to select 122 stratified random samples from a population of 3900 cells. I have 41 strata and I have to draw a different number of samples from them(between 2 and 8). I have tried to apply the funtion strata following the instruction in the manual: strata(dataframe,

[R] mapping bathymetries and species abundances

2011-11-02 Thread Elena Guijarro
Dear all, I am new to R and even newer to mapping with R. I have installed PBSMapping, maptools and maps, and I am struggling to produce a map of fish abundance in the Grand Banks. I have tried several approaches to plot the bathymetry in my study area: 1) download the data from

[R] apply lm function to dataset split by two variables

2011-09-28 Thread Elena Guijarro
Dear all, I am not fluent in R and am struggling to 1) apply a lm to a weight-size dataset, thus the model has to run separately for each species, each year; 2) extract coefs, r-squared, n, etc. The data look like this: yearsps cm w 200950 16 22 200950 17