Hello, I'm new to R so this is probably a simple question for somebody.
I have an RScript that reads a CSV on the disk using read.table(...). It then does a boxM test using that data. However, I'm now trying to load the same data via an SQL command, but I can't seem to get the data structure defined so R will like it -- using the included "iris" dataset. I've tried these ways of loading the SQL statement into a compatible R Structure: irisQuery <- data(dbGetQuery(conn, "select * from iris")) irisQuery <- data.frame(dbGetQuery(conn, "select * from iris")) irisQuery <- table(dbGetQuery(conn, "select * from iris")) . . . Followed by: boxM(irisQuery[,-5], irisQuery[,5]) Nothing works work. For example, if i use ... irisQuery <- data.frame(dbGetQuery(conn, "select * from iris")) I get this error from R on the boxM test: Error: is.numeric(x) || is.logical(x) is not TRUE The SQL Statement is returning results, but their not CSV. Not sure if that matters. ------------------- So, how do I read a SQL statement into an R structure like I read the CSV using "read.table" so the boxM test will work? Thanks very much in advance. - M Sent from [ProtonMail](https://protonmail.com), Swiss-based encrypted email. [[alternative HTML version deleted]] ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.