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

Delphi change the assembly code of a running process -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -

C++ 11 "class" keyword -