I am trying to knit a chunk embedded in a latex file with extension Rnw.
library(ggplot2)
library(flexclust)
library(arules)
data(Groceries)
Gr <- Groceries[, itemFrequency(Groceries) > 0.02]
grc <- as(Gr, "matrix")
I get this error:
#Error in as(Gr, "matrix") could not find function "as"
The same commands work perfectly well in R
Any ideas?