В Sat, 30 Dec 2023 12:18:52 +0000 Andy <phaedr...@gmail.com> пишет:
> filepath <- setwd(tk_choose.dir()) Since you're using tcltk, you can get a file path in one step using tk_choose.files(). (Use multi = FALSE to choose only one file.) > full_filename <- paste(filepath, filename, sep="/") There's also file.path(), which results in slightly more compact, self-documenting code. Nowadays, using '/' as the directory separator can be considered portable, one notable exception being some Windows cmd.exe built-ins (where '/' is interpreted as flag specifier). Perl5 documentation mentions Classic MacOS using ':' as the directory separator (and many other operating systems supporting or emulating Unix-style '/' separators), but that hasn't been relevant for a long while. > Error in x$doc_obj : $ operator is invalid for atomic vectors Which line of code produces the error? What is the argument of docx_summary() at this point? Since you're learning R, I can recommend a couple of free books: Visual Statistics [1] to study the basics of R and The R Inferno [2] for when you get stuck. -- Best regards, Ivan [1] http://web.archive.org/web/20230415001551/http://ashipunov.info/shipunov/school/biol_240/en/visual_statistics.pdf [2] https://www.burns-stat.com/documents/books/the-r-inferno/ ______________________________________________ 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.