Ich verwende HTR, um Zugriff auf Daten von einem API und dann speichern Sie diese Daten, damit ich beginnen kann, einige Daten Validierung zu tun. Ich habe ein Problem beim Zugriff auf die Spalten und Zeilen, da die Daten als verschachtelte Liste gespeichert wurden.Ich bin auf eine API für Daten zugreifen und bin nicht in der Lage, die Spalten in r
query2 <- "this is where my api key in addition to the website I was trying went "
out2 <- GET(url = query2)
http_status(out2)
$category
[1] "Success"
$reason
[1] "OK"
$message
[1] "Success: (200) OK"
dataContent <- content(out2)
names(dataContent)
[1] "Data"
envData <- jsonlite::fromJSON(toJSON(dataContent))
result <- data.frame(envData)
names(result)
[1] "Data.Providers.Name" "Data.Providers.Type"
[3] "Data.Providers.Owner" "Data.Providers.Records"
# when I view the data I can see it in rows and columns
View(result$Data.Providers.Records)
#for some reason its saved as one object and I cannot access individual rows and columns
length(cleanerData)
[1] 1
haben Sie die Indizierung bekommen versucht ? –