My question is similar to the topic, I would like to load two files at once. I know I can use the function list.files. However, I do not know how to apply it correctly so that my program will work. I would also like to ask how can I make two frames of data for each loaded file. Below is the look of my code (for one file):
txt <- stri_read_lines("script.R")
txt <- txt[txt != ""]
r1 <- strsplit(txt, "")
r2 <- lengths(r1)
r3 <- unlist(r1)
r4 <- rep(
seq_along(r1),
r2
)
r5<- unlist(
lapply(r2, seq_len)
)
TD <- data.frame(
signs = r3,
rows= r4,
columns= r5
)
TD