ode:
request_body <- data.frame(DivisionId=c(DivisionId),PrimoId=c(PrimoId),
Ename=c(Ename),Sname=c(Sname),StartDepth=c(StartDepth),
EndDepth=c(EndDepth),SidetrackNum=c(SidetrackNum))
bodyTest <- toJSON(request_body)
r <- POST(url, body = bodyTest, encode = "json")
resultRaw <- content(r, as = "text")
dt <- fromJSON(resultRaw)
- Need to convert this one
division <- length(unlist(DivisionId))
df <- lapply(dt, function(col)
{
data.frame(matrix(unlist(col), ncol=division,byrow=T))
})
df <- data.frame(do.call(cbind, df))
Getting this with Multiple columns instead of one columns for exm. DivisionId, PrimoId etc.
Any Help?
Thanks,
Navjeet