here is my context-:
context<- '[["2014-01-01","192.168.1.1",41],["2014-01-02","192.168.1.1",30],["2014-01-03","192.168.1.1",25],["2014-01-04","192.168.1.1",0],["2014-01-05","192.168.1.1",0],["2014-01-06","192.168.1.1",30],["2014-01-07","192.168.1.1",40],["2014-01-08","192.168.1.1",41],["2014-01-09","192.168.1.1",30],["2014-01-10","192.168.1.1",25],["2014-01-11","192.168.1.1",0],["2014-01-12","192.168.1.1",0],["2014-01-13","192.168.1.1",30],["2014-01-14","192.168.1.1",40],["2014-01-15","192.168.1.1",40],["2014-01-16","192.168.1.1",30],["2014-01-17","192.168.1.1",25],["2014-01-18","192.168.1.1",0],["2014-01-19","192.168.1.1",0],["2014-01-20","192.168.1.1",30],["2014-01-21","192.168.1.1",40],["2014-01-22","192.168.1.1",40],["2014-01-23","192.168.1.1",30],["2014-01-24","192.168.1.1",25],["2014-01-25","192.168.1.1",0],["2014-01-26","192.168.1.1",0],["2014-01-27","192.168.1.1",30],["2014-01-28","192.168.1.1",40],["2014-01-29","192.168.1.1",41],["2014-01-30","192.168.1.1",30],["2014-01-31","192.168.1.1",25],["2014-02-01","192.168.1.1",0],["2014-02-02","192.168.1.1",0],["2014-02-03","192.168.1.1",30],["2014-02-04","192.168.1.1",40],["2014-02-05","192.168.1.1",40],["2014-02-06","192.168.1.1",30],["2014-02-07","192.168.1.1",25],["2014-02-08","192.168.1.1",0],["2014-02-09","192.168.1.1",0],["2014-02-10","192.168.1.1",30],["2014-02-11","192.168.1.1",40],["2014-02-12","192.168.1.1",40]]'
help me to convert this in dataframe i did this
> data_context<-fromJSON(context)
> data <-
data.frame(
"timeslice" = data_context[, 1],
"host" = data_context[, 2],
"metric" = as.numeric(data_context[, 3])
)
it does not work