[R] exportation of xml file from R

2009-06-25 Thread guillaume Le Ray
Hello everybody,

I have programed a function to translate the R object structure into a XML
data structure but I haven't found a function in the XML package to export
this data in an XML file!

my data look like that:
Assessor:codec
 33.98159
  28
  6.510894
F)> 1.725149e-22F)>
   
   
6
Assessor:Sample
 33.82264
 126
  1.440098
F)> 1.752742e-03F)>
   
   
7
codec:Sample
253.04055
  18
 75.417587
F)>4.055009e-180F)>
   
   
8
Residuals
214.73234
1152
NA
F)>NAF)>
   
  
 

for data I basically used the function xmlNode,addChildren,xmlchildren. I
don't know if it's sufficient to recognise a xml file


So thanks for your help!


Regards,

Guillaume

[[alternative HTML version deleted]]

__
R-help@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.


[R] save wmf with a batch file

2009-10-06 Thread guillaume Le Ray
Hi R users,

I'm working on a autoreporting with the batch mode of R: I would like to
save the graphs produced in wmf or emf. the problem is, it's working well
with the R gui because we print on the screen the graph devices but not with
the batch. I have used the function dev.print after encounter problem with
win.metafile.


Thanks

Guillaume

[[alternative HTML version deleted]]

__
R-help@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.


[R] problem with pdf in batch mode

2009-10-21 Thread guillaume Le Ray
Hi all R Users,

I am using R in batch mode to do an automatic reporting, I'm saving all the
picture in wmf. When I'm launching manually the batch file(.bat) it's
working but when I'm lauching the batch file from the server I have in the
outputfile the following erro message:

Error in device.call(...) : unable to start device pdf
Calls: total ... trellis.par.get -> trellis.device -> device.call ->
.External
Execution halted

I know that by default in batch mode it's printing the graphs in a pdf file
and I think the error is coming from that but I don't know how to disable
this option.

Thanks


Guillaume Le Ray

Delta, SenseLab

[[alternative HTML version deleted]]

__
R-help@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.


[R] R CMD in batch mode/trycatch() keeps hold on resources

2013-02-13 Thread guillaume Le Ray
HI all,

I am using R (version 2.13.1) in batch mode on a server and I use
trycatch() to handle the exceptions.

When the code run without any exceptions, everything goes fine, however  as
soon as trycatch handle an error, my code works fine but R keeps hold on
the folder after quiting.

Therefore when I try to delete the folder it cannot...

do you have any idea of which function can be the origin of the problem? or
how to kill the process?

Regards,

Guillaume Le Ray

[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] R CMD in batch mode/trycatch() keeps hold on resources

2013-02-14 Thread guillaume Le Ray
Problem fixed.

http://stackoverflow.com/questions/7103429/all-the-connections-are-in-use-execution-halted/7108799#7108799

It can happen when the error handling is not properlly done. trycatch enter
in finally and get stuck.

2013/2/13 guillaume Le Ray 

> HI all,
>
> I am using R (version 2.13.1) in batch mode on a server and I use
> trycatch() to handle the exceptions.
>
> When the code run without any exceptions, everything goes fine, however
>  as soon as trycatch handle an error, my code works fine but R keeps hold
> on the folder after quiting.
>
> Therefore when I try to delete the folder it cannot...
>
> do you have any idea of which function can be the origin of the problem?
> or how to kill the process?
>
> Regards,
>
> Guillaume Le Ray
>

[[alternative HTML version deleted]]

__
R-help@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.


[R] xYplot Hmisc with CI shifting between groups

2010-11-17 Thread guillaume Le Ray
Hi all,

I am trying to do this type of graph (code taken from the example of xYplot
help).

dfr <- expand.grid(month=1:12, continent=c('Europe','USA'),
sex=c('female','male'))
set.seed(1)
dfr <- upData(dfr,
y=month/10 + 1*(sex=='female') + 2*(continent=='Europe') +
runif(48,-.15,.15),
lower=y - runif(48,.05,.15),
upper=y + runif(48,.05,.15))

