Description Usage Arguments Details Value Author(s) References See Also Examples
Use R to write tag data (tag words, frequency, hyperlinks and colors, etc) into JavaScript, and the JavaScript code will generate a Flash movie. Finally the tag cloud can be created with fantastic 3D rotation effect.
1 2 3 4 5 6 7 | tagCloud(tagData, htmlOutput = "tagCloud.html", SWFPath, JSPath,
divId = "tagCloudId", width = 600, height = 400,
transparent = FALSE, tcolor = "333333", tcolor2 = "009900",
hicolor = "ff0000", distr = "true", tspeed = 100, version = 9,
bgcolor = "ffffff", useXML = FALSE, htmlTitle = "Tag Cloud",
noFlashJS, target = NULL, scriptOnly = FALSE, encode = FALSE,
reserved = FALSE)
|
tagData |
a data.frame containing at least 3 columns: |
htmlOutput |
filename of the HTML output. |
SWFPath |
path of the SWF source file (‘tagcloud.swf’); see |
JSPath |
path of the JavaScript file (‘swfobject.js’); see |
divId |
id of the tag cloud div (HTML layer) |
width, height |
width and height of the tag cloud |
transparent |
logical; whether to use transparent backgroud for the Flash movie? |
tcolor, tcolor2, hicolor, distr, tspeed |
see Details. |
version |
the required Flash version |
bgcolor |
backgroud color of the Flash movie |
useXML |
use XML file for the tag information or just a string; this will be passed to the Flash object as a variable |
htmlTitle |
title of the HTML file |
noFlashJS |
text to show if Flash or JavaScript is not supported |
target |
target window of the hyperlinks; possible values are |
scriptOnly |
print the script in the console only? (if |
encode |
encode the tag XML or not? (with |
reserved |
should reserved characters be encoded? see |
This function is based on the WordPress plugin “wp-cumulus”. If there are any arguments you don't understand, please check the reference.
NULL
Yihui Xie
About the WordPress plugin: http://www.roytanck.com/2008/03/15/wp-cumulus-released/
Explanation of some arguments: http://www.roytanck.com/2008/05/19/how-to-repurpose-my-tag-cloud-flash-movie/
Usage of the SWFObject: http://blog.deconcept.com/swfobject/
An example of visualizing tags in my blog: http://yihui.name/en/2009/06/creating-tag-cloud-using-r-and-flash-javascript-swfobject/
1 2 3 4 5 6 7 8 9 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.