could not find function "sql.reader"

14 views
Skip to first unread message

RgrNormand

unread,
Oct 2, 2017, 7:19:09 AM10/2/17
to ProjectTemplate
Hi,

Trying to load a .sql file I have used this code:

library(ProjectTemplate)
sql.reader("cep.sql", "/Users/Normand/Downloads/cep.sql", "xx")

But I get this error:

Error in sql.reader("cep.sql", "/Users/Normand/Downloads/cep.sql", "xx") :
  could
not find function "sql.reader"

I am using R 3.4.1 and RStudio 1.2.87. Curiously on the help I find the function sql.reader, but not on console or in the program window.

Any suggestions on how to deal with it?

Kenton White

unread,
Oct 2, 2017, 11:56:24 AM10/2/17
to project...@googlegroups.com
Hi,

sql.reader is not exported into the global name space.  It is kept private to the ProjectTemplate namespace and should not be called directly.  The best way to read in a sql file is to create a project using the create.project() function; put the sql file in the data directory; then load the sql file using the load.project() command.

If you do need to access sql.reader directly, you can do this by explicitly calling sql.reader from the ProjectTemplate namespace using ProjectTemplate:::sql.reader()

Kenton White

--
You received this message because you are subscribed to the Google Groups "ProjectTemplate" group.
To unsubscribe from this group and stop receiving emails from it, send an email to projecttempla...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages