*I am receiving the error message â*Error in file.exists(swf.file) :
invalid 'file' argument*â from my swf2html command. In addition, there is a
command that says the Flash file was created: â*Flash has been created at:
C:\Users\CHERYL\AppData\Local\Temp\Rtmp6n6FXw\file2.swf*â*
*Below is the R code. Thanks in advance for any guidance.*
*g<-c(0.1,0.2,0.3)*
*#This function produces the swf file.*
*myanimation<-function(v){*
*output1=saveSWF({*
*<code>*
*}, img.name <http://img.name/> = "file",swf.name <http://swf.name/> =
"file2.swf" , single.opts = "'utf8': false", autoplay = FALSE , *
*interval = 0.1, imgdir = "directory", htmlfile = "random.html", ani.height
= 500, *
*ani.width = 500, title = "groups", *
*description = c("group1", "group2"))*
*return(output1)*
}
#These commands create the html page.
dir.create(file.path(tempdir(),"R2HTML"))
target <- HTMLInitFile(file.path(tempdir(),"R2HTML"),filename="sample2",
BackGroundColor="#BBBBEE")
HTMLInsertGraph("<br>Title",file=target)
#This for loop calls the animation function with each value of g.
for(v in g){
output2=myanimation(v)
HTML(swf2html(output2),file=target)
}
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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.