cldscchttn

Import data from Rails (JSON) with R

Feb 19th, 2019
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
R 0.24 KB | None | 0 0
  1. library(httr)
  2. url <- GET("http://localhost:5000/observations.json", authenticate("utente", "password"))
  3. dati <-content(url, "parsed")
  4. dati1 <- lapply(dati, lapply, function(x)ifelse(is.null(x), NA, x))
  5. dati_scar <- t(sapply(dati1,unlist))
Add Comment
Please, Sign In to add comment