I have several files named xdata.asciiand xis a number. How can I import all the files with names of 1data.ascii, for example 100data.ascii. I have other files .asciithat have a different name and do not want to import them.
xdata.ascii
x
1data.ascii
100data.ascii
.ascii
We can use list.filesto get all the template files
list.files
files <- list.files(pattern = "\\d+data\\.ascii", full.names = TRUE)
Then read the files by going through lapplytolist
lapply
list
lst <- lapply(files, read.csv)
Source: https://habr.com/ru/post/1677078/More articles:Is it possible to destroy a component (not dynamically created)? - angularDjango channels work on a local, but not on a server. WebSocket handshake error. - djangoHow can I share a local storage token in one domain, but with another host? - .netРазработка Secure WebSocket Server с использованием С# - c#Search for common references in a matrix and classification by common intersection - matrixSklearn LabelEncoder throws TypeError in sort - scikit-learnScala Play WebSocket - one actor, several types of messages - scalaRunning multiple dockers - dockerHow to change the width of the gutter in VS code? - visual-studio-codeПреобразование CountVectorizer и TfidfTransformer разреженных матриц в отдельные Pandas строки Dataframe - pythonAll Articles