Steven Kang
2009-Oct-11 23:54 UTC
[R] Loading same libraries (old version & newest version) in r
Hi all, I require 2 RMySQL libraries in order to query from a database. 'RMySQL_0.7-4' (newest version) results in an error when more than 1 field is queried. ''RMySQL_0.5-11' (old version) resolves this issue where more than 1 field can be queried without any errors. However, other queries results in an error messeges (but no error messeges with 'RMySQL_0.7-4' package) Thus, I require two scripts each with different 'RMySQL' packages loaded to query from a database. Are there any commands that will do the job (i.e. loading 2 different libraries from different folder) without having to click 'Pakages' tool bar in th RGui console? Your help in resolving this issue would be appreciated. Steven [[alternative HTML version deleted]]
Patrick Connolly
2009-Oct-12 06:08 UTC
[R] Loading same libraries (old version & newest version) in r
On Mon, 12-Oct-2009 at 10:54AM +1100, Steven Kang wrote: |> Hi all, |> |> I require 2 RMySQL libraries in order to query from a database. You mean you require 2 RMySQL packages. We must be pedantic to answer your question. |> |> 'RMySQL_0.7-4' (newest version) results in an error when more than 1 field |> is queried. |> |> ''RMySQL_0.5-11' (old version) resolves this issue where more than 1 field |> can be queried without any errors. However, other queries results in an |> error messeges (but no error messeges with 'RMySQL_0.7-4' package) |> |> Thus, I require two scripts each with different 'RMySQL' packages loaded to |> query from a database. If you put your *packages* in separate *libraries*, you can load the one you require using the lib.loc parameter, e.g. require(RMySQL, lib.loc = "/path/to/oldPackage") When you wish to use the one in /path/to/newPackage, unload the old one and change the lib.loc value. HTH |> |> Are there any commands that will do the job (i.e. loading 2 different |> libraries from different folder) without having to click 'Pakages' tool bar |> in th RGui console? |> |> Your help in resolving this issue would be appreciated. |> |> |> |> |> |> |> Steven |> |> [[alternative HTML version deleted]] |> |> ______________________________________________ |> R-help at r-project.org mailing list |> 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. -- ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~. ___ Patrick Connolly {~._.~} Great minds discuss ideas _( Y )_ Average minds discuss events (:_~*~_:) Small minds discuss people (_)-(_) ..... Eleanor Roosevelt ~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.~.