Sunday, December 13, 2015

Perorming SQL Selects on R Data frames


You can write SQL queries to manipulate data frames in R with sqldf package.
Its like treating the Dataframe as if they were on Relation Database.

So you can import the Spotfire Data table into R as Data frame and on top of that you can perform SQL Queries.


Example:

library(sqldf)
otable<-sqldf('select * from itable')


Below are the packages needs to be installed on R server.

  • chron_2.3-47
  • DBI_0.3.1
  • gsubfn_0.6-6
  • proto_0.3-10
  • RSQLite_1.0.0
  • sqldf_0.4-10

No comments:

Post a Comment