Reading from file in R when I have a part of its name -



Reading from file in R when I have a part of its name -

how can read file in r when have part of name including starting or ending characters?

thanks

you can utilize list.files, has pattern argument, seek match close can.

writelines(c('hello', 'world'), '~/tmp/example_file_abc') filename <- list.files(path = '~/tmp', pattern = 'file_abc$', full.names = true)[1] readlines(filename) # [1] "hello" "world"

r

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

ubuntu - Bash Script to Check That Files Are Being Created -

Php operator `break` doesn't stop while -