Displaying 2 results from an estimated 2 matches for "spdata1".
Did you mean:
  spdata
  
2012 Apr 05
0
Multi part problem...array manipulation and sampling
...ng out.
Part 1.  I have a three dimensional array (species, sites, repeat counts
within sites).  Sampling effort per site varies so the array should be
ragged.
Maximum number of visits at any site = 22
Number of species = 161
Number of sites = 56
I generated the array first by;
mydata<-tapply(spdata1$NTOTAL,list(spdata1$COUNT,spdata1$SPECIES,spdata1$SITESURVEY),sum)
where spdata1$NTOTAL = number of detections 
spdata1$COUNT = repeat visit per site (max = 22)
spdata1$SITESURVEY = site and survey period (=56)
This gives me an array with dim (22,161,56), which is populated by either a
number (NTO...
2012 Mar 25
2
avoiding for loops
I have data that looks like this:
> df1
  group id
1   red  A
2   red  B
3   red  C
4  blue  D
5  blue  E
6  blue  F
I want a list of the groups containing vectors with the ids.    I am
avoiding subset(), as it is
only recommended for interactive use.  Here's what I have so far:
df1 <- data.frame(group=c("red", "red", "red", "blue",