-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
advices on how to use ggplot2 in rapport templates #98
Comments
Could you please share your |
Well, restarting from a fresh R session, I've still an error but it isn't the "metric info" at this stage? actually when using
The following error appears in Rconsole when executing my
N.B.: there is an empty file generated with the name being By the way, is it an expected behavior that when writing
in my custom *.tpl, the error is printed in the R console and no *.md file is generated, but when writing
(Note the spaces or tabs - same results- in front of each lines )
|
here is my session info
|
In the mean time, my temporary solution was the following <%=
p<-ggplot(mtcars, aes(factor(cyl))) + geom_bar();
myGraphfileName<-"aGraphName";
ggsave(plot = p,width=15,height=10,file=myGraphfileName,path=paste(fRp,"plots",sep="/"));
ltx<-paste("\n","![](",paste(MY_RAPPORT_EXPORT_DIR,"plots",myGraphfileName,sep="/"),")",sep="");
ltx;
%> N.B.: same as above, if a put spaces before the BREW code, the messages aren't printed as a footnote but as inline text, and in this case I have to put a line-break before the Image link ltx<-paste("\n","![](",paste(fRp,"plots",myGraphfileName,sep="/"),")",sep=""); ... other wise the comments and warnings from the ggplot execution + the image link are written on the same line, and hence the image link isn't interpreted! |
Thanks, I could reproduce the bug. |
Thanks again for reporting this issue, the bug was caused by |
Hi daroczig, the plots are well generated BUT there still is a problem in resolving the image url . the plots file names are generated as next in the *.md file the pandoc commande interpret the image link as as you can note the Hence my pdf is never generated! |
@danreb25 could you please let me know the name of the template and maybe the md file uploaded to somewhere (e.g. pastebin)? |
Hi thanks for your quick reply, actually I use a custom template. When I change all the What additional info can I provide you to reproduce the bug? Anyway, for now I stick with my previously mentioned temporary solution. Thanks for your follow up. an additional note regarding this bug:my R output is as next Exported to *I:\R_butsty\Out\MYSLID~1\SUIVIG~1\VOH\GFA_BU~1.[md|pdf]* under 111.93 seconds.
[1] "I:\\R_butsty\\Out\\MYSLID~1\\SUIVIG~1\\VOH\\GFA_BU~1.pdf"
Warning message:
In Pandoc.convert(fp, format = .self$format, open = open, proc.time = as.numeric(proc.time() - :
Pandoc had some problems while converting to pdf:
Pandoc was called as:
pandoc -f markdown -s -V geometry:"left=2cm, right=2cm, bottom=1.5cm" --template I:/R_butsty/Template/Pandoc/gfa_table.latex "I:\R_butsty\Out\MYSLID~1\SUIVIG~1\VOH\GFA_BU~1.md" -o "I:\R_butsty\Out\MYSLID~1\SUIVIG~1\VOH\GFA_BU~1.pdf"
But actually my pdf file isn't generated , shouldn't the warning message be a PandocError message since the file isn't generated? here is the trace by executing the pandoc dos cmd (by the way, it's nice to now have direct access to the generated pandoc cmd)
|
I see the problem now, as |
Can anyone help me with providing an example of using ggplot in a templaet for pdf export?
when using
I've got the following error :
Where should I specify the width and height?
Thanks for your advices
The text was updated successfully, but these errors were encountered: