Displaying 2 results from an estimated 2 matches for "z_uniqu".
Did you mean:
z_unique
2012 Apr 05
2
random sample from list
...in a 800km buffer of the points,
remove NA cells
z <- extract(mask, pts, buffer=800000,cellnumbers=T)
z_nonna <- lapply(z, na.omit)
###########PROBLEM AREA##########
##If I convert this to a dataframe and find the unique "cells" values
#z2<-as.data.frame(do.call(rbind,z_nonna))
#z_unique<-unique(z2[,1])
##I can tell there there are 9763 unique "cells" values
#How do I randomely sample the **LIST** NOT THE DATAFRAME for 5000 unique
values from "cells". I am working with huge datasets and the data needs to
stay as a list due to memory issues
#Here is how I ha...
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",