xYplot(Cbind(y,lower,upper) ~ month,groups=sex,
subset=continent=='Europe', data=dfr)


But I would like to have a small shifting between the the groups in order to
avoid overlapping, the problem is I have to do it in lattice. I looked
throught the options but I did not found my solution.

Best Regards,

Guillaume Le Ray

[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] grImport/ghostscript problems

2011-04-05 Thread guillaume Le Ray
Hi Al,

I'm facing exactly the same problem as you are, have you manage to fix it?
If yes I eager to know the trick.

Regards,

Guillaume

2011/3/27 Al Roark 

> Paul Murrell  auckland.ac.nz> writes:
>
> >
> > Hi
> >
> > On 28/03/2011 8:13 a.m., Al Roark wrote:
> > >
> > > Hi All: I've been struggling for a while trying to get grImport up
> > > and running.  I'm on a Windows 7 (home premium 64 bit) machine
> > > running R-2.12.2 along with GPL Ghostscript 9.01. I've set my Windows
> > > PATH variable to point to the Ghostscript \bin and \lib directories,
> > > and I've created the R_GSCMD environment variable pointing to
> > > gswin32c.exe. I don't have any experience with Ghostscript, but with
> > > the setup described above I can view the postscript file with the
> > > following command to the Windows command prompt: gswin32c.exe
> > > D:\Sndbx\vasarely.ps However, I can't get the PostScriptTrace()
> > > function to work on the same file.  Submitting
> > > PostScriptTrace("D:/Sndbx/vasarely.ps") gives me the error: Error in
> > > PostScriptTrace("D:/Sndbx/vasarely.ps") :   status 127 in running
> > > command 'gswin32c.exe -q -dBATCH -dNOPAUSE -sDEVICE=pswrite
> > > -sOutputFile=C:\Users\Al\AppData\Local\Temp\RtmppPjDAf\file5db99cb
> > > -sstdout=vasarely.ps.xml capturevasarely.ps' Your suggestions are
> > > much appreciated. Cheers, Al [[alternative HTML version deleted]]
> >
> > You could try running the ghostscript command that is printed in the
> > error message at the Windows command prompt to see more info about the
> > problem (might need to remove the '-q' so that ghostscript prints
> > messages to the screen).
> >
> > Paul
> >
>
> Thanks for your reply.
>
> Perhaps this is a Ghostscript problem. When I run the Ghostscript command,
> I'm
> met with the rather unhelpful error: 'GPL Ghostscript 9.01: Unrecoverable
> error,
> exit code 1 (occurs whether or not I remove the -q)'.
>
> Interestingly, if I remove the final argument (in this case,
> capturevasarely.ps)
> the Ghostscript command executes, placing a file (appears to be xml) in the
> temporary directory. However, I'm not sure what to do with this result.
>
> __
> R-help@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.
>

[[alternative HTML version deleted]]

__
R-help@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.


Re: [R] grImport/ghostscript problems

2011-04-06 Thread guillaume Le Ray
Hi Paul,

I'm using the latest version 0.7-2 with the version 9.00 of ghostscript on a
windows XP machine.
The error is still there and there is no xml file genrerated but a .rds
file...

Guillaume

2011/4/5 Paul Murrell 

