Displaying 2 results from an estimated 2 matches for "tp4533936p4535397".
2012 Apr 05
2
random sample from list
random selection of cells in raster based on distance from xy locations
Hi,
I am trying to sample a raster for random cells that occur within a
specific distance of point locations. I have successfully found multiple
ways of doing this but have memory issues with very large datasets. To
overcome this problem I am working with lists. I am now stuck on how to
randomlly sample the correct elements
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",