Re: [R] Vector of char generated by Sys.getenv function is not available when the package is loaded

2013-09-24 Thread Philippe Grosjean
Hi JCFaria, You package is supposed to be used only under Windows, right? Then, use: OS_type=windows in the DESCRIPTION fileā€¦ and, of course, use R CMD check/R CMD build/ R CMD INSTALL under Windows only. Best, Philippe On 23 Sep 2013, at 20:55, Jose Claudio Faria joseclaudio.fa...@gmail.com

Re: [R] Vector of char generated by Sys.getenv function is not available when the package is loaded

2013-09-24 Thread Prof Brian Ripley
On 24/09/2013 03:51, Jose Claudio Faria wrote: I think I found the main problem! I am developing the package under Linux and after R CMD build, manually compressing the folder TinnRcom inside of the folder TinnRcom.RCheck and installing in Windows. And how on earth did you expect the helpers

Re: [R] Vector of char generated by Sys.getenv function is not available when the package is loaded

2013-09-24 Thread Jose Claudio Faria
Hi, I prefer to build my packages on Linux! I changed the object trPaths as below, After R CMD build TinnRcom on Linux and did the installation on Windows from the source code: It worked very well! I thank all who contributed to the solution and apologize for my lack of knowledge in this area.

Re: [R] Vector of char generated by Sys.getenv function is not available when the package is loaded

2013-09-23 Thread Gabor Grothendieck
On Mon, Sep 23, 2013 at 2:55 PM, Jose Claudio Faria joseclaudio.fa...@gmail.com wrote: trPaths - paste(paste(Sys.getenv('APPDATA'), '\\Tinn-R\\tmp\\', sep=''), c('', 'search.txt',

[R] Vector of char generated by Sys.getenv function is not available when the package is loaded

2013-09-23 Thread Jose Claudio Faria
I have been developing a new package (TinnRcom) to avoid the necessity of any script (as below) in the Rprofile.site file related to the use of Tinn-R Editor and R: #=== # Tinn-R: necessary packages and functions # Tinn-R: = 2.4.1.1 with

Re: [R] Vector of char generated by Sys.getenv function is not available when the package is loaded

2013-09-23 Thread Jose Claudio Faria
I appreciate your attention Gabor. However, the result was the same. :( Both only work when the trPath object is sent to a R session already running. When inside the package the result was the same. remove.packages('TinnRcom') Install.packages('TinnRcom_1.0-09.zip', repos=NULL) # New version

Re: [R] Vector of char generated by Sys.getenv function is not available when the package is loaded

2013-09-23 Thread Jose Claudio Faria
I think I found the main problem! I am developing the package under Linux and after R CMD build, manually compressing the folder TinnRcom inside of the folder TinnRcom.RCheck and installing in Windows. As the APPDATA environment variable does not exist in Linux, the function Sys.getenv (APPDATA)