> Hi
>
>
> On 5/04/2011 9:30 p.m., guillaume Le Ray wrote:
>
>> Hi Al,
>>
>> I'm facing exactly the same problem as you are, have you manage to
>> fix it? If yes I eager to know the trick.
>>
>
> Al's problem turned out to be a bug in 'grImport', so one thing you can try
> is to install the latest version of 'grImport'.
>
> If that still fails, you might be able to get more information about the
> problem by looking at the end of the XML file that is created by
> PostScriptTrace().  If ghostscript has hit trouble it's error messages will
> hopefully be at the end of that XML file.
>
> Paul
>
>
>
>> Regards,
>>
>> Guillaume
>>
>> 2011/3/27 Al Roark
>>
>>  Paul Murrell  auckland.ac.nz>  writes:
>>>
>>>
>>>> Hi
>>>>
>>>> On 28/03/2011 8:13 a.m., Al Roark wrote:
>>>>
>>>>>
>>>>> Hi All: I've been struggling for a while trying to get grImport
>>>>> up and running.  I'm on a Windows 7 (home premium 64 bit)
>>>>> machine running R-2.12.2 along with GPL Ghostscript 9.01. I've
>>>>> set my Windows PATH variable to point to the Ghostscript \bin
>>>>> and \lib directories, and I've created the R_GSCMD environment
>>>>> variable pointing to gswin32c.exe. I don't have any experience
>>>>> with Ghostscript, but with the setup described above I can view
>>>>> the postscript file with the following command to the Windows
>>>>> command prompt: gswin32c.exe D:\Sndbx\vasarely.ps However, I
>>>>> can't get the PostScriptTrace() function to work on the same
>>>>> file.  Submitting PostScriptTrace("D:/Sndbx/vasarely.ps") gives
>>>>> me the error: Error in PostScriptTrace("D:/Sndbx/vasarely.ps")
>>>>> :   status 127 in running command 'gswin32c.exe -q -dBATCH
>>>>> -dNOPAUSE -sDEVICE=pswrite
>>>>> -sOutputFile=C:\Users\Al\AppData\Local\Temp\RtmppPjDAf\file5db99cb
>>>>>
>>>>>
>>>>>  -sstdout=vasarely.ps.xml capturevasarely.ps' Your suggestions are
>
>>  much appreciated. Cheers, Al [[alternative HTML version
>>>>> deleted]]
>>>>>
>>>>
>>>> You could try running the ghostscript command that is printed in
>>>> the error message at the Windows command prompt to see more info
>>>> about the problem (might need to remove the '-q' so that
>>>> ghostscript prints messages to the screen).
>>>>
>>>> Paul
>>>>
>>>>
>>> Thanks for your reply.
>>>
>>> Perhaps this is a Ghostscript problem. When I run the Ghostscript
>>> command, I'm met with the rather unhelpful error: 'GPL Ghostscript
>>> 9.01: Unrecoverable error, exit code 1 (occurs whether or not I
>>> remove the -q)'.
>>>
>>> Interestingly, if I remove the final argument (in this case,
>>> capturevasarely.ps) the Ghostscript command executes, placing a
>>> file (appears to be xml) in the temporary directory. However, I'm
>>> not sure what to do with this result.
>>>
>>> __ R-help@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.
>>>
>>>
>> [[alternative HTML version deleted]]
>>
>> __ R-help@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.
>>
>
> --
> Dr Paul Murrell
> Department of Statistics
> The University of Auckland
> Private Bag 92019
> Auckland
> New Zealand
> 64 9 3737599 x85392
> p...@stat.auckland.ac.nz
> http://www.stat.auckland.ac.nz/~paul/
>

[[alternative HTML version deleted]]

__
R-help@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.


[R] graphic problems with special characters

2012-06-07 Thread guillaume Le Ray
Hi,

I am actually working on some auto-routine to import XML file, run some
analysis on them and create graph as jpeg. The files are in different
language french/english/danish even chinese. At the moment I'm focusing on
the European language. I import them using the XML package and specify
encoding="UTF-8" which seems to work pretty well  when I write the text in
the console, the danish characters æ å ø are printed correctly.

The problem raises when I write these characters in graphics generated with
jpeg(), then the name of the files and the text/title of the graphics are
 not written correctly. I am  completely ignorant in encoding text in R and
I tried my best to find some information on internet I can understand and
re-use to fix my problem but it has been unsuccessful until now.

My configuration is the following :

R version 2.13.1
Microsoft windows XP professional version 2002 with service pack 3

best regards,

Guillaume Le Ray

[[alternative HTML version deleted]]

__
R-help@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.