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

assembly - What is the addressing mode for ld, add, and rjmp instructions? -

vowpalwabbit - Interpreting Vowpal Wabbit results: Why are some lines appended by "h"? -

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