Skip to content
Prev 387659 / 398502 Next

"for" loop does not work with my plot_ly command

Hi Rachida,
My guess is that you create a vector of filenames:

filenames<-list.files(path="FicConfig",pattern="*.txt")

then use the filenames in the loop:

for(filename in filenames) {
 nextfile<- read.table(filename, header = TRUE, sep = "\t" , dec =
 ",", skip = 0)
 # do whatever you want with the resulting data frame here
 # or perhaps save it into a list for processing later
}

Jim

On Tue, Mar 30, 2021 at 2:15 AM Rachida El Ouaraini
<elouaraini at gmail.com> wrote: