Displaying 1 result from an estimated 1 matches for "donotprint".
2009 Jan 30
2
Subsetting without partial matches
...like to make a
list of individuals, with a data frame of observations for each individual.
The following code usually works, but not always
----------------------------------------------------------------------
# Make a list of empty data frames
animals = list()
indivs = levels(Z$individual_id)
donotprint <- sapply(indivs, function(i){
animals[[i]] = data.frame()
})
# Add observations of each animal to the appropriate frame
donotprint <- apply(Z, 1, function(r){
ind = r[["individual_id"]]
bind = ind # Use different names to confirm that the partial matching
is being done o...