Error in as.data.frame.default(x[[i]], optional = TRUE): cannot coerce class ‘"function"’ to a data.frame

142 views Asked by At

I am trying to make a c chart to analyse new diagnoses but I can't get past this stage. Please see code below:

Error in as.data.frame.default(x[[i]], optional = TRUE): cannot coerce class ‘"function"’ to a data.frame Traceback:

  1. qic(x = col_date, y = col_double(), data = measure1_data, chart = "c", . freeze = ymd(20150201))
  2. data.frame(x, y, n, notes, facets, cl, target)
  3. as.data.frame(x[[i]], optional = TRUE)
  4. as.data.frame.default(x[[i]], optional = TRUE)
  5. stop(gettextf("cannot coerce class %s to a data.frame", sQuote(deparse(class(x))[1L])), . domain = NA)
0

There are 0 answers