Thank you so much as.character(r) indeed resolved the issue! On Sat, Jun 20, 2020 at 3:47 AM Ivan Krylov <krylov.r...@gmail.com> wrote: > > On Fri, 19 Jun 2020 19:36:41 -0500 > Ana Marija <sokovic.anamar...@gmail.com> wrote: > > > Error in cat(x, file = file, sep = c(rep.int(sep, ncolumns - 1), > > "\n"), : argument 1 (type 'list') cannot be handled by 'cat' > > It might be a good idea to try to solve problems like this yourself > instead of waiting for hours for someone to reply. All the required > information is there in the error message: write() fails because r is a > list. Why is r a list? It's returned from GET(), so let's read its > documentation. > > httr::GET() returns a response object, not a string [1]. Try passing > as.character(r) or content(r,'text') instead of just r to write(...) or > use a different way of extracting the actual response from the response > object. > > -- > Best regards, > Ivan > > [1] https://httr.r-lib.org/reference/GET.html
______________________________________________ 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.