I received an R script from my prof., it can convert an input adjacency matrix to a network format output. It works properly.
I'd like to write a for loop to make the file converting faster. My input files are in .csv format: ["a (1).csv", ..., "a (128).csv"]. This is my code:
And here's the error message:
Could you tell me what's wrong with my code? Thanks in advance for any help!
I'd like to write a for loop to make the file converting faster. My input files are in .csv format: ["a (1).csv", ..., "a (128).csv"]. This is my code:
Code:
for(x in 2:128)
+ {
+ convert("a (x).csv", "000x.net")
+ }
Code:
Error in file(file, "rt") : cannot open the connection In addition: Warning message:
In file(file, "rt") :
cannot open file 'a (x).csv': No such file or directory