Skip to content

Instantly share code, notes, and snippets.

@xuanlongma
Last active December 14, 2015 11:08
Show Gist options
  • Save xuanlongma/5076675 to your computer and use it in GitHub Desktop.
Save xuanlongma/5076675 to your computer and use it in GitHub Desktop.
simple expression to get specific files under a directory
## This expression will list all files within the dir.hdf
## directory which contains ‘h29v11’ AND ended with the ‘.hdf’ extension.
files.hdf.h29v11 <- list.files(dir.hdf, pattern = '*.h29v11.*.hdf$',
recursive = TRUE, full.names = TRUE)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment