В Sun, 5 Nov 2023 13:35:39 +0000 "Leu Thierry" <thi...@student.ethz.ch> пишет:
> However, when trying to run it I get a very cryptic error message > saying "Error in lst[[nam]][intersect(tim, rownames(lst[[nam]])), > cols, drop = FALSE]: subscript out of bounds". Without a way to reproduce the error, I can offer a few bits of generic advice: 1. Use traceback() to find out where the error happens. You can then type the name of the function at the R prompt to read its source code (although most likely without the comments). 2. Even better, set options(error = recover) before running your code and have the debugger launched at the point where the error happens. Use the debugger (see help(browser) to look at every variable and find out why indeed lst[[nam]] doesn't seem to contain rows with names intersect(tim, rownames(lst[[nam]])) and/or columns with names `cols`. 3. See the free book The R Inferno <https://www.burns-stat.com/documents/books/the-r-inferno/> for more advice on debugging R code. -- Best regards, Ivan ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.