thin | R Documentation |
Take every (say) fifth element from a vector (like a list of filenames, keeping the first and final ones.
thin(x, jump_size = NULL, n = NULL, neg = FALSE)
x |
the vector to be thinned |
jump_size |
pick every 'jump_size'th element |
n |
pick (roughly) length elements, ie set 'jumps = length(x) / n.' |
neg |
Return the elements picked (default behaviour) or the complement (ie all the other elements). |
If you've got 200 frames for a video and want to thin it to around 40, then use this.
thin(1:19, jump = 5)
thin(1:20, n = 6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.