how can I store data received from websocket API? We all know how to print it to console:
cat("Client got msg:", event$data, "\n")
But what I would like to do is something like:
result <- as.data.frame(fromJSON(event$data))
I know my connection works okay and when I write the result as csv inside the onMessage function, it works but the result object does not show in the environment.
What can be done to actually get the data frame from the call in the global environment?