<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.openoffice.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Wojciech</id>
	<title>Apache OpenOffice Wiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.openoffice.org/w/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Wojciech"/>
	<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/wiki/Special:Contributions/Wojciech"/>
	<updated>2026-08-16T00:35:32Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.35.14</generator>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=78784</id>
		<title>R and Calc: Bugs and Feature Requests</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=78784"/>
		<updated>2008-05-27T03:56:34Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This section is meant to keep track of the bugs plaguing the add-on, as well as any features people would like to see in upcoming versions. For now, there are three categories on this page:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Bugs: &amp;#039;&amp;#039;&amp;#039; things that need to be fixed urgently (ideally, in the next release).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Feature Requests: &amp;#039;&amp;#039;&amp;#039; things that need to be added at some point in the future, but are not necessary for the healthy functioning of the software.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Implemented Requests: &amp;#039;&amp;#039;&amp;#039; once anything in the categories above is implemented, it is moved here.&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
* Passing the following code to RCalcDump causes a NullPointerException:&lt;br /&gt;
:: &amp;lt;code&amp;gt;nls(y ~ a*x + b, data = data.frame(cbind(x = c(1.1, 2.1, 3, 3.9), y = c(1, 2, 3, 4))), start=list(a = 1, b = 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
This is likely because the returned R object has embedded REXPs, functions, and environments.&lt;br /&gt;
* Passing &amp;lt;code&amp;gt;a&amp;lt;-127&amp;lt;/code&amp;gt; to RCalcDump will cause it to print the outputs of the previous statement rather than this one.&lt;br /&gt;
* R optional packages must be installed in the default R location... Otherwise they cannot be loaded.&lt;br /&gt;
* The add-on needs to be installed manually -- Tools &amp;gt; Extension Manager fails to install properly.&lt;br /&gt;
* Very slow in extremely large sets of data (probably due to using TCP/IP to send information).&lt;br /&gt;
* RCalcDump does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
* Installation with extension manager on us_en version of OOo OK, and works as desired, but on Hungarian version R Add-On menu item failed to show in the main menu.&lt;br /&gt;
* Loading external GUI files in Windows XP seems to not work (the files aren&amp;#039;t found) when they are on the Desktop.&lt;br /&gt;
&lt;br /&gt;
== Feature Requests ==&lt;br /&gt;
&lt;br /&gt;
* Dynamic array output. As it stands, you need to know the size of the array if you want the RCalcCoder to output properly.&lt;br /&gt;
* Make it so the {$BASE} keyword can be replaced with code. Currently, RCalcCaller won&amp;#039;t work with&lt;br /&gt;
&amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-var(c(1,2,3,4))&amp;lt;/code&amp;gt;&lt;br /&gt;
But having such code support would be extremely useful.&lt;br /&gt;
* Make the actual syntax more intuitive and easier to use.&lt;br /&gt;
* The getOutputs() function in the RCalcInterface is very inefficient and should be replaced (&amp;#039;&amp;#039;note that this is a fairly substantial coding change&amp;#039;&amp;#039;).&lt;br /&gt;
* Make the coding window non-modal.&lt;br /&gt;
* Allow for saving scripts in spreadsheets.&lt;br /&gt;
* Make the &amp;quot;help()&amp;quot; function available through the add-on.&lt;br /&gt;
* Communication between data.frames and spreadsheets in Calc.&lt;br /&gt;
* Have the ability to update a persistent graphic.  Here&amp;#039;s the use case:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
# User creates a graph (i.e. a histogram) from data.&lt;br /&gt;
# Data changes.  User wishes to update the existing graph rather than generating a new one (b/c of format changes, etc.)&lt;br /&gt;
# This would be more useful if OpenOffice allowed dynamic linking of objects, which I don&amp;#039;t think it does (so that updates to a linked object propagate to linked instances; something that MS Office does fairly well).&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
*Plotting:&lt;br /&gt;
** OOo has no &amp;#039;&amp;#039;&amp;#039;mosaic plot&amp;#039;&amp;#039;&amp;#039; which is a good visualization of summary-results of the data-pilot output. [http://stat.ethz.ch/R-manual/R-patched/library/graphics/html/mosaicplot.html mosaicplot R function]&lt;br /&gt;
** OOo has no &amp;#039;&amp;#039;&amp;#039;fourfold plot&amp;#039;&amp;#039;&amp;#039; [http://cran.r-project.org/src/contrib/Descriptions/vcd.html Visualizing Categorical Data] - also includes extended mosaic and much more&lt;br /&gt;
* Add a way to loop from the coding window... Even a simple &amp;#039;&amp;#039;Loop:&amp;#039;&amp;#039; command would be useful.&lt;br /&gt;
* Visualization.&lt;br /&gt;
** 3D scatterplot doesn&amp;#039;t work.&lt;br /&gt;
** Unclear what a directed graph is.&lt;br /&gt;
* Should have option to point to columns rather than contingency tables for Chi-square and Fisher exact tests.&lt;br /&gt;
* Kaplan-Meier -- not sure how to enter the CI - I thought it would generate curves to demonstrate upper and lower bounds but not sure how to set it -- I entered the value &amp;quot;95&amp;quot; on the cell.&lt;br /&gt;
* ANOVA command doesn&amp;#039;t work at times.&lt;br /&gt;
* Linear regression and GLM need confidence intervals as results.    * ANOVA&lt;br /&gt;
* Factor analysis interface is confusing.&lt;br /&gt;
* ODE Solver -- what is the syntax for the initial condition?&lt;br /&gt;
* Non-linear least squares -- what is the syntax for the start?&lt;br /&gt;
&lt;br /&gt;
=== Future ===&lt;br /&gt;
Here is a List of Ideas. Requires more packages, GUI Interfaces and possibly some coding.&lt;br /&gt;
* Have GUI interfaces for:&lt;br /&gt;
** the [http://had.co.nz/ggplot2/ ggplot package]&lt;br /&gt;
* just more plotting&lt;br /&gt;
** &amp;#039;&amp;#039;&amp;#039;spie chat&amp;#039;&amp;#039;&amp;#039; this one implements pie charts with two parameters (radius and angle, with color codes). [http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=106 example + code]&lt;br /&gt;
* evaluate [http://cran.r-project.org/src/contrib/Views/Finance.html Finance Packages ] for inclusion, with GUI Interface, programming helping functions, documentation, exampels:&lt;br /&gt;
** [http://braverock.com/brian/R/PerformanceAnalytics/html/PerformanceAnalytics-package.html  Econometric tools for performance and risk analysis]&lt;br /&gt;
** [http://www.itp.phys.ethz.ch/econophysics/R/ Rmetrics collection] (also: [http://cran.r-project.org/src/contrib/Descriptions/Rmetrics.html link])&lt;br /&gt;
* same for [http://cran.r-project.org/src/contrib/Views/SocialSciences.html Social Sciences]:&lt;br /&gt;
** collection of functions in &amp;#039;&amp;#039;&amp;#039;Zelig&amp;#039;&amp;#039;&amp;#039; ([http://cran.r-project.org/src/contrib/Descriptions/Zelig.html package (look at the long list of vignettes!], [http://gking.harvard.edu/zelig website]) &amp;#039;&amp;#039;Zelig is an easy-to-use program that can estimate, and help interpret the results of, an enormous range of statistical models. It literally is &amp;quot;everyone&amp;#039;s statistical software&amp;quot; because Zelig&amp;#039;s simple unified framework incorporates everyone else&amp;#039;s (R) code.&amp;#039;&amp;#039; - i think, working with a single framework is easier to implement.&lt;br /&gt;
** [http://cran.r-project.org/src/contrib/Descriptions/eRm.html eRm: Rasch Model]&lt;br /&gt;
** [http://cran.okada.jp.org/src/contrib/Descriptions/plink.html linking]&lt;br /&gt;
* [http://cran.r-project.org/src/contrib/Views/ other interesting packages]&lt;br /&gt;
* Have a look at the following wiki pages for other ideas to implement in the R way:&lt;br /&gt;
** [http://wiki.services.openoffice.org/wiki/Calc/To-Dos/Statistical_Data_Analysis_Tool Calc/To-Dos/Statistical Data Analysis Tool]&lt;br /&gt;
** [http://wiki.services.openoffice.org/wiki/Calc/To-Dos/Statistics/Miscellaneous_Data_Analysis  Calc/To-Dos/Statistics/Miscellaneous Data Analysis]&lt;br /&gt;
* Support for [http://cran.r-project.org/doc/packages/codetools.pdf codetools] for code testing.&lt;br /&gt;
* In collaboration with biostats course.&lt;br /&gt;
** biostats package&lt;br /&gt;
** include videos showing how to use the software&lt;br /&gt;
* It would be great to be able to start Rserve from the menu, or even automatically when the first command is activated.&lt;br /&gt;
* Although it is nice to have the ability to point to which cells should contain results, it is easier to simply select the top right cell for the results and have the rest automatically populated - this would make things simpler is windows with as many parameter as, for example, the one for ANOVA. Maybe should have both options.&lt;br /&gt;
&lt;br /&gt;
== Implemented Requests ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1:&lt;br /&gt;
:: &amp;lt;code&amp;gt;rnorm(1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1 (seems to be a one character input line problem):&lt;br /&gt;
:: &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The *.txt files used for GUI scripting don&amp;#039;t load properly on many computers. May have something to do with using &amp;quot;library&amp;quot;, and &amp;quot;require&amp;quot; might be a better option.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; Passing the following code causes the RCalcCoder to crash:&lt;br /&gt;
:: &amp;lt;code&amp;gt;3+3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#C1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; As it stands, RCalcCaller can&amp;#039;t read values from matrices with equations. This code does not work &amp;lt;code&amp;gt;=RTestConnection()&amp;lt;/code&amp;gt; with a value of 0 or 1, it will throw an error if we refer to this in code. For example, try the code below:&lt;br /&gt;
:: &amp;lt;code&amp;gt;// First, type =RTestConnection() in cell A1.&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a &amp;lt;- {$A1}&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a*3&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; RCalcCaller can&amp;#039;t accept String inputs from cells.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; Need to implement missing values.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Implemented Feature:&amp;#039;&amp;#039;&amp;#039; Need to implement error output -- right now, nothing happens in the coding window.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; Need to implement error checking for GUI input fields.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; Move the &amp;quot;About&amp;quot; window to the main menu, not the &amp;quot;Advanced&amp;quot; tab.&lt;br /&gt;
&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=77463</id>
		<title>R and Calc: Bugs and Feature Requests</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=77463"/>
		<updated>2008-05-16T04:18:29Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This section is meant to keep track of the bugs plaguing the add-on, as well as any features people would like to see in upcoming versions. For now, there are three categories on this page:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Bugs: &amp;#039;&amp;#039;&amp;#039; things that need to be fixed urgently (ideally, in the next release).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Feature Requests: &amp;#039;&amp;#039;&amp;#039; things that need to be added at some point in the future, but are not necessary for the healthy functioning of the software.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Implemented Requests: &amp;#039;&amp;#039;&amp;#039; once anything in the categories above is implemented, it is moved here.&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
* Passing the following code to RCalcDump causes a NullPointerException:&lt;br /&gt;
:: &amp;lt;code&amp;gt;nls(y ~ a*x + b, data = data.frame(cbind(x = c(1.1, 2.1, 3, 3.9), y = c(1, 2, 3, 4))), start=list(a = 1, b = 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
This is likely because the returned R object has embedded REXPs, functions, and environments.&lt;br /&gt;
* Passing &amp;lt;code&amp;gt;a&amp;lt;-127&amp;lt;/code&amp;gt; to RCalcDump will cause it to print the outputs of the previous statement rather than this one.&lt;br /&gt;
* R optional packages must be installed in the default R location... Otherwise they cannot be loaded.&lt;br /&gt;
* The add-on needs to be installed manually -- Tools &amp;gt; Extension Manager fails to install properly.&lt;br /&gt;
* Very slow in extremely large sets of data (probably due to using TCP/IP to send information).&lt;br /&gt;
* RCalcDump does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
* Installation with extension manager on us_en version of OOo OK, and works as desired, but on Hungarian version R Add-On menu item failed to show in the main menu.&lt;br /&gt;
&lt;br /&gt;
== Feature Requests ==&lt;br /&gt;
&lt;br /&gt;
* Dynamic array output. As it stands, you need to know the size of the array if you want the RCalcCoder to output properly.&lt;br /&gt;
* Make it so the {$BASE} keyword can be replaced with code. Currently, RCalcCaller won&amp;#039;t work with&lt;br /&gt;
&amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-var(c(1,2,3,4))&amp;lt;/code&amp;gt;&lt;br /&gt;
But having such code support would be extremely useful.&lt;br /&gt;
* Make the actual syntax more intuitive and easier to use.&lt;br /&gt;
* The getOutputs() function in the RCalcInterface is very inefficient and should be replaced (&amp;#039;&amp;#039;note that this is a fairly substantial coding change&amp;#039;&amp;#039;).&lt;br /&gt;
* Make the coding window non-modal.&lt;br /&gt;
* Allow for saving scripts in spreadsheets.&lt;br /&gt;
* Make the &amp;quot;help()&amp;quot; function available through the add-on.&lt;br /&gt;
* Communication between data.frames and spreadsheets in Calc.&lt;br /&gt;
* Have the ability to update a persistent graphic.  Here&amp;#039;s the use case:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
# User creates a graph (i.e. a histogram) from data.&lt;br /&gt;
# Data changes.  User wishes to update the existing graph rather than generating a new one (b/c of format changes, etc.)&lt;br /&gt;
# This would be more useful if OpenOffice allowed dynamic linking of objects, which I don&amp;#039;t think it does (so that updates to a linked object propagate to linked instances; something that MS Office does fairly well).&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
*Plotting:&lt;br /&gt;
** OOo has no &amp;#039;&amp;#039;&amp;#039;mosaic plot&amp;#039;&amp;#039;&amp;#039; which is a good visualization of summary-results of the data-pilot output. [http://stat.ethz.ch/R-manual/R-patched/library/graphics/html/mosaicplot.html mosaicplot R function]&lt;br /&gt;
** OOo has no &amp;#039;&amp;#039;&amp;#039;fourfold plot&amp;#039;&amp;#039;&amp;#039; [http://cran.r-project.org/src/contrib/Descriptions/vcd.html Visualizing Categorical Data] - also includes extended mosaic and much more&lt;br /&gt;
* Add a way to loop from the coding window... Even a simple &amp;#039;&amp;#039;Loop:&amp;#039;&amp;#039; command would be useful.&lt;br /&gt;
* Visualization.&lt;br /&gt;
** 3D scatterplot doesn&amp;#039;t work.&lt;br /&gt;
** Unclear what a directed graph is.&lt;br /&gt;
* Should have option to point to columns rather than contingency tables for Chi-square and Fisher exact tests.&lt;br /&gt;
* Kaplan-Meier -- not sure how to enter the CI - I thought it would generate curves to demonstrate upper and lower bounds but not sure how to set it -- I entered the value &amp;quot;95&amp;quot; on the cell.&lt;br /&gt;
* ANOVA command doesn&amp;#039;t work at times.&lt;br /&gt;
* Linear regression and GLM need confidence intervals as results.    * ANOVA&lt;br /&gt;
* Factor analysis interface is confusing.&lt;br /&gt;
* ODE Solver -- what is the syntax for the initial condition?&lt;br /&gt;
* Non-linear least squares -- what is the syntax for the start?&lt;br /&gt;
&lt;br /&gt;
=== Future ===&lt;br /&gt;
Here is a List of Ideas. Requires more packages, GUI Interfaces and possibly some coding.&lt;br /&gt;
* Have GUI interfaces for:&lt;br /&gt;
** the [http://had.co.nz/ggplot2/ ggplot package]&lt;br /&gt;
* just more plotting&lt;br /&gt;
** &amp;#039;&amp;#039;&amp;#039;spie chat&amp;#039;&amp;#039;&amp;#039; this one implements pie charts with two parameters (radius and angle, with color codes). [http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=106 example + code]&lt;br /&gt;
* evaluate [http://cran.r-project.org/src/contrib/Views/Finance.html Finance Packages ] for inclusion, with GUI Interface, programming helping functions, documentation, exampels:&lt;br /&gt;
** [http://braverock.com/brian/R/PerformanceAnalytics/html/PerformanceAnalytics-package.html  Econometric tools for performance and risk analysis]&lt;br /&gt;
** [http://www.itp.phys.ethz.ch/econophysics/R/ Rmetrics collection] (also: [http://cran.r-project.org/src/contrib/Descriptions/Rmetrics.html link])&lt;br /&gt;
* same for [http://cran.r-project.org/src/contrib/Views/SocialSciences.html Social Sciences]:&lt;br /&gt;
** collection of functions in &amp;#039;&amp;#039;&amp;#039;Zelig&amp;#039;&amp;#039;&amp;#039; ([http://cran.r-project.org/src/contrib/Descriptions/Zelig.html package (look at the long list of vignettes!], [http://gking.harvard.edu/zelig website]) &amp;#039;&amp;#039;Zelig is an easy-to-use program that can estimate, and help interpret the results of, an enormous range of statistical models. It literally is &amp;quot;everyone&amp;#039;s statistical software&amp;quot; because Zelig&amp;#039;s simple unified framework incorporates everyone else&amp;#039;s (R) code.&amp;#039;&amp;#039; - i think, working with a single framework is easier to implement.&lt;br /&gt;
** [http://cran.r-project.org/src/contrib/Descriptions/eRm.html eRm: Rasch Model]&lt;br /&gt;
** [http://cran.okada.jp.org/src/contrib/Descriptions/plink.html linking]&lt;br /&gt;
* [http://cran.r-project.org/src/contrib/Views/ other interesting packages]&lt;br /&gt;
* Have a look at the following wiki pages for other ideas to implement in the R way:&lt;br /&gt;
** [http://wiki.services.openoffice.org/wiki/Calc/To-Dos/Statistical_Data_Analysis_Tool Calc/To-Dos/Statistical Data Analysis Tool]&lt;br /&gt;
** [http://wiki.services.openoffice.org/wiki/Calc/To-Dos/Statistics/Miscellaneous_Data_Analysis  Calc/To-Dos/Statistics/Miscellaneous Data Analysis]&lt;br /&gt;
* Support for [http://cran.r-project.org/doc/packages/codetools.pdf codetools] for code testing.&lt;br /&gt;
* In collaboration with biostats course.&lt;br /&gt;
** biostats package&lt;br /&gt;
** include videos showing how to use the software&lt;br /&gt;
* It would be great to be able to start Rserve from the menu, or even automatically when the first command is activated.&lt;br /&gt;
* Although it is nice to have the ability to point to which cells should contain results, it is easier to simply select the top right cell for the results and have the rest automatically populated - this would make things simpler is windows with as many parameter as, for example, the one for ANOVA. Maybe should have both options.&lt;br /&gt;
&lt;br /&gt;
== Implemented Requests ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1:&lt;br /&gt;
:: &amp;lt;code&amp;gt;rnorm(1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1 (seems to be a one character input line problem):&lt;br /&gt;
:: &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The *.txt files used for GUI scripting don&amp;#039;t load properly on many computers. May have something to do with using &amp;quot;library&amp;quot;, and &amp;quot;require&amp;quot; might be a better option.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; Passing the following code causes the RCalcCoder to crash:&lt;br /&gt;
:: &amp;lt;code&amp;gt;3+3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#C1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; As it stands, RCalcCaller can&amp;#039;t read values from matrices with equations. This code does not work &amp;lt;code&amp;gt;=RTestConnection()&amp;lt;/code&amp;gt; with a value of 0 or 1, it will throw an error if we refer to this in code. For example, try the code below:&lt;br /&gt;
:: &amp;lt;code&amp;gt;// First, type =RTestConnection() in cell A1.&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a &amp;lt;- {$A1}&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a*3&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; RCalcCaller can&amp;#039;t accept String inputs from cells.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; Need to implement missing values.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Implemented Feature:&amp;#039;&amp;#039;&amp;#039; Need to implement error output -- right now, nothing happens in the coding window.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; Need to implement error checking for GUI input fields.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; Move the &amp;quot;About&amp;quot; window to the main menu, not the &amp;quot;Advanced&amp;quot; tab.&lt;br /&gt;
&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=70618</id>
		<title>R and Calc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=70618"/>
		<updated>2008-03-19T06:25:29Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;blockquote style=&amp;quot;background: white; border: 1px solid rgb(153, 153, 153); padding: 1em;&amp;quot;&amp;gt;This page is meant as a general overview and installation guide for the software. Please see [[R and Calc Documentation]] for more information on functions, scripting, and general usage. Also feel free to submit bug reports in the [[R and Calc: Bugs and Feature Requests]] page, and provide feedback at the [http://extensions.services.openoffice.org/project/R4Calc extension page].&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;R and Calc&amp;quot; is an [[OpenOffice.org]] (OO.o) [[Calc]] add-on that allows you to use [http://www.r-project.org/ R] methods and functions. The software is currently in early development, though a &amp;#039;&amp;#039;&amp;#039;basic&amp;#039;&amp;#039;&amp;#039; working version does exist, and is available for download.&lt;br /&gt;
&lt;br /&gt;
We welcome any and all comments and name suggestions. Please send them to [[User:Wojciech|Wojciech Gryc]].&lt;br /&gt;
&lt;br /&gt;
For those who come here often, here is the latest version:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Version:&amp;#039;&amp;#039;&amp;#039; 0.1.12&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Release Date:&amp;#039;&amp;#039;&amp;#039; February 23, 2008 (5:20 am EST)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Link:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2008-02-23/RAddon.uno.pkg&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Source Code:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2008-02-23/rcalc-0_1_12.zip&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Manual:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2008-02-23/manual.pdf (a [http://researchonresearch.blogspot.com/2008/03/r4calc.html screencast] is also available)&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
You need the following software to run this add-on. While older versions may suffice, they have not been tested yet.&lt;br /&gt;
* OpenOffice.org 2.1&lt;br /&gt;
* Java 5.0&lt;br /&gt;
* RServe 0.4.7&lt;br /&gt;
&lt;br /&gt;
==Installing==&lt;br /&gt;
&lt;br /&gt;
The current version is a prototype and implements only one tool: RDUMP. This method is accessed through the actual Calc menu, and allows you to see the R object structure for various method calls. &lt;br /&gt;
&lt;br /&gt;
To use the add-on, you need to install R and [http://www.rforge.net/Rserve Rserve]. Instructions for installing R can be found at http://www.r-project.org/ Once installed, run R and type the following to install Rserve. Click &amp;quot;enter&amp;quot; at the end of each bullet point:&lt;br /&gt;
&lt;br /&gt;
* install.packages(&amp;quot;Rserve&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Rserve needs to be running to work, and can be launched with the following commands... Note that you only need to do this when you want to use the R Add-on for Calc.&lt;br /&gt;
&lt;br /&gt;
* library(Rserve)&lt;br /&gt;
* Rserve()&lt;br /&gt;
&lt;br /&gt;
Now that you have the prerequisites installed, download the package RAddon.uno.pkg (linked above). Unzip the file, and let&amp;#039;s call the directory you unzipped it in &amp;lt;RA_DIR&amp;gt;. Now let &amp;lt;OO_HOME&amp;gt; be your OpenOffice.org installation directory. Open the command prompt or terminal window and go to &amp;lt;OO_HOME&amp;gt;/program/ and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg add &amp;lt;RA_DIR&amp;gt;/RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
If this is not your first time installing the add-in, you need to check if a previous version is also on the system. If it is, then you will not be able to install the new version. To do this, go to &amp;lt;OO HOME&amp;gt;/program and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg list&lt;br /&gt;
&lt;br /&gt;
This will show you the list of packages already installed, and you should be able to check if the add-is is there. Remember to look for &amp;quot;RAddon.uno.pkg&amp;quot;. You can also skip this step and try to uninstall RAddon.uno.pkg regardless -- this will not harm your OpenOffice.org installation in any way, even if RAddon.uno.pkg is abset. To do this, type:&lt;br /&gt;
&lt;br /&gt;
* unopkg remove RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
Finally, some operating systems require that you restart your OpenOffice.org installation (if you&amp;#039;re not sure, restart your computer) to be able to see the cell functions that come with this package.&lt;br /&gt;
&lt;br /&gt;
==Using==&lt;br /&gt;
&lt;br /&gt;
Using the add-on is very simple at this stage. To see the tool at work, open Calc. In the menus, go to R Add-on &amp;gt; Rdump(). A new dialog window will pop up. Type in an R script -- here are some examples:&lt;br /&gt;
&lt;br /&gt;
* rnorm(10)&lt;br /&gt;
* cor.test(c(1,2,3,4), c(1,2,2,3))&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Run&amp;quot;. A new sheet should appear. Close the dialog with &amp;quot;Close&amp;quot; and check the new sheet -- you should see various pieces of information on the sheet.&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
So far, the software has been tested on the following.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.7===&lt;br /&gt;
&lt;br /&gt;
* 64-bit Gentoo Linux running JDK 1.5.0.12 (64-bit version), OpenOffice 2.2.1, and R 2.4.1&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.6===&lt;br /&gt;
&lt;br /&gt;
* Ubuntu Feisty Fawn on Java 1.6.0 &lt;br /&gt;
&lt;br /&gt;
===Version 0.1.5===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 7 running native Java&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP SP2 running running JDK 1.6.0_02 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.0===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 6 running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP running running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
==About==&lt;br /&gt;
&lt;br /&gt;
This add-on is the result of a Google [[Summer of Code 2007]] project. It was initially created by [[User:Wojciech|Wojciech Gryc]]. For information pertaining to the development of this add-on, see [http://www.11-55.org/ooblog/ Wojciech&amp;#039;s Blog].&lt;br /&gt;
&lt;br /&gt;
==Older Versions==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.11&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-10-08/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-10-08/rcalc-0_1_11.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.10&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-09-08/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-09-08/rcalc-0_1_10.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.9&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-09-04_2/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-09-04_2/rcalc-0_1_9.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.8&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-09-04/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-09-04/rcalc-0_1_8.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.7&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-08-23/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-23/rcalc-0_1_7.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.6&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-08-19/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-19/rcalc-0_1_6.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.5&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-16/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-16/rcalc-0_1_5.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.4&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-10/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-10/rcalc-0_1_4.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.3&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-02/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-02/rcalc-0_1_3.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.2&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-06-01/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-06-01/rcalc-0_1_2.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.1&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-25/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-25/rcalc-0_1_1.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.0&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-15/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-15/rcalc-0.1.0.zip Source Code])&lt;br /&gt;
&lt;br /&gt;
[[Category:Calc]]&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=68927</id>
		<title>R and Calc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=68927"/>
		<updated>2008-03-04T04:27:23Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;blockquote style=&amp;quot;background: white; border: 1px solid rgb(153, 153, 153); padding: 1em;&amp;quot;&amp;gt;This page is meant as a general overview and installation guide for the software. Please see [[R and Calc Documentation]] for more information on functions, scripting, and general usage. Also feel free to submit bug reports in the [[R and Calc: Bugs and Feature Requests]] page, and provide feedback at the [http://extensions.services.openoffice.org/project/R4Calc extension page].&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;R and Calc&amp;quot; is an [[OpenOffice.org]] (OO.o) [[Calc]] add-on that allows you to use [http://www.r-project.org/ R] methods and functions. The software is currently in early development, though a &amp;#039;&amp;#039;&amp;#039;basic&amp;#039;&amp;#039;&amp;#039; working version does exist, and is available for download.&lt;br /&gt;
&lt;br /&gt;
We welcome any and all comments and name suggestions. Please send them to [[User:Wojciech|Wojciech Gryc]].&lt;br /&gt;
&lt;br /&gt;
For those who come here often, here is the latest version:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Version:&amp;#039;&amp;#039;&amp;#039; 0.1.12&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Release Date:&amp;#039;&amp;#039;&amp;#039; February 23, 2008 (5:20 am EST)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Link:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2008-02-23/RAddon.uno.pkg&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Source Code:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2008-02-23/rcalc-0_1_12.zip&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Manual:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2008-02-23/manual.pdf&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
You need the following software to run this add-on. While older versions may suffice, they have not been tested yet.&lt;br /&gt;
* OpenOffice.org 2.1&lt;br /&gt;
* Java 5.0&lt;br /&gt;
* RServe 0.4.7&lt;br /&gt;
&lt;br /&gt;
==Installing==&lt;br /&gt;
&lt;br /&gt;
The current version is a prototype and implements only one tool: RDUMP. This method is accessed through the actual Calc menu, and allows you to see the R object structure for various method calls. &lt;br /&gt;
&lt;br /&gt;
To use the add-on, you need to install R and [http://www.rforge.net/Rserve Rserve]. Instructions for installing R can be found at http://www.r-project.org/ Once installed, run R and type the following to install Rserve. Click &amp;quot;enter&amp;quot; at the end of each bullet point:&lt;br /&gt;
&lt;br /&gt;
* install.packages(&amp;quot;Rserve&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Rserve needs to be running to work, and can be launched with the following commands... Note that you only need to do this when you want to use the R Add-on for Calc.&lt;br /&gt;
&lt;br /&gt;
* library(Rserve)&lt;br /&gt;
* Rserve()&lt;br /&gt;
&lt;br /&gt;
Now that you have the prerequisites installed, download the package RAddon.uno.pkg (linked above). Unzip the file, and let&amp;#039;s call the directory you unzipped it in &amp;lt;RA_DIR&amp;gt;. Now let &amp;lt;OO_HOME&amp;gt; be your OpenOffice.org installation directory. Open the command prompt or terminal window and go to &amp;lt;OO_HOME&amp;gt;/program/ and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg add &amp;lt;RA_DIR&amp;gt;/RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
If this is not your first time installing the add-in, you need to check if a previous version is also on the system. If it is, then you will not be able to install the new version. To do this, go to &amp;lt;OO HOME&amp;gt;/program and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg list&lt;br /&gt;
&lt;br /&gt;
This will show you the list of packages already installed, and you should be able to check if the add-is is there. Remember to look for &amp;quot;RAddon.uno.pkg&amp;quot;. You can also skip this step and try to uninstall RAddon.uno.pkg regardless -- this will not harm your OpenOffice.org installation in any way, even if RAddon.uno.pkg is abset. To do this, type:&lt;br /&gt;
&lt;br /&gt;
* unopkg remove RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
Finally, some operating systems require that you restart your OpenOffice.org installation (if you&amp;#039;re not sure, restart your computer) to be able to see the cell functions that come with this package.&lt;br /&gt;
&lt;br /&gt;
==Using==&lt;br /&gt;
&lt;br /&gt;
Using the add-on is very simple at this stage. To see the tool at work, open Calc. In the menus, go to R Add-on &amp;gt; Rdump(). A new dialog window will pop up. Type in an R script -- here are some examples:&lt;br /&gt;
&lt;br /&gt;
* rnorm(10)&lt;br /&gt;
* cor.test(c(1,2,3,4), c(1,2,2,3))&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Run&amp;quot;. A new sheet should appear. Close the dialog with &amp;quot;Close&amp;quot; and check the new sheet -- you should see various pieces of information on the sheet.&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
So far, the software has been tested on the following.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.7===&lt;br /&gt;
&lt;br /&gt;
* 64-bit Gentoo Linux running JDK 1.5.0.12 (64-bit version), OpenOffice 2.2.1, and R 2.4.1&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.6===&lt;br /&gt;
&lt;br /&gt;
* Ubuntu Feisty Fawn on Java 1.6.0 &lt;br /&gt;
&lt;br /&gt;
===Version 0.1.5===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 7 running native Java&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP SP2 running running JDK 1.6.0_02 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.0===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 6 running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP running running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
==About==&lt;br /&gt;
&lt;br /&gt;
This add-on is the result of a Google [[Summer of Code 2007]] project. It was initially created by [[User:Wojciech|Wojciech Gryc]]. For information pertaining to the development of this add-on, see [http://www.11-55.org/ooblog/ Wojciech&amp;#039;s Blog].&lt;br /&gt;
&lt;br /&gt;
==Older Versions==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.11&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-10-08/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-10-08/rcalc-0_1_11.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.10&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-09-08/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-09-08/rcalc-0_1_10.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.9&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-09-04_2/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-09-04_2/rcalc-0_1_9.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.8&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-09-04/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-09-04/rcalc-0_1_8.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.7&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-08-23/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-23/rcalc-0_1_7.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.6&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-08-19/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-19/rcalc-0_1_6.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.5&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-16/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-16/rcalc-0_1_5.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.4&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-10/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-10/rcalc-0_1_4.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.3&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-02/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-02/rcalc-0_1_3.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.2&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-06-01/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-06-01/rcalc-0_1_2.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.1&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-25/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-25/rcalc-0_1_1.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.0&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-15/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-15/rcalc-0.1.0.zip Source Code])&lt;br /&gt;
&lt;br /&gt;
[[Category:Calc]]&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=67492</id>
		<title>R and Calc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=67492"/>
		<updated>2008-02-23T10:21:12Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;blockquote style=&amp;quot;background: white; border: 1px solid rgb(153, 153, 153); padding: 1em;&amp;quot;&amp;gt;This page is meant as a general overview and installation guide for the software. Please see [[R and Calc Documentation]] for more information on functions, scripting, and general usage. Also feel free to submit bug reports in the [[R and Calc: Bugs and Feature Requests]] page.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;R and Calc&amp;quot; is an [[OpenOffice.org]] (OO.o) [[Calc]] add-on that allows you to use [http://www.r-project.org/ R] methods and functions. The software is currently in early development, though a &amp;#039;&amp;#039;&amp;#039;basic&amp;#039;&amp;#039;&amp;#039; working version does exist, and is available for download.&lt;br /&gt;
&lt;br /&gt;
We welcome any and all comments and name suggestions. Please send them to [[User:Wojciech|Wojciech Gryc]].&lt;br /&gt;
&lt;br /&gt;
For those who come here often, here is the latest version:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Version:&amp;#039;&amp;#039;&amp;#039; 0.1.12&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Release Date:&amp;#039;&amp;#039;&amp;#039; February 23, 2008 (5:20 am EST)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Link:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2008-02-23/RAddon.uno.pkg&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Source Code:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2008-02-23/rcalc-0_1_12.zip&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Manual:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2008-02-23/manual.pdf&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
You need the following software to run this add-on. While older versions may suffice, they have not been tested yet.&lt;br /&gt;
* OpenOffice.org 2.1&lt;br /&gt;
* Java 5.0&lt;br /&gt;
* RServe 0.4.7&lt;br /&gt;
&lt;br /&gt;
==Installing==&lt;br /&gt;
&lt;br /&gt;
The current version is a prototype and implements only one tool: RDUMP. This method is accessed through the actual Calc menu, and allows you to see the R object structure for various method calls. &lt;br /&gt;
&lt;br /&gt;
To use the add-on, you need to install R and [http://www.rforge.net/Rserve Rserve]. Instructions for installing R can be found at http://www.r-project.org/ Once installed, run R and type the following to install Rserve. Click &amp;quot;enter&amp;quot; at the end of each bullet point:&lt;br /&gt;
&lt;br /&gt;
* install.packages(&amp;quot;Rserve&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Rserve needs to be running to work, and can be launched with the following commands... Note that you only need to do this when you want to use the R Add-on for Calc.&lt;br /&gt;
&lt;br /&gt;
* library(Rserve)&lt;br /&gt;
* Rserve()&lt;br /&gt;
&lt;br /&gt;
Now that you have the prerequisites installed, download the package RAddon.uno.pkg (linked above). Unzip the file, and let&amp;#039;s call the directory you unzipped it in &amp;lt;RA_DIR&amp;gt;. Now let &amp;lt;OO_HOME&amp;gt; be your OpenOffice.org installation directory. Open the command prompt or terminal window and go to &amp;lt;OO_HOME&amp;gt;/program/ and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg add &amp;lt;RA_DIR&amp;gt;/RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
If this is not your first time installing the add-in, you need to check if a previous version is also on the system. If it is, then you will not be able to install the new version. To do this, go to &amp;lt;OO HOME&amp;gt;/program and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg list&lt;br /&gt;
&lt;br /&gt;
This will show you the list of packages already installed, and you should be able to check if the add-is is there. Remember to look for &amp;quot;RAddon.uno.pkg&amp;quot;. You can also skip this step and try to uninstall RAddon.uno.pkg regardless -- this will not harm your OpenOffice.org installation in any way, even if RAddon.uno.pkg is abset. To do this, type:&lt;br /&gt;
&lt;br /&gt;
* unopkg remove RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
Finally, some operating systems require that you restart your OpenOffice.org installation (if you&amp;#039;re not sure, restart your computer) to be able to see the cell functions that come with this package.&lt;br /&gt;
&lt;br /&gt;
==Using==&lt;br /&gt;
&lt;br /&gt;
Using the add-on is very simple at this stage. To see the tool at work, open Calc. In the menus, go to R Add-on &amp;gt; Rdump(). A new dialog window will pop up. Type in an R script -- here are some examples:&lt;br /&gt;
&lt;br /&gt;
* rnorm(10)&lt;br /&gt;
* cor.test(c(1,2,3,4), c(1,2,2,3))&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Run&amp;quot;. A new sheet should appear. Close the dialog with &amp;quot;Close&amp;quot; and check the new sheet -- you should see various pieces of information on the sheet.&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
So far, the software has been tested on the following.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.7===&lt;br /&gt;
&lt;br /&gt;
* 64-bit Gentoo Linux running JDK 1.5.0.12 (64-bit version), OpenOffice 2.2.1, and R 2.4.1&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.6===&lt;br /&gt;
&lt;br /&gt;
* Ubuntu Feisty Fawn on Java 1.6.0 &lt;br /&gt;
&lt;br /&gt;
===Version 0.1.5===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 7 running native Java&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP SP2 running running JDK 1.6.0_02 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.0===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 6 running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP running running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
==About==&lt;br /&gt;
&lt;br /&gt;
This add-on is the result of a Google [[Summer of Code 2007]] project. It was initially created by [[User:Wojciech|Wojciech Gryc]]. For information pertaining to the development of this add-on, see [http://www.11-55.org/ooblog/ Wojciech&amp;#039;s Blog].&lt;br /&gt;
&lt;br /&gt;
==Older Versions==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.11&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-10-08/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-10-08/rcalc-0_1_11.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.10&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-09-08/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-09-08/rcalc-0_1_10.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.9&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-09-04_2/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-09-04_2/rcalc-0_1_9.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.8&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-09-04/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-09-04/rcalc-0_1_8.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.7&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-08-23/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-23/rcalc-0_1_7.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.6&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-08-19/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-19/rcalc-0_1_6.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.5&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-16/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-16/rcalc-0_1_5.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.4&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-10/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-10/rcalc-0_1_4.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.3&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-02/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-02/rcalc-0_1_3.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.2&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-06-01/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-06-01/rcalc-0_1_2.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.1&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-25/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-25/rcalc-0_1_1.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.0&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-15/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-15/rcalc-0.1.0.zip Source Code])&lt;br /&gt;
&lt;br /&gt;
[[Category:Calc]]&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=61049</id>
		<title>R and Calc: Bugs and Feature Requests</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=61049"/>
		<updated>2008-01-21T04:31:23Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This section is meant to keep track of the bugs plaguing the add-on, as well as any features people would like to see in upcoming versions. For now, there are three categories on this page:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Bugs: &amp;#039;&amp;#039;&amp;#039; things that need to be fixed urgently (ideally, in the next release).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Feature Requests: &amp;#039;&amp;#039;&amp;#039; things that need to be added at some point in the future, but are not necessary for the healthy functioning of the software.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Implemented Requests: &amp;#039;&amp;#039;&amp;#039; once anything in the categories above is implemented, it is moved here.&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
* Passing the following code to RCalcDump causes a NullPointerException:&lt;br /&gt;
:: &amp;lt;code&amp;gt;nls(y ~ a*x + b, data = data.frame(cbind(x = c(1.1, 2.1, 3, 3.9), y = c(1, 2, 3, 4))), start=list(a = 1, b = 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
This is likely because the returned R object has embedded REXPs, functions, and environments.&lt;br /&gt;
* Passing &amp;lt;code&amp;gt;a&amp;lt;-127&amp;lt;/code&amp;gt; to RCalcDump will cause it to print the outputs of the previous statement rather than this one.&lt;br /&gt;
* R optional packages must be installed in the default R location... Otherwise they cannot be loaded.&lt;br /&gt;
* The add-on needs to be installed manually -- Tools &amp;gt; Extension Manager fails to install properly.&lt;br /&gt;
* Very slow in extremely large sets of data (probably due to using TCP/IP to send information).&lt;br /&gt;
* RCalcDump does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
* Installation with extension manager on us_en version of OOo OK, and works as desired, but on Hungarian version R Add-On menu item failed to show in the main menu.&lt;br /&gt;
&lt;br /&gt;
== Feature Requests ==&lt;br /&gt;
&lt;br /&gt;
* Dynamic array output. As it stands, you need to know the size of the array if you want the RCalcCoder to output properly.&lt;br /&gt;
* Make it so the {$BASE} keyword can be replaced with code. Currently, RCalcCaller won&amp;#039;t work with&lt;br /&gt;
&amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-var(c(1,2,3,4))&amp;lt;/code&amp;gt;&lt;br /&gt;
But having such code support would be extremely useful.&lt;br /&gt;
* Make the actual syntax more intuitive and easier to use.&lt;br /&gt;
* The getOutputs() function in the RCalcInterface is very inefficient and should be replaced (&amp;#039;&amp;#039;note that this is a fairly substantial coding change&amp;#039;&amp;#039;).&lt;br /&gt;
* Make the coding window non-modal.&lt;br /&gt;
* Allow for saving scripts in spreadsheets.&lt;br /&gt;
* Make the &amp;quot;help()&amp;quot; function available through the add-on.&lt;br /&gt;
* Communication between data.frames and spreadsheets in Calc.&lt;br /&gt;
* Have the ability to update a persistent graphic.  Here&amp;#039;s the use case:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
# User creates a graph (i.e. a histogram) from data.&lt;br /&gt;
# Data changes.  User wishes to update the existing graph rather than generating a new one (b/c of format changes, etc.)&lt;br /&gt;
# This would be more useful if OpenOffice allowed dynamic linking of objects, which I don&amp;#039;t think it does (so that updates to a linked object propagate to linked instances; something that MS Office does fairly well).&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
*Plotting:&lt;br /&gt;
** OOo has no &amp;#039;&amp;#039;&amp;#039;mosaic plot&amp;#039;&amp;#039;&amp;#039; which is a good visualization of summary-results of the data-pilot output. [http://stat.ethz.ch/R-manual/R-patched/library/graphics/html/mosaicplot.html mosaicplot R function]&lt;br /&gt;
** OOo has no &amp;#039;&amp;#039;&amp;#039;fourfold plot&amp;#039;&amp;#039;&amp;#039; [http://cran.r-project.org/src/contrib/Descriptions/vcd.html Visualizing Categorical Data] - also includes extended mosaic and much more&lt;br /&gt;
* Add a way to loop from the coding window... Even a simple &amp;#039;&amp;#039;Loop:&amp;#039;&amp;#039; command would be useful.&lt;br /&gt;
&lt;br /&gt;
=== Future ===&lt;br /&gt;
Here is a List of Ideas. Requires more packages, GUI Interfaces and possibly some coding.&lt;br /&gt;
* Have GUI interfaces for:&lt;br /&gt;
** the [http://had.co.nz/ggplot2/ ggplot package]&lt;br /&gt;
* just more plotting&lt;br /&gt;
** &amp;#039;&amp;#039;&amp;#039;spie chat&amp;#039;&amp;#039;&amp;#039; this one implements pie charts with two parameters (radius and angle, with color codes). [http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=106 example + code]&lt;br /&gt;
* evaluate [http://cran.r-project.org/src/contrib/Views/Finance.html Finance Packages ] for inclusion, with GUI Interface, programming helping functions, documentation, exampels:&lt;br /&gt;
** [http://braverock.com/brian/R/PerformanceAnalytics/html/PerformanceAnalytics-package.html  Econometric tools for performance and risk analysis]&lt;br /&gt;
** [http://www.itp.phys.ethz.ch/econophysics/R/ Rmetrics collection] (also: [http://cran.r-project.org/src/contrib/Descriptions/Rmetrics.html link])&lt;br /&gt;
* same for [http://cran.r-project.org/src/contrib/Views/SocialSciences.html Social Sciences]:&lt;br /&gt;
** collection of functions in &amp;#039;&amp;#039;&amp;#039;Zelig&amp;#039;&amp;#039;&amp;#039; ([http://cran.r-project.org/src/contrib/Descriptions/Zelig.html package (look at the long list of vignettes!], [http://gking.harvard.edu/zelig website]) &amp;#039;&amp;#039;Zelig is an easy-to-use program that can estimate, and help interpret the results of, an enormous range of statistical models. It literally is &amp;quot;everyone&amp;#039;s statistical software&amp;quot; because Zelig&amp;#039;s simple unified framework incorporates everyone else&amp;#039;s (R) code.&amp;#039;&amp;#039; - i think, working with a single framework is easier to implement.&lt;br /&gt;
** [http://cran.r-project.org/src/contrib/Descriptions/eRm.html eRm: Rasch Model]&lt;br /&gt;
** [http://cran.okada.jp.org/src/contrib/Descriptions/plink.html linking]&lt;br /&gt;
* [http://cran.r-project.org/src/contrib/Views/ other interesting packages]&lt;br /&gt;
* Have a look at the following wiki pages for other ideas to implement in the R way:&lt;br /&gt;
** [http://wiki.services.openoffice.org/wiki/Calc/To-Dos/Statistical_Data_Analysis_Tool Calc/To-Dos/Statistical Data Analysis Tool]&lt;br /&gt;
** [http://wiki.services.openoffice.org/wiki/Calc/To-Dos/Statistics/Miscellaneous_Data_Analysis  Calc/To-Dos/Statistics/Miscellaneous Data Analysis]&lt;br /&gt;
* Support for [http://cran.r-project.org/doc/packages/codetools.pdf codetools] for code testing.&lt;br /&gt;
&lt;br /&gt;
== Implemented Requests ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1:&lt;br /&gt;
:: &amp;lt;code&amp;gt;rnorm(1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1 (seems to be a one character input line problem):&lt;br /&gt;
:: &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The *.txt files used for GUI scripting don&amp;#039;t load properly on many computers. May have something to do with using &amp;quot;library&amp;quot;, and &amp;quot;require&amp;quot; might be a better option.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; Passing the following code causes the RCalcCoder to crash:&lt;br /&gt;
:: &amp;lt;code&amp;gt;3+3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#C1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; As it stands, RCalcCaller can&amp;#039;t read values from matrices with equations. This code does not work &amp;lt;code&amp;gt;=RTestConnection()&amp;lt;/code&amp;gt; with a value of 0 or 1, it will throw an error if we refer to this in code. For example, try the code below:&lt;br /&gt;
:: &amp;lt;code&amp;gt;// First, type =RTestConnection() in cell A1.&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a &amp;lt;- {$A1}&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a*3&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; RCalcCaller can&amp;#039;t accept String inputs from cells.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; Need to implement missing values.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Implemented Feature:&amp;#039;&amp;#039;&amp;#039; Need to implement error output -- right now, nothing happens in the coding window.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; Need to implement error checking for GUI input fields.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; Move the &amp;quot;About&amp;quot; window to the main menu, not the &amp;quot;Advanced&amp;quot; tab.&lt;br /&gt;
&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=52539</id>
		<title>R and Calc: Bugs and Feature Requests</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=52539"/>
		<updated>2007-11-07T07:04:08Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This section is meant to keep track of the bugs plaguing the add-on, as well as any features people would like to see in upcoming versions. For now, there are three categories on this page:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Bugs: &amp;#039;&amp;#039;&amp;#039; things that need to be fixed urgently (ideally, in the next release).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Feature Requests: &amp;#039;&amp;#039;&amp;#039; things that need to be added at some point in the future, but are not necessary for the healthy functioning of the software.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Implemented Requests: &amp;#039;&amp;#039;&amp;#039; once anything in the categories above is implemented, it is moved here.&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
* Passing the following code to RCalcDump causes a NullPointerException:&lt;br /&gt;
:: &amp;lt;code&amp;gt;nls(y ~ a*x + b, data = data.frame(cbind(x = c(1.1, 2.1, 3, 3.9), y = c(1, 2, 3, 4))), start=list(a = 1, b = 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
This is likely because the returned R object has embedded REXPs, functions, and environments.&lt;br /&gt;
* Passing &amp;lt;code&amp;gt;a&amp;lt;-127&amp;lt;/code&amp;gt; to RCalcDump will cause it to print the outputs of the previous statement rather than this one.&lt;br /&gt;
* R optional packages must be installed in the default R location... Otherwise they cannot be loaded.&lt;br /&gt;
* The add-on needs to be installed manually -- Tools &amp;gt; Extension Manager fails to install properly.&lt;br /&gt;
* Very slow in extremely large sets of data (probably due to using TCP/IP to send information).&lt;br /&gt;
* RCalcDump does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
* Installation with extension manager on us_en version of OOo OK, and works as desired, but on Hungarian version R Add-On menu item failed to show in the main menu.&lt;br /&gt;
&lt;br /&gt;
== Feature Requests ==&lt;br /&gt;
&lt;br /&gt;
* Dynamic array output. As it stands, you need to know the size of the array if you want the RCalcCoder to output properly.&lt;br /&gt;
* Make it so the {$BASE} keyword can be replaced with code. Currently, RCalcCaller won&amp;#039;t work with&lt;br /&gt;
&amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-var(c(1,2,3,4))&amp;lt;/code&amp;gt;&lt;br /&gt;
But having such code support would be extremely useful.&lt;br /&gt;
* Make the actual syntax more intuitive and easier to use.&lt;br /&gt;
* The getOutputs() function in the RCalcInterface is very inefficient and should be replaced (&amp;#039;&amp;#039;note that this is a fairly substantial coding change&amp;#039;&amp;#039;).&lt;br /&gt;
* Make the coding window non-modal.&lt;br /&gt;
* Allow for saving scripts in spreadsheets.&lt;br /&gt;
* Make the &amp;quot;help()&amp;quot; function available through the add-on.&lt;br /&gt;
* Communication between data.frames and spreadsheets in Calc.&lt;br /&gt;
* Have the ability to update a persistent graphic.  Here&amp;#039;s the use case:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
# User creates a graph (i.e. a histogram) from data.&lt;br /&gt;
# Data changes.  User wishes to update the existing graph rather than generating a new one (b/c of format changes, etc.)&lt;br /&gt;
# This would be more useful if OpenOffice allowed dynamic linking of objects, which I don&amp;#039;t think it does (so that updates to a linked object propagate to linked instances; something that MS Office does fairly well).&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
*Plotting:&lt;br /&gt;
** OOo has no &amp;#039;&amp;#039;&amp;#039;mosaic plot&amp;#039;&amp;#039;&amp;#039; which is a good visualization of summary-results of the data-pilot output. [http://stat.ethz.ch/R-manual/R-patched/library/graphics/html/mosaicplot.html mosaicplot R function]&lt;br /&gt;
** OOo has no &amp;#039;&amp;#039;&amp;#039;fourfold plot&amp;#039;&amp;#039;&amp;#039; [http://cran.r-project.org/src/contrib/Descriptions/vcd.html Visualizing Categorical Data] - also includes extended mosaic and much more&lt;br /&gt;
* Add a way to loop from the coding window... Even a simple &amp;#039;&amp;#039;Loop:&amp;#039;&amp;#039; command would be useful.&lt;br /&gt;
&lt;br /&gt;
=== Future ===&lt;br /&gt;
Here is a List of Ideas. Requires more packages, GUI Interfaces and possibly some coding.&lt;br /&gt;
* Have GUI interfaces for:&lt;br /&gt;
** the [http://had.co.nz/ggplot2/ ggplot package]&lt;br /&gt;
* just more plotting&lt;br /&gt;
** &amp;#039;&amp;#039;&amp;#039;spie chat&amp;#039;&amp;#039;&amp;#039; this one implements pie charts with two parameters (radius and angle, with color codes). [http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=106 example + code]&lt;br /&gt;
* evaluate [http://cran.r-project.org/src/contrib/Views/Finance.html Finance Packages ] for inclusion, with GUI Interface, programming helping functions, documentation, exampels:&lt;br /&gt;
** [http://braverock.com/brian/R/PerformanceAnalytics/html/PerformanceAnalytics-package.html  Econometric tools for performance and risk analysis]&lt;br /&gt;
** [http://www.itp.phys.ethz.ch/econophysics/R/ Rmetrics collection] (also: [http://cran.r-project.org/src/contrib/Descriptions/Rmetrics.html link])&lt;br /&gt;
* same for [http://cran.r-project.org/src/contrib/Views/SocialSciences.html Social Sciences]:&lt;br /&gt;
** collection of functions in &amp;#039;&amp;#039;&amp;#039;Zelig&amp;#039;&amp;#039;&amp;#039; ([http://cran.r-project.org/src/contrib/Descriptions/Zelig.html package (look at the long list of vignettes!], [http://gking.harvard.edu/zelig website]) &amp;#039;&amp;#039;Zelig is an easy-to-use program that can estimate, and help interpret the results of, an enormous range of statistical models. It literally is &amp;quot;everyone&amp;#039;s statistical software&amp;quot; because Zelig&amp;#039;s simple unified framework incorporates everyone else&amp;#039;s (R) code.&amp;#039;&amp;#039; - i think, working with a single framework is easier to implement.&lt;br /&gt;
** [http://cran.r-project.org/src/contrib/Descriptions/eRm.html eRm: Rasch Model]&lt;br /&gt;
** [http://cran.okada.jp.org/src/contrib/Descriptions/plink.html linking]&lt;br /&gt;
* [http://cran.r-project.org/src/contrib/Views/ other interesting packages]&lt;br /&gt;
* Have a look at the following wiki pages for other ideas to implement in the R way:&lt;br /&gt;
** [http://wiki.services.openoffice.org/wiki/Calc/To-Dos/Statistical_Data_Analysis_Tool Calc/To-Dos/Statistical Data Analysis Tool]&lt;br /&gt;
** [http://wiki.services.openoffice.org/wiki/Calc/To-Dos/Statistics/Miscellaneous_Data_Analysis  Calc/To-Dos/Statistics/Miscellaneous Data Analysis]&lt;br /&gt;
&lt;br /&gt;
== Implemented Requests ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1:&lt;br /&gt;
:: &amp;lt;code&amp;gt;rnorm(1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1 (seems to be a one character input line problem):&lt;br /&gt;
:: &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The *.txt files used for GUI scripting don&amp;#039;t load properly on many computers. May have something to do with using &amp;quot;library&amp;quot;, and &amp;quot;require&amp;quot; might be a better option.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; Passing the following code causes the RCalcCoder to crash:&lt;br /&gt;
:: &amp;lt;code&amp;gt;3+3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#C1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; As it stands, RCalcCaller can&amp;#039;t read values from matrices with equations. This code does not work &amp;lt;code&amp;gt;=RTestConnection()&amp;lt;/code&amp;gt; with a value of 0 or 1, it will throw an error if we refer to this in code. For example, try the code below:&lt;br /&gt;
:: &amp;lt;code&amp;gt;// First, type =RTestConnection() in cell A1.&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a &amp;lt;- {$A1}&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a*3&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; RCalcCaller can&amp;#039;t accept String inputs from cells.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; Need to implement missing values.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Implemented Feature:&amp;#039;&amp;#039;&amp;#039; Need to implement error output -- right now, nothing happens in the coding window.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; Need to implement error checking for GUI input fields.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; Move the &amp;quot;About&amp;quot; window to the main menu, not the &amp;quot;Advanced&amp;quot; tab.&lt;br /&gt;
&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=49573</id>
		<title>R and Calc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=49573"/>
		<updated>2007-10-08T04:51:16Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;blockquote style=&amp;quot;background: white; border: 1px solid rgb(153, 153, 153); padding: 1em;&amp;quot;&amp;gt;This page is meant as a general overview and installation guide for the software. Please see [[R and Calc Documentation]] for more information on functions, scripting, and general usage. Also feel free to submit bug reports in the [[R and Calc: Bugs and Feature Requests]] page.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;R and Calc&amp;quot; is an [[OpenOffice.org]] (OO.o) [[Calc]] add-on that allows you to use [http://www.r-project.org/ R] methods and functions. The software is currently in early development, though a &amp;#039;&amp;#039;&amp;#039;basic&amp;#039;&amp;#039;&amp;#039; working version does exist, and is available for download.&lt;br /&gt;
&lt;br /&gt;
We welcome any and all comments and name suggestions. Please send them to [[User:Wojciech|Wojciech Gryc]].&lt;br /&gt;
&lt;br /&gt;
For those who come here often, here is the latest version:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Version:&amp;#039;&amp;#039;&amp;#039; 0.1.11&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Release Date:&amp;#039;&amp;#039;&amp;#039; October 8, 2007 (12:50 am EST)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Link:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-10-08/RAddon.uno.pkg&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Source Code:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-10-08/rcalc-0_1_11.zip&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Manual:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-10-08/manual.pdf&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
You need the following software to run this add-on. While older versions may suffice, they have not been tested yet.&lt;br /&gt;
* OpenOffice.org 2.1&lt;br /&gt;
* Java 5.0&lt;br /&gt;
* RServe 0.4.7&lt;br /&gt;
&lt;br /&gt;
==Installing==&lt;br /&gt;
&lt;br /&gt;
The current version is a prototype and implements only one tool: RDUMP. This method is accessed through the actual Calc menu, and allows you to see the R object structure for various method calls. &lt;br /&gt;
&lt;br /&gt;
To use the add-on, you need to install R and [http://www.rforge.net/Rserve Rserve]. Instructions for installing R can be found at http://www.r-project.org/ Once installed, run R and type the following to install Rserve. Click &amp;quot;enter&amp;quot; at the end of each bullet point:&lt;br /&gt;
&lt;br /&gt;
* install.packages(&amp;quot;Rserve&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Rserve needs to be running to work, and can be launched with the following commands... Note that you only need to do this when you want to use the R Add-on for Calc.&lt;br /&gt;
&lt;br /&gt;
* library(Rserve)&lt;br /&gt;
* Rserve()&lt;br /&gt;
&lt;br /&gt;
Now that you have the prerequisites installed, download the package RAddon.uno.pkg (linked above). Unzip the file, and let&amp;#039;s call the directory you unzipped it in &amp;lt;RA_DIR&amp;gt;. Now let &amp;lt;OO_HOME&amp;gt; be your OpenOffice.org installation directory. Open the command prompt or terminal window and go to &amp;lt;OO_HOME&amp;gt;/program/ and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg add &amp;lt;RA_DIR&amp;gt;/RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
If this is not your first time installing the add-in, you need to check if a previous version is also on the system. If it is, then you will not be able to install the new version. To do this, go to &amp;lt;OO HOME&amp;gt;/program and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg list&lt;br /&gt;
&lt;br /&gt;
This will show you the list of packages already installed, and you should be able to check if the add-is is there. Remember to look for &amp;quot;RAddon.uno.pkg&amp;quot;. You can also skip this step and try to uninstall RAddon.uno.pkg regardless -- this will not harm your OpenOffice.org installation in any way, even if RAddon.uno.pkg is abset. To do this, type:&lt;br /&gt;
&lt;br /&gt;
* unopkg remove RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
Finally, some operating systems require that you restart your OpenOffice.org installation (if you&amp;#039;re not sure, restart your computer) to be able to see the cell functions that come with this package.&lt;br /&gt;
&lt;br /&gt;
==Using==&lt;br /&gt;
&lt;br /&gt;
Using the add-on is very simple at this stage. To see the tool at work, open Calc. In the menus, go to R Add-on &amp;gt; Rdump(). A new dialog window will pop up. Type in an R script -- here are some examples:&lt;br /&gt;
&lt;br /&gt;
* rnorm(10)&lt;br /&gt;
* cor.test(c(1,2,3,4), c(1,2,2,3))&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Run&amp;quot;. A new sheet should appear. Close the dialog with &amp;quot;Close&amp;quot; and check the new sheet -- you should see various pieces of information on the sheet.&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
So far, the software has been tested on the following.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.7===&lt;br /&gt;
&lt;br /&gt;
* 64-bit Gentoo Linux running JDK 1.5.0.12 (64-bit version), OpenOffice 2.2.1, and R 2.4.1&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.6===&lt;br /&gt;
&lt;br /&gt;
* Ubuntu Feisty Fawn on Java 1.6.0 &lt;br /&gt;
&lt;br /&gt;
===Version 0.1.5===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 7 running native Java&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP SP2 running running JDK 1.6.0_02 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.0===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 6 running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP running running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
==About==&lt;br /&gt;
&lt;br /&gt;
This add-on is the result of a Google [[Summer of Code 2007]] project. It was initially created by [[User:Wojciech|Wojciech Gryc]]. For information pertaining to the development of this add-on, see [http://www.11-55.org/ooblog/ Wojciech&amp;#039;s Blog].&lt;br /&gt;
&lt;br /&gt;
==Older Versions==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.10&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-09-08/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-09-08/rcalc-0_1_10.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.9&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-09-04_2/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-09-04_2/rcalc-0_1_9.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.8&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-09-04/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-09-04/rcalc-0_1_8.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.7&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-08-23/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-23/rcalc-0_1_7.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.6&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-08-19/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-19/rcalc-0_1_6.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.5&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-16/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-16/rcalc-0_1_5.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.4&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-10/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-10/rcalc-0_1_4.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.3&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-02/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-02/rcalc-0_1_3.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.2&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-06-01/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-06-01/rcalc-0_1_2.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.1&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-25/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-25/rcalc-0_1_1.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.0&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-15/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-15/rcalc-0.1.0.zip Source Code])&lt;br /&gt;
&lt;br /&gt;
[[Category:Calc]]&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=49572</id>
		<title>R and Calc: Bugs and Feature Requests</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=49572"/>
		<updated>2007-10-08T04:39:20Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This section is meant to keep track of the bugs plaguing the add-on, as well as any features people would like to see in upcoming versions. For now, there are three categories on this page:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Bugs: &amp;#039;&amp;#039;&amp;#039; things that need to be fixed urgently (ideally, in the next release).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Feature Requests: &amp;#039;&amp;#039;&amp;#039; things that need to be added at some point in the future, but are not necessary for the healthy functioning of the software.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Implemented Requests: &amp;#039;&amp;#039;&amp;#039; once anything in the categories above is implemented, it is moved here.&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
* Passing the following code to RCalcDump causes a NullPointerException:&lt;br /&gt;
:: &amp;lt;code&amp;gt;nls(y ~ a*x + b, data = data.frame(cbind(x = c(1.1, 2.1, 3, 3.9), y = c(1, 2, 3, 4))), start=list(a = 1, b = 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
This is likely because the returned R object has embedded REXPs, functions, and environments.&lt;br /&gt;
* Passing &amp;lt;code&amp;gt;a&amp;lt;-127&amp;lt;/code&amp;gt; to RCalcDump will cause it to print the outputs of the previous statement rather than this one.&lt;br /&gt;
* R optional packages must be installed in the default R location... Otherwise they cannot be loaded.&lt;br /&gt;
* The add-on needs to be installed manually -- Tools &amp;gt; Extension Manager fails to install properly.&lt;br /&gt;
* Very slow in extremely large sets of data (probably due to using TCP/IP to send information).&lt;br /&gt;
* RCalcDump does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
* Installation with extension manager on us_en version of OOo OK, and works as desired, but on Hungarian version R Add-On menu item failed to show in the main menu.&lt;br /&gt;
&lt;br /&gt;
== Feature Requests ==&lt;br /&gt;
&lt;br /&gt;
* Dynamic array output. As it stands, you need to know the size of the array if you want the RCalcCoder to output properly.&lt;br /&gt;
* Make it so the {$BASE} keyword can be replaced with code. Currently, RCalcCaller won&amp;#039;t work with&lt;br /&gt;
&amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-var(c(1,2,3,4))&amp;lt;/code&amp;gt;&lt;br /&gt;
But having such code support would be extremely useful.&lt;br /&gt;
* Make the actual syntax more intuitive and easier to use.&lt;br /&gt;
* The getOutputs() function in the RCalcInterface is very inefficient and should be replaced (&amp;#039;&amp;#039;note that this is a fairly substantial coding change&amp;#039;&amp;#039;).&lt;br /&gt;
* Make the coding window non-modal.&lt;br /&gt;
* Allow for saving scripts in spreadsheets.&lt;br /&gt;
* Make the &amp;quot;help()&amp;quot; function available through the add-on.&lt;br /&gt;
* Communication between data.frames and spreadsheets in Calc.&lt;br /&gt;
* Have the ability to update a persistent graphic.  Here&amp;#039;s the use case:&lt;br /&gt;
&amp;lt;ol&amp;gt;&lt;br /&gt;
# User creates a graph (i.e. a histogram) from data.&lt;br /&gt;
# Data changes.  User wishes to update the existing graph rather than generating a new one (b/c of format changes, etc.)&lt;br /&gt;
# This would be more useful if OpenOffice allowed dynamic linking of objects, which I don&amp;#039;t think it does (so that updates to a linked object propagate to linked instances; something that MS Office does fairly well).&lt;br /&gt;
&amp;lt;/ol&amp;gt;&lt;br /&gt;
*Plotting:&lt;br /&gt;
** OOo has no &amp;#039;&amp;#039;&amp;#039;mosaic plot&amp;#039;&amp;#039;&amp;#039; which is a good visualization of summary-results of the data-pilot output. [http://stat.ethz.ch/R-manual/R-patched/library/graphics/html/mosaicplot.html mosaicplot R function]&lt;br /&gt;
** OOo has no &amp;#039;&amp;#039;&amp;#039;fourfold plot&amp;#039;&amp;#039;&amp;#039; [http://cran.r-project.org/src/contrib/Descriptions/vcd.html Visualizing Categorical Data] - also includes extended mosaic and much more&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Future ===&lt;br /&gt;
Here is a List of Ideas. Requires more packages, GUI Interfaces and possibly some coding.&lt;br /&gt;
* Have GUI interfaces for:&lt;br /&gt;
** the [http://had.co.nz/ggplot2/ ggplot package]&lt;br /&gt;
* just more plotting&lt;br /&gt;
** &amp;#039;&amp;#039;&amp;#039;spie chat&amp;#039;&amp;#039;&amp;#039; this one implements pie charts with two parameters (radius and angle, with color codes). [http://addictedtor.free.fr/graphiques/RGraphGallery.php?graph=106 example + code]&lt;br /&gt;
* evaluate [http://cran.r-project.org/src/contrib/Views/Finance.html Finance Packages ] for inclusion, with GUI Interface, programming helping functions, documentation, exampels:&lt;br /&gt;
** [http://braverock.com/brian/R/PerformanceAnalytics/html/PerformanceAnalytics-package.html  Econometric tools for performance and risk analysis]&lt;br /&gt;
** [http://www.itp.phys.ethz.ch/econophysics/R/ Rmetrics collection] (also: [http://cran.r-project.org/src/contrib/Descriptions/Rmetrics.html link])&lt;br /&gt;
* same for [http://cran.r-project.org/src/contrib/Views/SocialSciences.html Social Sciences]:&lt;br /&gt;
** collection of functions in &amp;#039;&amp;#039;&amp;#039;Zelig&amp;#039;&amp;#039;&amp;#039; ([http://cran.r-project.org/src/contrib/Descriptions/Zelig.html package (look at the long list of vignettes!], [http://gking.harvard.edu/zelig website]) &amp;#039;&amp;#039;Zelig is an easy-to-use program that can estimate, and help interpret the results of, an enormous range of statistical models. It literally is &amp;quot;everyone&amp;#039;s statistical software&amp;quot; because Zelig&amp;#039;s simple unified framework incorporates everyone else&amp;#039;s (R) code.&amp;#039;&amp;#039; - i think, working with a single framework is easier to implement.&lt;br /&gt;
** [http://cran.r-project.org/src/contrib/Descriptions/eRm.html eRm: Rasch Model]&lt;br /&gt;
** [http://cran.okada.jp.org/src/contrib/Descriptions/plink.html linking]&lt;br /&gt;
* [http://cran.r-project.org/src/contrib/Views/ other interesting packages]&lt;br /&gt;
* Have a look at the following wiki pages for other ideas to implement in the R way:&lt;br /&gt;
** [http://wiki.services.openoffice.org/wiki/Calc/To-Dos/Statistical_Data_Analysis_Tool Calc/To-Dos/Statistical Data Analysis Tool]&lt;br /&gt;
** [http://wiki.services.openoffice.org/wiki/Calc/To-Dos/Statistics/Miscellaneous_Data_Analysis  Calc/To-Dos/Statistics/Miscellaneous Data Analysis]&lt;br /&gt;
&lt;br /&gt;
== Implemented Requests ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1:&lt;br /&gt;
:: &amp;lt;code&amp;gt;rnorm(1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1 (seems to be a one character input line problem):&lt;br /&gt;
:: &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The *.txt files used for GUI scripting don&amp;#039;t load properly on many computers. May have something to do with using &amp;quot;library&amp;quot;, and &amp;quot;require&amp;quot; might be a better option.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; Passing the following code causes the RCalcCoder to crash:&lt;br /&gt;
:: &amp;lt;code&amp;gt;3+3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#C1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; As it stands, RCalcCaller can&amp;#039;t read values from matrices with equations. This code does not work &amp;lt;code&amp;gt;=RTestConnection()&amp;lt;/code&amp;gt; with a value of 0 or 1, it will throw an error if we refer to this in code. For example, try the code below:&lt;br /&gt;
:: &amp;lt;code&amp;gt;// First, type =RTestConnection() in cell A1.&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a &amp;lt;- {$A1}&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a*3&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; RCalcCaller can&amp;#039;t accept String inputs from cells.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; Need to implement missing values.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Implemented Feature:&amp;#039;&amp;#039;&amp;#039; Need to implement error output -- right now, nothing happens in the coding window.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; Need to implement error checking for GUI input fields.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; Move the &amp;quot;About&amp;quot; window to the main menu, not the &amp;quot;Advanced&amp;quot; tab.&lt;br /&gt;
&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=45398</id>
		<title>R and Calc: Bugs and Feature Requests</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=45398"/>
		<updated>2007-09-08T20:42:09Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This section is meant to keep track of the bugs plaguing the add-on, as well as any features people would like to see in upcoming versions. For now, there are three categories on this page:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Bugs: &amp;#039;&amp;#039;&amp;#039; things that need to be fixed urgently (ideally, in the next release).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Feature Requests: &amp;#039;&amp;#039;&amp;#039; things that need to be added at some point in the future, but are not necessary for the healthy functioning of the software.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Implemented Requests: &amp;#039;&amp;#039;&amp;#039; once anything in the categories above is implemented, it is moved here.&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
* Passing the following code to RCalcDump causes a NullPointerException:&lt;br /&gt;
:: &amp;lt;code&amp;gt;nls(y ~ a*x + b, data = data.frame(cbind(x = c(1.1, 2.1, 3, 3.9), y = c(1, 2, 3, 4))), start=list(a = 1, b = 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
This is likely because the returned R object has embedded REXPs, functions, and environments.&lt;br /&gt;
* Passing &amp;lt;code&amp;gt;a&amp;lt;-127&amp;lt;/code&amp;gt; to RCalcDump will cause it to print the outputs of the previous statement rather than this one.&lt;br /&gt;
* R optional packages must be installed in the default R location... Otherwise they cannot be loaded.&lt;br /&gt;
* The add-on needs to be installed manually -- Tools &amp;gt; Extension Manager fails to install properly.&lt;br /&gt;
* Very slow in extremely large sets of data (probably due to using TCP/IP to send information).&lt;br /&gt;
* RCalcDump does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
* Move the &amp;quot;About&amp;quot; window to the main menu, not the &amp;quot;Advanced&amp;quot; tab.&lt;br /&gt;
&lt;br /&gt;
== Feature Requests ==&lt;br /&gt;
&lt;br /&gt;
* Dynamic array output. As it stands, you need to know the size of the array if you want the RCalcCoder to output properly.&lt;br /&gt;
* Make it so the {$BASE} keyword can be replaced with code. Currently, RCalcCaller won&amp;#039;t work with&lt;br /&gt;
&amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-var(c(1,2,3,4))&amp;lt;/code&amp;gt;&lt;br /&gt;
But having such code support would be extremely useful.&lt;br /&gt;
* Make the actual syntax more intuitive and easier to use.&lt;br /&gt;
* The getOutputs() function in the RCalcInterface is very inefficient and should be replaced (&amp;#039;&amp;#039;note that this is a fairly substantial coding change&amp;#039;&amp;#039;).&lt;br /&gt;
* Make the coding window non-modal.&lt;br /&gt;
* Allow for saving scripts in spreadsheets.&lt;br /&gt;
* Make the &amp;quot;help()&amp;quot; function available through the add-on.&lt;br /&gt;
* Communication between data.frames and spreadsheets in Calc.&lt;br /&gt;
* Have the ability to update a persistent graphic.  Here&amp;#039;s the use case:&lt;br /&gt;
** User creates a graph (i.e. a histogram) from data.&lt;br /&gt;
** Data changes.  User wishes to update the existing graph rather than generating a new one (b/c of format changes, etc.)&lt;br /&gt;
** This would be more useful if OpenOffice allowed dynamic linking of objects, which I don&amp;#039;t think it does (so that updates to a linked object propagate to linked instances; something that MS Office does fairly well).&lt;br /&gt;
* Have GUI interfaces for the ggplot package (see http://had.co.nz/ggplot2/).&lt;br /&gt;
&lt;br /&gt;
== Implemented Requests ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1:&lt;br /&gt;
:: &amp;lt;code&amp;gt;rnorm(1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1 (seems to be a one character input line problem):&lt;br /&gt;
:: &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The *.txt files used for GUI scripting don&amp;#039;t load properly on many computers. May have something to do with using &amp;quot;library&amp;quot;, and &amp;quot;require&amp;quot; might be a better option.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; Passing the following code causes the RCalcCoder to crash:&lt;br /&gt;
:: &amp;lt;code&amp;gt;3+3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#C1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; As it stands, RCalcCaller can&amp;#039;t read values from matrices with equations. This code does not work &amp;lt;code&amp;gt;=RTestConnection()&amp;lt;/code&amp;gt; with a value of 0 or 1, it will throw an error if we refer to this in code. For example, try the code below:&lt;br /&gt;
:: &amp;lt;code&amp;gt;// First, type =RTestConnection() in cell A1.&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a &amp;lt;- {$A1}&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a*3&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; RCalcCaller can&amp;#039;t accept String inputs from cells.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; Need to implement missing values.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Implemented Feature:&amp;#039;&amp;#039;&amp;#039; Need to implement error output -- right now, nothing happens in the coding window.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; Need to implement error checking for GUI input fields.&lt;br /&gt;
&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=45397</id>
		<title>R and Calc: Bugs and Feature Requests</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=45397"/>
		<updated>2007-09-08T20:30:09Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This section is meant to keep track of the bugs plaguing the add-on, as well as any features people would like to see in upcoming versions. For now, there are three categories on this page:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Bugs: &amp;#039;&amp;#039;&amp;#039; things that need to be fixed urgently (ideally, in the next release).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Feature Requests: &amp;#039;&amp;#039;&amp;#039; things that need to be added at some point in the future, but are not necessary for the healthy functioning of the software.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Implemented Requests: &amp;#039;&amp;#039;&amp;#039; once anything in the categories above is implemented, it is moved here.&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
* Passing the following code to RCalcDump causes a NullPointerException:&lt;br /&gt;
:: &amp;lt;code&amp;gt;nls(y ~ a*x + b, data = data.frame(cbind(x = c(1.1, 2.1, 3, 3.9), y = c(1, 2, 3, 4))), start=list(a = 1, b = 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
This is likely because the returned R object has embedded REXPs, functions, and environments.&lt;br /&gt;
* Passing &amp;lt;code&amp;gt;a&amp;lt;-127&amp;lt;/code&amp;gt; to RCalcDump will cause it to print the outputs of the previous statement rather than this one.&lt;br /&gt;
* R optional packages must be installed in the default R location... Otherwise they cannot be loaded.&lt;br /&gt;
* The add-on needs to be installed manually -- Tools &amp;gt; Extension Manager fails to install properly.&lt;br /&gt;
* Very slow in extremely large sets of data (probably due to using TCP/IP to send information).&lt;br /&gt;
* RCalcDump does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
* Move the &amp;quot;About&amp;quot; window to the main menu, not the &amp;quot;Advanced&amp;quot; tab.&lt;br /&gt;
* Need to implement error checking for GUI input fields.&lt;br /&gt;
&lt;br /&gt;
== Feature Requests ==&lt;br /&gt;
&lt;br /&gt;
* Dynamic array output. As it stands, you need to know the size of the array if you want the RCalcCoder to output properly.&lt;br /&gt;
* Make it so the {$BASE} keyword can be replaced with code. Currently, RCalcCaller won&amp;#039;t work with&lt;br /&gt;
&amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-var(c(1,2,3,4))&amp;lt;/code&amp;gt;&lt;br /&gt;
But having such code support would be extremely useful.&lt;br /&gt;
* Make the actual syntax more intuitive and easier to use.&lt;br /&gt;
* The getOutputs() function in the RCalcInterface is very inefficient and should be replaced (&amp;#039;&amp;#039;note that this is a fairly substantial coding change&amp;#039;&amp;#039;).&lt;br /&gt;
* Make the coding window non-modal.&lt;br /&gt;
* Allow for saving scripts in spreadsheets.&lt;br /&gt;
* Make the &amp;quot;help()&amp;quot; function available through the add-on.&lt;br /&gt;
* Communication between data.frames and spreadsheets in Calc.&lt;br /&gt;
* Have the ability to update a persistent graphic.  Here&amp;#039;s the use case:&lt;br /&gt;
** User creates a graph (i.e. a histogram) from data.&lt;br /&gt;
** Data changes.  User wishes to update the existing graph rather than generating a new one (b/c of format changes, etc.)&lt;br /&gt;
** This would be more useful if OpenOffice allowed dynamic linking of objects, which I don&amp;#039;t think it does (so that updates to a linked object propagate to linked instances; something that MS Office does fairly well).&lt;br /&gt;
* Have GUI interfaces for the ggplot package (see http://had.co.nz/ggplot2/).&lt;br /&gt;
&lt;br /&gt;
== Implemented Requests ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1:&lt;br /&gt;
:: &amp;lt;code&amp;gt;rnorm(1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1 (seems to be a one character input line problem):&lt;br /&gt;
:: &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The *.txt files used for GUI scripting don&amp;#039;t load properly on many computers. May have something to do with using &amp;quot;library&amp;quot;, and &amp;quot;require&amp;quot; might be a better option.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; Passing the following code causes the RCalcCoder to crash:&lt;br /&gt;
:: &amp;lt;code&amp;gt;3+3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#C1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; As it stands, RCalcCaller can&amp;#039;t read values from matrices with equations. This code does not work &amp;lt;code&amp;gt;=RTestConnection()&amp;lt;/code&amp;gt; with a value of 0 or 1, it will throw an error if we refer to this in code. For example, try the code below:&lt;br /&gt;
:: &amp;lt;code&amp;gt;// First, type =RTestConnection() in cell A1.&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a &amp;lt;- {$A1}&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a*3&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; RCalcCaller can&amp;#039;t accept String inputs from cells.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; Need to implement missing values.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Implemented Feature:&amp;#039;&amp;#039;&amp;#039; Need to implement error output -- right now, nothing happens in the coding window.&lt;br /&gt;
&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=45313</id>
		<title>R and Calc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=45313"/>
		<updated>2007-09-08T07:24:23Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;blockquote style=&amp;quot;background: white; border: 1px solid rgb(153, 153, 153); padding: 1em;&amp;quot;&amp;gt;This page is meant as a general overview and installation guide for the software. Please see [[R and Calc Documentation]] for more information on functions, scripting, and general usage. Also feel free to submit bug reports in the [[R and Calc: Bugs and Feature Requests]] page.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;R and Calc&amp;quot; is an [[OpenOffice.org]] (OO.o) [[Calc]] add-on that allows you to use [http://www.r-project.org/ R] methods and functions. The software is currently in early development, though a &amp;#039;&amp;#039;&amp;#039;basic&amp;#039;&amp;#039;&amp;#039; working version does exist, and is available for download.&lt;br /&gt;
&lt;br /&gt;
We welcome any and all comments and name suggestions. Please send them to [[User:Wojciech|Wojciech Gryc]].&lt;br /&gt;
&lt;br /&gt;
For those who come here often, here is the latest version:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Version:&amp;#039;&amp;#039;&amp;#039; 0.1.10&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Release Date:&amp;#039;&amp;#039;&amp;#039; September 8, 2007 (3:23 am EST)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Link:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-09-08/RAddon.uno.pkg&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Source Code:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-09-08/rcalc-0_1_10.zip&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Manual:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-09-08/manual.pdf&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
You need the following software to run this add-on. While older versions may suffice, they have not been tested yet.&lt;br /&gt;
* OpenOffice.org 2.1&lt;br /&gt;
* Java 5.0&lt;br /&gt;
* RServe 0.4.7&lt;br /&gt;
&lt;br /&gt;
==Installing==&lt;br /&gt;
&lt;br /&gt;
The current version is a prototype and implements only one tool: RDUMP. This method is accessed through the actual Calc menu, and allows you to see the R object structure for various method calls. &lt;br /&gt;
&lt;br /&gt;
To use the add-on, you need to install R and [http://www.rforge.net/Rserve Rserve]. Instructions for installing R can be found at http://www.r-project.org/ Once installed, run R and type the following to install Rserve. Click &amp;quot;enter&amp;quot; at the end of each bullet point:&lt;br /&gt;
&lt;br /&gt;
* install.packages(&amp;quot;Rserve&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Rserve needs to be running to work, and can be launched with the following commands... Note that you only need to do this when you want to use the R Add-on for Calc.&lt;br /&gt;
&lt;br /&gt;
* library(Rserve)&lt;br /&gt;
* Rserve()&lt;br /&gt;
&lt;br /&gt;
Now that you have the prerequisites installed, download the package RAddon.uno.pkg (linked above). Unzip the file, and let&amp;#039;s call the directory you unzipped it in &amp;lt;RA_DIR&amp;gt;. Now let &amp;lt;OO_HOME&amp;gt; be your OpenOffice.org installation directory. Open the command prompt or terminal window and go to &amp;lt;OO_HOME&amp;gt;/program/ and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg add &amp;lt;RA_DIR&amp;gt;/RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
If this is not your first time installing the add-in, you need to check if a previous version is also on the system. If it is, then you will not be able to install the new version. To do this, go to &amp;lt;OO HOME&amp;gt;/program and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg list&lt;br /&gt;
&lt;br /&gt;
This will show you the list of packages already installed, and you should be able to check if the add-is is there. Remember to look for &amp;quot;RAddon.uno.pkg&amp;quot;. You can also skip this step and try to uninstall RAddon.uno.pkg regardless -- this will not harm your OpenOffice.org installation in any way, even if RAddon.uno.pkg is abset. To do this, type:&lt;br /&gt;
&lt;br /&gt;
* unopkg remove RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
Finally, some operating systems require that you restart your OpenOffice.org installation (if you&amp;#039;re not sure, restart your computer) to be able to see the cell functions that come with this package.&lt;br /&gt;
&lt;br /&gt;
==Using==&lt;br /&gt;
&lt;br /&gt;
Using the add-on is very simple at this stage. To see the tool at work, open Calc. In the menus, go to R Add-on &amp;gt; Rdump(). A new dialog window will pop up. Type in an R script -- here are some examples:&lt;br /&gt;
&lt;br /&gt;
* rnorm(10)&lt;br /&gt;
* cor.test(c(1,2,3,4), c(1,2,2,3))&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Run&amp;quot;. A new sheet should appear. Close the dialog with &amp;quot;Close&amp;quot; and check the new sheet -- you should see various pieces of information on the sheet.&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
So far, the software has been tested on the following.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.7===&lt;br /&gt;
&lt;br /&gt;
* 64-bit Gentoo Linux running JDK 1.5.0.12 (64-bit version), OpenOffice 2.2.1, and R 2.4.1&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.6===&lt;br /&gt;
&lt;br /&gt;
* Ubuntu Feisty Fawn on Java 1.6.0 &lt;br /&gt;
&lt;br /&gt;
===Version 0.1.5===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 7 running native Java&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP SP2 running running JDK 1.6.0_02 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.0===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 6 running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP running running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
==About==&lt;br /&gt;
&lt;br /&gt;
This add-on is the result of a Google [[Summer of Code 2007]] project. It was initially created by [[User:Wojciech|Wojciech Gryc]]. For information pertaining to the development of this add-on, see [http://www.11-55.org/ooblog/ Wojciech&amp;#039;s Blog].&lt;br /&gt;
&lt;br /&gt;
==Older Versions==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.9&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-09-04_2/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-09-04_2/rcalc-0_1_9.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.8&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-09-04/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-09-04/rcalc-0_1_8.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.7&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-08-23/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-23/rcalc-0_1_7.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.6&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-08-19/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-19/rcalc-0_1_6.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.5&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-16/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-16/rcalc-0_1_5.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.4&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-10/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-10/rcalc-0_1_4.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.3&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-02/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-02/rcalc-0_1_3.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.2&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-06-01/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-06-01/rcalc-0_1_2.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.1&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-25/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-25/rcalc-0_1_1.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.0&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-15/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-15/rcalc-0.1.0.zip Source Code])&lt;br /&gt;
&lt;br /&gt;
[[Category:Calc]]&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=45312</id>
		<title>R and Calc: Bugs and Feature Requests</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=45312"/>
		<updated>2007-09-08T07:20:13Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This section is meant to keep track of the bugs plaguing the add-on, as well as any features people would like to see in upcoming versions. For now, there are three categories on this page:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Bugs: &amp;#039;&amp;#039;&amp;#039; things that need to be fixed urgently (ideally, in the next release).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Feature Requests: &amp;#039;&amp;#039;&amp;#039; things that need to be added at some point in the future, but are not necessary for the healthy functioning of the software.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Implemented Requests: &amp;#039;&amp;#039;&amp;#039; once anything in the categories above is implemented, it is moved here.&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
* Passing the following code to RCalcDump causes a NullPointerException:&lt;br /&gt;
:: &amp;lt;code&amp;gt;nls(y ~ a*x + b, data = data.frame(cbind(x = c(1.1, 2.1, 3, 3.9), y = c(1, 2, 3, 4))), start=list(a = 1, b = 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
This is likely because the returned R object has embedded REXPs, functions, and environments.&lt;br /&gt;
* Passing &amp;lt;code&amp;gt;a&amp;lt;-127&amp;lt;/code&amp;gt; to RCalcDump will cause it to print the outputs of the previous statement rather than this one.&lt;br /&gt;
* R optional packages must be installed in the default R location... Otherwise they cannot be loaded.&lt;br /&gt;
* The add-on needs to be installed manually -- Tools &amp;gt; Extension Manager fails to install properly.&lt;br /&gt;
* Very slow in extremely large sets of data (probably due to using TCP/IP to send information).&lt;br /&gt;
* RCalcDump does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
* Move the &amp;quot;About&amp;quot; window to the main menu, not the &amp;quot;Advanced&amp;quot; tab.&lt;br /&gt;
&lt;br /&gt;
== Feature Requests ==&lt;br /&gt;
&lt;br /&gt;
* Dynamic array output. As it stands, you need to know the size of the array if you want the RCalcCoder to output properly.&lt;br /&gt;
* Need to implement error output -- right now, nothing happens. This applies to RCalcDump and RCalcCaller.&lt;br /&gt;
* Make it so the {$BASE} keyword can be replaced with code. Currently, RCalcCaller won&amp;#039;t work with&lt;br /&gt;
&amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-var(c(1,2,3,4))&amp;lt;/code&amp;gt;&lt;br /&gt;
But having such code support would be extremely useful.&lt;br /&gt;
* Make the actual syntax more intuitive and easier to use.&lt;br /&gt;
* The getOutputs() function in the RCalcInterface is very inefficient and should be replaced (&amp;#039;&amp;#039;note that this is a fairly substantial coding change&amp;#039;&amp;#039;).&lt;br /&gt;
* Make the coding window non-modal.&lt;br /&gt;
* Allow for saving scripts in spreadsheets.&lt;br /&gt;
* Make the &amp;quot;help()&amp;quot; function available through the add-on.&lt;br /&gt;
* Communication between data.frames and spreadsheets in Calc.&lt;br /&gt;
* Have the ability to update a persistent graphic.  Here&amp;#039;s the use case:&lt;br /&gt;
** User creates a graph (i.e. a histogram) from data.&lt;br /&gt;
** Data changes.  User wishes to update the existing graph rather than generating a new one (b/c of format changes, etc.)&lt;br /&gt;
** This would be more useful if OpenOffice allowed dynamic linking of objects, which I don&amp;#039;t think it does (so that updates to a linked object propagate to linked instances; something that MS Office does fairly well).&lt;br /&gt;
* Have GUI interfaces for the ggplot package (see http://had.co.nz/ggplot2/).&lt;br /&gt;
&lt;br /&gt;
== Implemented Requests ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1:&lt;br /&gt;
:: &amp;lt;code&amp;gt;rnorm(1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1 (seems to be a one character input line problem):&lt;br /&gt;
:: &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The *.txt files used for GUI scripting don&amp;#039;t load properly on many computers. May have something to do with using &amp;quot;library&amp;quot;, and &amp;quot;require&amp;quot; might be a better option.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; Passing the following code causes the RCalcCoder to crash:&lt;br /&gt;
:: &amp;lt;code&amp;gt;3+3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#C1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; As it stands, RCalcCaller can&amp;#039;t read values from matrices with equations. This code does not work &amp;lt;code&amp;gt;=RTestConnection()&amp;lt;/code&amp;gt; with a value of 0 or 1, it will throw an error if we refer to this in code. For example, try the code below:&lt;br /&gt;
:: &amp;lt;code&amp;gt;// First, type =RTestConnection() in cell A1.&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a &amp;lt;- {$A1}&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a*3&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; RCalcCaller can&amp;#039;t accept String inputs from cells.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; Need to implement missing values.&lt;br /&gt;
&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=45301</id>
		<title>R and Calc: Bugs and Feature Requests</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=45301"/>
		<updated>2007-09-08T02:37:17Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This section is meant to keep track of the bugs plaguing the add-on, as well as any features people would like to see in upcoming versions. For now, there are three categories on this page:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Bugs: &amp;#039;&amp;#039;&amp;#039; things that need to be fixed urgently (ideally, in the next release).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Feature Requests: &amp;#039;&amp;#039;&amp;#039; things that need to be added at some point in the future, but are not necessary for the healthy functioning of the software.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Implemented Requests: &amp;#039;&amp;#039;&amp;#039; once anything in the categories above is implemented, it is moved here.&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
* As it stands, RCalcCaller can&amp;#039;t read values from matrices with equations. This code does not work &amp;lt;code&amp;gt;=RTestConnection()&amp;lt;/code&amp;gt; with a value of 0 or 1, it will throw an error if we refer to this in code. For example, try the code below:&lt;br /&gt;
:: &amp;lt;code&amp;gt;// First, type =RTestConnection() in cell A1.&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a &amp;lt;- {$A1}&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a*3&amp;lt;/code&amp;gt;&lt;br /&gt;
* RCalcCaller can&amp;#039;t accept String inputs from cells.&lt;br /&gt;
* Need to implement missing values.&lt;br /&gt;
* Passing the following code to RCalcDump causes a NullPointerException:&lt;br /&gt;
:: &amp;lt;code&amp;gt;nls(y ~ a*x + b, data = data.frame(cbind(x = c(1.1, 2.1, 3, 3.9), y = c(1, 2, 3, 4))), start=list(a = 1, b = 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
This is likely because the returned R object has embedded REXPs, functions, and environments.&lt;br /&gt;
* Passing &amp;lt;code&amp;gt;a&amp;lt;-127&amp;lt;/code&amp;gt; to RCalcDump will cause it to print the outputs of the previous statement rather than this one.&lt;br /&gt;
* R optional packages must be installed in the default R location... Otherwise they cannot be loaded.&lt;br /&gt;
* The add-on needs to be installed manually -- Tools &amp;gt; Extension Manager fails to install properly.&lt;br /&gt;
* Very slow in extremely large sets of data (probably due to using TCP/IP to send information).&lt;br /&gt;
* RCalcDump does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
* Move the &amp;quot;About&amp;quot; window to the main menu, not the &amp;quot;Advanced&amp;quot; tab.&lt;br /&gt;
&lt;br /&gt;
== Feature Requests ==&lt;br /&gt;
&lt;br /&gt;
* Dynamic array output. As it stands, you need to know the size of the array if you want the RCalcCoder to output properly.&lt;br /&gt;
* Need to implement error output -- right now, nothing happens. This applies to RCalcDump and RCalcCaller.&lt;br /&gt;
* Make it so the {$BASE} keyword can be replaced with code. Currently, RCalcCaller won&amp;#039;t work with&lt;br /&gt;
&amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-var(c(1,2,3,4))&amp;lt;/code&amp;gt;&lt;br /&gt;
But having such code support would be extremely useful.&lt;br /&gt;
* Make the actual syntax more intuitive and easier to use.&lt;br /&gt;
* The getOutputs() function in the RCalcInterface is very inefficient and should be replaced (&amp;#039;&amp;#039;note that this is a fairly substantial coding change&amp;#039;&amp;#039;).&lt;br /&gt;
* Make the coding window non-modal.&lt;br /&gt;
* Allow for saving scripts in spreadsheets.&lt;br /&gt;
* Make the &amp;quot;help()&amp;quot; function available through the add-on.&lt;br /&gt;
* Communication between data.frames and spreadsheets in Calc.&lt;br /&gt;
* Have the ability to update a persistent graphic.  Here&amp;#039;s the use case:&lt;br /&gt;
** User creates a graph (i.e. a histogram) from data.&lt;br /&gt;
** Data changes.  User wishes to update the existing graph rather than generating a new one (b/c of format changes, etc.)&lt;br /&gt;
** This would be more useful if OpenOffice allowed dynamic linking of objects, which I don&amp;#039;t think it does (so that updates to a linked object propagate to linked instances; something that MS Office does fairly well).&lt;br /&gt;
* Have GUI interfaces for the ggplot package (see http://had.co.nz/ggplot2/).&lt;br /&gt;
&lt;br /&gt;
== Implemented Requests ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1:&lt;br /&gt;
:: &amp;lt;code&amp;gt;rnorm(1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1 (seems to be a one character input line problem):&lt;br /&gt;
:: &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The *.txt files used for GUI scripting don&amp;#039;t load properly on many computers. May have something to do with using &amp;quot;library&amp;quot;, and &amp;quot;require&amp;quot; might be a better option.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; Passing the following code causes the RCalcCoder to crash:&lt;br /&gt;
:: &amp;lt;code&amp;gt;3+3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#C1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=45300</id>
		<title>R and Calc: Bugs and Feature Requests</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=45300"/>
		<updated>2007-09-08T02:33:07Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This section is meant to keep track of the bugs plaguing the add-on, as well as any features people would like to see in upcoming versions. For now, there are three categories on this page:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Bugs: &amp;#039;&amp;#039;&amp;#039; things that need to be fixed urgently (ideally, in the next release).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Feature Requests: &amp;#039;&amp;#039;&amp;#039; things that need to be added at some point in the future, but are not necessary for the healthy functioning of the software.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Implemented Requests: &amp;#039;&amp;#039;&amp;#039; once anything in the categories above is implemented, it is moved here.&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
* As it stands, RCalcCaller can&amp;#039;t read values from matrices with equations. This code does not work &amp;lt;code&amp;gt;=RTestConnection()&amp;lt;/code&amp;gt; with a value of 0 or 1, it will throw an error if we refer to this in code. For example, try the code below:&lt;br /&gt;
:: &amp;lt;code&amp;gt;// First, type =RTestConnection() in cell A1.&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a &amp;lt;- {$A1}&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a*3&amp;lt;/code&amp;gt;&lt;br /&gt;
* RCalcCaller can&amp;#039;t accept String inputs from cells.&lt;br /&gt;
* Need to implement missing values.&lt;br /&gt;
* Passing the following code to RCalcDump causes a NullPointerException:&lt;br /&gt;
:: &amp;lt;code&amp;gt;nls(y ~ a*x + b, data = data.frame(cbind(x = c(1.1, 2.1, 3, 3.9), y = c(1, 2, 3, 4))), start=list(a = 1, b = 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
This is likely because the returned R object has embedded REXPs, functions, and environments.&lt;br /&gt;
* Passing &amp;lt;code&amp;gt;a&amp;lt;-127&amp;lt;/code&amp;gt; to RCalcDump will cause it to print the outputs of the previous statement rather than this one.&lt;br /&gt;
* R optional packages must be installed in the default R location... Otherwise they cannot be loaded.&lt;br /&gt;
* The add-on needs to be installed manually -- Tools &amp;gt; Extension Manager fails to install properly.&lt;br /&gt;
* Very slow in extremely large sets of data (probably due to using TCP/IP to send information).&lt;br /&gt;
* RCalcDump does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
&lt;br /&gt;
== Feature Requests ==&lt;br /&gt;
&lt;br /&gt;
* Dynamic array output. As it stands, you need to know the size of the array if you want the RCalcCoder to output properly.&lt;br /&gt;
* Need to implement error output -- right now, nothing happens. This applies to RCalcDump and RCalcCaller.&lt;br /&gt;
* Make it so the {$BASE} keyword can be replaced with code. Currently, RCalcCaller won&amp;#039;t work with&lt;br /&gt;
&amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-var(c(1,2,3,4))&amp;lt;/code&amp;gt;&lt;br /&gt;
But having such code support would be extremely useful.&lt;br /&gt;
* Make the actual syntax more intuitive and easier to use.&lt;br /&gt;
* The getOutputs() function in the RCalcInterface is very inefficient and should be replaced (&amp;#039;&amp;#039;note that this is a fairly substantial coding change&amp;#039;&amp;#039;).&lt;br /&gt;
* Make the coding window non-modal.&lt;br /&gt;
* Allow for saving scripts in spreadsheets.&lt;br /&gt;
* Make the &amp;quot;help()&amp;quot; function available through the add-on.&lt;br /&gt;
* Communication between data.frames and spreadsheets in Calc.&lt;br /&gt;
* Have the ability to update a persistent graphic.  Here&amp;#039;s the use case:&lt;br /&gt;
** User creates a graph (i.e. a histogram) from data.&lt;br /&gt;
** Data changes.  User wishes to update the existing graph rather than generating a new one (b/c of format changes, etc.)&lt;br /&gt;
** This would be more useful if OpenOffice allowed dynamic linking of objects, which I don&amp;#039;t think it does (so that updates to a linked object propagate to linked instances; something that MS Office does fairly well).&lt;br /&gt;
* Have GUI interfaces for the ggplot package (see http://had.co.nz/ggplot2/).&lt;br /&gt;
&lt;br /&gt;
== Implemented Requests ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1:&lt;br /&gt;
:: &amp;lt;code&amp;gt;rnorm(1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1 (seems to be a one character input line problem):&lt;br /&gt;
:: &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The *.txt files used for GUI scripting don&amp;#039;t load properly on many computers. May have something to do with using &amp;quot;library&amp;quot;, and &amp;quot;require&amp;quot; might be a better option.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; Passing the following code causes the RCalcCoder to crash:&lt;br /&gt;
:: &amp;lt;code&amp;gt;3+3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#C1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=45299</id>
		<title>R and Calc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=45299"/>
		<updated>2007-09-08T02:31:30Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;blockquote style=&amp;quot;background: white; border: 1px solid rgb(153, 153, 153); padding: 1em;&amp;quot;&amp;gt;This page is meant as a general overview and installation guide for the software. Please see [[R and Calc Documentation]] for more information on functions, scripting, and general usage. Also feel free to submit bug reports in the [[R and Calc: Bugs and Feature Requests]] page.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;R and Calc&amp;quot; is an [[OpenOffice.org]] (OO.o) [[Calc]] add-on that allows you to use [http://www.r-project.org/ R] methods and functions. The software is currently in early development, though a &amp;#039;&amp;#039;&amp;#039;basic&amp;#039;&amp;#039;&amp;#039; working version does exist, and is available for download.&lt;br /&gt;
&lt;br /&gt;
We welcome any and all comments and name suggestions. Please send them to [[User:Wojciech|Wojciech Gryc]].&lt;br /&gt;
&lt;br /&gt;
For those who come here often, here is the latest version:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Version:&amp;#039;&amp;#039;&amp;#039; 0.1.9&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Release Date:&amp;#039;&amp;#039;&amp;#039; September 4, 2007 (4:07 pm EST)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Link:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-09-04_2/RAddon.uno.pkg&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Source Code:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-09-04_2/rcalc-0_1_9.zip&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Manual:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-09-04_2/manual.pdf&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
You need the following software to run this add-on. While older versions may suffice, they have not been tested yet.&lt;br /&gt;
* OpenOffice.org 2.1&lt;br /&gt;
* Java 5.0&lt;br /&gt;
* RServe 0.4.7&lt;br /&gt;
&lt;br /&gt;
==Installing==&lt;br /&gt;
&lt;br /&gt;
The current version is a prototype and implements only one tool: RDUMP. This method is accessed through the actual Calc menu, and allows you to see the R object structure for various method calls. &lt;br /&gt;
&lt;br /&gt;
To use the add-on, you need to install R and [http://www.rforge.net/Rserve Rserve]. Instructions for installing R can be found at http://www.r-project.org/ Once installed, run R and type the following to install Rserve. Click &amp;quot;enter&amp;quot; at the end of each bullet point:&lt;br /&gt;
&lt;br /&gt;
* install.packages(&amp;quot;Rserve&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Rserve needs to be running to work, and can be launched with the following commands... Note that you only need to do this when you want to use the R Add-on for Calc.&lt;br /&gt;
&lt;br /&gt;
* library(Rserve)&lt;br /&gt;
* Rserve()&lt;br /&gt;
&lt;br /&gt;
Now that you have the prerequisites installed, download the package RAddon.uno.pkg (linked above). Unzip the file, and let&amp;#039;s call the directory you unzipped it in &amp;lt;RA_DIR&amp;gt;. Now let &amp;lt;OO_HOME&amp;gt; be your OpenOffice.org installation directory. Open the command prompt or terminal window and go to &amp;lt;OO_HOME&amp;gt;/program/ and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg add &amp;lt;RA_DIR&amp;gt;/RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
If this is not your first time installing the add-in, you need to check if a previous version is also on the system. If it is, then you will not be able to install the new version. To do this, go to &amp;lt;OO HOME&amp;gt;/program and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg list&lt;br /&gt;
&lt;br /&gt;
This will show you the list of packages already installed, and you should be able to check if the add-is is there. Remember to look for &amp;quot;RAddon.uno.pkg&amp;quot;. You can also skip this step and try to uninstall RAddon.uno.pkg regardless -- this will not harm your OpenOffice.org installation in any way, even if RAddon.uno.pkg is abset. To do this, type:&lt;br /&gt;
&lt;br /&gt;
* unopkg remove RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
Finally, some operating systems require that you restart your OpenOffice.org installation (if you&amp;#039;re not sure, restart your computer) to be able to see the cell functions that come with this package.&lt;br /&gt;
&lt;br /&gt;
==Using==&lt;br /&gt;
&lt;br /&gt;
Using the add-on is very simple at this stage. To see the tool at work, open Calc. In the menus, go to R Add-on &amp;gt; Rdump(). A new dialog window will pop up. Type in an R script -- here are some examples:&lt;br /&gt;
&lt;br /&gt;
* rnorm(10)&lt;br /&gt;
* cor.test(c(1,2,3,4), c(1,2,2,3))&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Run&amp;quot;. A new sheet should appear. Close the dialog with &amp;quot;Close&amp;quot; and check the new sheet -- you should see various pieces of information on the sheet.&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
So far, the software has been tested on the following.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.7===&lt;br /&gt;
&lt;br /&gt;
* 64-bit Gentoo Linux running JDK 1.5.0.12 (64-bit version), OpenOffice 2.2.1, and R 2.4.1&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.6===&lt;br /&gt;
&lt;br /&gt;
* Ubuntu Feisty Fawn on Java 1.6.0 &lt;br /&gt;
&lt;br /&gt;
===Version 0.1.5===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 7 running native Java&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP SP2 running running JDK 1.6.0_02 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.0===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 6 running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP running running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
==About==&lt;br /&gt;
&lt;br /&gt;
This add-on is the result of a Google [[Summer of Code 2007]] project. It was initially created by [[User:Wojciech|Wojciech Gryc]]. For information pertaining to the development of this add-on, see [http://www.11-55.org/ooblog/ Wojciech&amp;#039;s Blog].&lt;br /&gt;
&lt;br /&gt;
==Older Versions==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.8&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-09-04/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-09-04/rcalc-0_1_8.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.7&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-08-23/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-23/rcalc-0_1_7.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.6&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-08-19/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-19/rcalc-0_1_6.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.5&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-16/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-16/rcalc-0_1_5.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.4&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-10/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-10/rcalc-0_1_4.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.3&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-02/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-02/rcalc-0_1_3.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.2&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-06-01/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-06-01/rcalc-0_1_2.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.1&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-25/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-25/rcalc-0_1_1.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.0&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-15/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-15/rcalc-0.1.0.zip Source Code])&lt;br /&gt;
&lt;br /&gt;
[[Category:Calc]]&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=44774</id>
		<title>R and Calc: Bugs and Feature Requests</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=44774"/>
		<updated>2007-09-04T21:22:26Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This section is meant to keep track of the bugs plaguing the add-on, as well as any features people would like to see in upcoming versions. For now, there are three categories on this page:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Bugs: &amp;#039;&amp;#039;&amp;#039; things that need to be fixed urgently (ideally, in the next release).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Feature Requests: &amp;#039;&amp;#039;&amp;#039; things that need to be added at some point in the future, but are not necessary for the healthy functioning of the software.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Implemented Requests: &amp;#039;&amp;#039;&amp;#039; once anything in the categories above is implemented, it is moved here.&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
* As it stands, RCalcCaller can&amp;#039;t read values from matrices with equations. This code does not work &amp;lt;code&amp;gt;=RTestConnection()&amp;lt;/code&amp;gt; with a value of 0 or 1, it will throw an error if we refer to this in code. For example, try the code below:&lt;br /&gt;
:: &amp;lt;code&amp;gt;// First, type =RTestConnection() in cell A1.&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a &amp;lt;- {$A1}&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a*3&amp;lt;/code&amp;gt;&lt;br /&gt;
* RCalcCaller can&amp;#039;t accept String inputs from cells.&lt;br /&gt;
* Need to implement missing values.&lt;br /&gt;
* Passing the following code to RCalcDump causes a NullPointerException:&lt;br /&gt;
:: &amp;lt;code&amp;gt;nls(y ~ a*x + b, data = data.frame(cbind(x = c(1.1, 2.1, 3, 3.9), y = c(1, 2, 3, 4))), start=list(a = 1, b = 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
This is likely because the returned R object has embedded REXPs, functions, and environments.&lt;br /&gt;
* Passing &amp;lt;code&amp;gt;a&amp;lt;-127&amp;lt;/code&amp;gt; to RCalcDump will cause it to print the outputs of the previous statement rather than this one.&lt;br /&gt;
* R optional packages must be installed in the default R location... Otherwise they cannot be loaded.&lt;br /&gt;
* The add-on needs to be installed manually -- Tools &amp;gt; Extension Manager fails to install properly.&lt;br /&gt;
* Very slow in extremely large sets of data (probably due to using TCP/IP to send information).&lt;br /&gt;
* RCalcDump does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
&lt;br /&gt;
== Feature Requests ==&lt;br /&gt;
&lt;br /&gt;
* Dynamic array output. As it stands, you need to know the size of the array if you want the RCalcCoder to output properly.&lt;br /&gt;
* Need to implement error output -- right now, nothing happens. This applies to RCalcDump and RCalcCaller.&lt;br /&gt;
* Make it so the {$BASE} keyword can be replaced with code. Currently, RCalcCaller won&amp;#039;t work with&lt;br /&gt;
&amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-var(c(1,2,3,4))&amp;lt;/code&amp;gt;&lt;br /&gt;
But having such code support would be extremely useful.&lt;br /&gt;
* Make the actual syntax more intuitive and easier to use.&lt;br /&gt;
* The getOutputs() function in the RCalcInterface is very inefficient and should be replaced (&amp;#039;&amp;#039;note that this is a fairly substantial coding change&amp;#039;&amp;#039;).&lt;br /&gt;
* Make the coding window non-modal.&lt;br /&gt;
* Allow for saving scripts in spreadsheets.&lt;br /&gt;
* Make the &amp;quot;help()&amp;quot; function available through the add-on.&lt;br /&gt;
* Communication between data.frames and spreadsheets in Calc.&lt;br /&gt;
&lt;br /&gt;
== Implemented Requests ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1:&lt;br /&gt;
:: &amp;lt;code&amp;gt;rnorm(1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1 (seems to be a one character input line problem):&lt;br /&gt;
:: &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The *.txt files used for GUI scripting don&amp;#039;t load properly on many computers. May have something to do with using &amp;quot;library&amp;quot;, and &amp;quot;require&amp;quot; might be a better option.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; Passing the following code causes the RCalcCoder to crash:&lt;br /&gt;
:: &amp;lt;code&amp;gt;3+3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#C1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=44773</id>
		<title>R and Calc: Bugs and Feature Requests</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=44773"/>
		<updated>2007-09-04T21:19:33Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This section is meant to keep track of the bugs plaguing the add-on, as well as any features people would like to see in upcoming versions. For now, there are three categories on this page:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Bugs: &amp;#039;&amp;#039;&amp;#039; things that need to be fixed urgently (ideally, in the next release).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Feature Requests: &amp;#039;&amp;#039;&amp;#039; things that need to be added at some point in the future, but are not necessary for the healthy functioning of the software.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Implemented Requests: &amp;#039;&amp;#039;&amp;#039; once anything in the categories above is implemented, it is moved here.&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
* As it stands, RCalcCaller can&amp;#039;t read values from matrices with equations. This code does not work &amp;lt;code&amp;gt;=RTestConnection()&amp;lt;/code&amp;gt; with a value of 0 or 1, it will throw an error if we refer to this in code. For example, try the code below:&lt;br /&gt;
:: &amp;lt;code&amp;gt;// First, type =RTestConnection() in cell A1.&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a &amp;lt;- {$A1}&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a*3&amp;lt;/code&amp;gt;&lt;br /&gt;
* RCalcCaller can&amp;#039;t accept String inputs from cells.&lt;br /&gt;
* Need to implement missing values.&lt;br /&gt;
* Passing the following code to RCalcDump causes a NullPointerException:&lt;br /&gt;
:: &amp;lt;code&amp;gt;nls(y ~ a*x + b, data = data.frame(cbind(x = c(1.1, 2.1, 3, 3.9), y = c(1, 2, 3, 4))), start=list(a = 1, b = 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
This is likely because the returned R object has embedded REXPs, functions, and environments.&lt;br /&gt;
* Passing &amp;lt;code&amp;gt;a&amp;lt;-127&amp;lt;/code&amp;gt; to RCalcDump will cause it to print the outputs of the previous statement rather than this one.&lt;br /&gt;
* Passing the following code causes the RCalcCoder to crash:&lt;br /&gt;
:: &amp;lt;code&amp;gt;3+3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#C1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* R optional packages must be installed in the default R location... Otherwise they cannot be loaded.&lt;br /&gt;
* The add-on needs to be installed manually -- Tools &amp;gt; Extension Manager fails to install properly.&lt;br /&gt;
* Very slow in extremely large sets of data (probably due to using TCP/IP to send information).&lt;br /&gt;
* RCalcDump does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
&lt;br /&gt;
== Feature Requests ==&lt;br /&gt;
&lt;br /&gt;
* Dynamic array output. As it stands, you need to know the size of the array if you want the RCalcCoder to output properly.&lt;br /&gt;
* Need to implement error output -- right now, nothing happens. This applies to RCalcDump and RCalcCaller.&lt;br /&gt;
* Make it so the {$BASE} keyword can be replaced with code. Currently, RCalcCaller won&amp;#039;t work with&lt;br /&gt;
&amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-var(c(1,2,3,4))&amp;lt;/code&amp;gt;&lt;br /&gt;
But having such code support would be extremely useful.&lt;br /&gt;
* Make the actual syntax more intuitive and easier to use.&lt;br /&gt;
* The getOutputs() function in the RCalcInterface is very inefficient and should be replaced (&amp;#039;&amp;#039;note that this is a fairly substantial coding change&amp;#039;&amp;#039;).&lt;br /&gt;
* Make the coding window non-modal.&lt;br /&gt;
* Allow for saving scripts in spreadsheets.&lt;br /&gt;
* Make the &amp;quot;help()&amp;quot; function available through the add-on.&lt;br /&gt;
* Communication between data.frames and spreadsheets in Calc.&lt;br /&gt;
&lt;br /&gt;
== Implemented Requests ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1:&lt;br /&gt;
:: &amp;lt;code&amp;gt;rnorm(1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1 (seems to be a one character input line problem):&lt;br /&gt;
:: &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The *.txt files used for GUI scripting don&amp;#039;t load properly on many computers. May have something to do with using &amp;quot;library&amp;quot;, and &amp;quot;require&amp;quot; might be a better option.&lt;br /&gt;
&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=44772</id>
		<title>R and Calc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=44772"/>
		<updated>2007-09-04T21:18:16Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: /* Older Versions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;blockquote style=&amp;quot;background: white; border: 1px solid rgb(153, 153, 153); padding: 1em;&amp;quot;&amp;gt;This page is meant as a general overview and installation guide for the software. Please see [[R and Calc Documentation]] for more information on functions, scripting, and general usage. Also feel free to submit bug reports in the [[R and Calc: Bugs and Feature Requests]] page.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;R and Calc&amp;quot; is an [[OpenOffice.org]] (OO.o) [[Calc]] add-on that allows you to use [http://www.r-project.org/ R] methods and functions. The software is currently in early development, though a &amp;#039;&amp;#039;&amp;#039;basic&amp;#039;&amp;#039;&amp;#039; working version does exist, and is available for download.&lt;br /&gt;
&lt;br /&gt;
We welcome any and all comments and name suggestions. Please send them to [[User:Wojciech|Wojciech Gryc]].&lt;br /&gt;
&lt;br /&gt;
For those who come here often, here is the latest version:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Version:&amp;#039;&amp;#039;&amp;#039; 0.1.9&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Release Date:&amp;#039;&amp;#039;&amp;#039; September 4, 2007 (4:07 pm EST)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Link:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-09-04_2/RAddon.uno.pkg&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Source Code:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-09-04_2/rcalc-0_1_9.zip&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Manual:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-09-04_2/manual.pdf&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
You need the following software to run this add-on. While older versions may suffice, they have not been tested yet.&lt;br /&gt;
* OpenOffice.org 2.1&lt;br /&gt;
* Java 5.0&lt;br /&gt;
* RServe 0.4.7&lt;br /&gt;
&lt;br /&gt;
==Installing==&lt;br /&gt;
&lt;br /&gt;
The current version is a prototype and implements only one tool: RDUMP. This method is accessed through the actual Calc menu, and allows you to see the R object structure for various method calls. &lt;br /&gt;
&lt;br /&gt;
To use the add-on, you need to install R and [http://www.rforge.net/Rserve Rserve]. Instructions for installing R can be found at http://www.r-project.org/ Once installed, run R and type the following to install Rserve. Click &amp;quot;enter&amp;quot; at the end of each bullet point:&lt;br /&gt;
&lt;br /&gt;
* install.packages(&amp;quot;Rserve&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Rserve needs to be running to work, and can be launched with the following commands... Note that you only need to do this when you want to use the R Add-on for Calc.&lt;br /&gt;
&lt;br /&gt;
* library(Rserve)&lt;br /&gt;
* Rserve()&lt;br /&gt;
&lt;br /&gt;
Now that you have the prerequisites installed, download the package RAddon.uno.pkg (linked above). Unzip the file, and let&amp;#039;s call the directory you unzipped it in &amp;lt;RA_DIR&amp;gt;. Now let &amp;lt;OO_HOME&amp;gt; be your OpenOffice.org installation directory. Open the command prompt or terminal window and go to &amp;lt;OO_HOME&amp;gt;/program/ and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg add &amp;lt;RA_DIR&amp;gt;/RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
If this is not your first time installing the add-in, you need to check if a previous version is also on the system. If it is, then you will not be able to install the new version. To do this, go to &amp;lt;OO HOME&amp;gt;/program and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg list&lt;br /&gt;
&lt;br /&gt;
This will show you the list of packages already installed, and you should be able to check if the add-is is there. Remember to look for &amp;quot;RAddon.uno.pkg&amp;quot;. You can also skip this step and try to uninstall RAddon.uno.pkg regardless -- this will not harm your OpenOffice.org installation in any way, even if RAddon.uno.pkg is abset. To do this, type:&lt;br /&gt;
&lt;br /&gt;
* unopkg remove RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
Finally, some operating systems require that you restart your OpenOffice.org installation (if you&amp;#039;re not sure, restart your computer) to be able to see the cell functions that come with this package.&lt;br /&gt;
&lt;br /&gt;
==Using==&lt;br /&gt;
&lt;br /&gt;
Using the add-on is very simple at this stage. To see the tool at work, open Calc. In the menus, go to R Add-on &amp;gt; Rdump(). A new dialog window will pop up. Type in an R script -- here are some examples:&lt;br /&gt;
&lt;br /&gt;
* rnorm(10)&lt;br /&gt;
* cor.test(c(1,2,3,4), c(1,2,2,3))&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Run&amp;quot;. A new sheet should appear. Close the dialog with &amp;quot;Close&amp;quot; and check the new sheet -- you should see various pieces of information on the sheet.&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
So far, the software has been tested on the following.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.7===&lt;br /&gt;
&lt;br /&gt;
* 64-bit Gentoo Linux running JDK 1.5.0.12 (64-bit version), OpenOffice 2.2.1, and R 2.4.1&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.6===&lt;br /&gt;
&lt;br /&gt;
* Ubuntu Feisty Fawn on Java 1.6.0 &lt;br /&gt;
&lt;br /&gt;
===Version 0.1.5===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 7 running native Java&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP SP2 running running JDK 1.6.0_02 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.0===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 6 running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP running running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
==Known Issues==&lt;br /&gt;
&lt;br /&gt;
Yes, we already have some known issues! That&amp;#039;s OK, these are common issues and are not problematic with regards to the code:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #1 (&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Fixed in 0.1.1&amp;lt;/font&amp;gt;):&amp;#039;&amp;#039;&amp;#039; Strings and characters, when part of the R object model, do not get published in Rdump().&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #2:&amp;#039;&amp;#039;&amp;#039; RDUMP() does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #3:&amp;#039;&amp;#039;&amp;#039; Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
&lt;br /&gt;
==About==&lt;br /&gt;
&lt;br /&gt;
This add-on is the result of a Google [[Summer of Code 2007]] project. It was initially created by [[User:Wojciech|Wojciech Gryc]]. For information pertaining to the development of this add-on, see [http://www.11-55.org/ooblog/ Wojciech&amp;#039;s Blog].&lt;br /&gt;
&lt;br /&gt;
==Older Versions==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.8&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-09-04/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-09-04/rcalc-0_1_8.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.7&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-08-23/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-23/rcalc-0_1_7.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.6&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-08-19/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-19/rcalc-0_1_6.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.5&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-16/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-16/rcalc-0_1_5.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.4&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-10/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-10/rcalc-0_1_4.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.3&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-02/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-02/rcalc-0_1_3.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.2&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-06-01/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-06-01/rcalc-0_1_2.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.1&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-25/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-25/rcalc-0_1_1.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.0&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-15/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-15/rcalc-0.1.0.zip Source Code])&lt;br /&gt;
&lt;br /&gt;
[[Category:Calc]]&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=44761</id>
		<title>R and Calc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=44761"/>
		<updated>2007-09-04T20:08:20Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;blockquote style=&amp;quot;background: white; border: 1px solid rgb(153, 153, 153); padding: 1em;&amp;quot;&amp;gt;This page is meant as a general overview and installation guide for the software. Please see [[R and Calc Documentation]] for more information on functions, scripting, and general usage. Also feel free to submit bug reports in the [[R and Calc: Bugs and Feature Requests]] page.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;R and Calc&amp;quot; is an [[OpenOffice.org]] (OO.o) [[Calc]] add-on that allows you to use [http://www.r-project.org/ R] methods and functions. The software is currently in early development, though a &amp;#039;&amp;#039;&amp;#039;basic&amp;#039;&amp;#039;&amp;#039; working version does exist, and is available for download.&lt;br /&gt;
&lt;br /&gt;
We welcome any and all comments and name suggestions. Please send them to [[User:Wojciech|Wojciech Gryc]].&lt;br /&gt;
&lt;br /&gt;
For those who come here often, here is the latest version:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Version:&amp;#039;&amp;#039;&amp;#039; 0.1.9&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Release Date:&amp;#039;&amp;#039;&amp;#039; September 4, 2007 (4:07 pm EST)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Link:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-09-04_2/RAddon.uno.pkg&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Source Code:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-09-04_2/rcalc-0_1_9.zip&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Manual:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-09-04_2/manual.pdf&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
You need the following software to run this add-on. While older versions may suffice, they have not been tested yet.&lt;br /&gt;
* OpenOffice.org 2.1&lt;br /&gt;
* Java 5.0&lt;br /&gt;
* RServe 0.4.7&lt;br /&gt;
&lt;br /&gt;
==Installing==&lt;br /&gt;
&lt;br /&gt;
The current version is a prototype and implements only one tool: RDUMP. This method is accessed through the actual Calc menu, and allows you to see the R object structure for various method calls. &lt;br /&gt;
&lt;br /&gt;
To use the add-on, you need to install R and [http://www.rforge.net/Rserve Rserve]. Instructions for installing R can be found at http://www.r-project.org/ Once installed, run R and type the following to install Rserve. Click &amp;quot;enter&amp;quot; at the end of each bullet point:&lt;br /&gt;
&lt;br /&gt;
* install.packages(&amp;quot;Rserve&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Rserve needs to be running to work, and can be launched with the following commands... Note that you only need to do this when you want to use the R Add-on for Calc.&lt;br /&gt;
&lt;br /&gt;
* library(Rserve)&lt;br /&gt;
* Rserve()&lt;br /&gt;
&lt;br /&gt;
Now that you have the prerequisites installed, download the package RAddon.uno.pkg (linked above). Unzip the file, and let&amp;#039;s call the directory you unzipped it in &amp;lt;RA_DIR&amp;gt;. Now let &amp;lt;OO_HOME&amp;gt; be your OpenOffice.org installation directory. Open the command prompt or terminal window and go to &amp;lt;OO_HOME&amp;gt;/program/ and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg add &amp;lt;RA_DIR&amp;gt;/RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
If this is not your first time installing the add-in, you need to check if a previous version is also on the system. If it is, then you will not be able to install the new version. To do this, go to &amp;lt;OO HOME&amp;gt;/program and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg list&lt;br /&gt;
&lt;br /&gt;
This will show you the list of packages already installed, and you should be able to check if the add-is is there. Remember to look for &amp;quot;RAddon.uno.pkg&amp;quot;. You can also skip this step and try to uninstall RAddon.uno.pkg regardless -- this will not harm your OpenOffice.org installation in any way, even if RAddon.uno.pkg is abset. To do this, type:&lt;br /&gt;
&lt;br /&gt;
* unopkg remove RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
Finally, some operating systems require that you restart your OpenOffice.org installation (if you&amp;#039;re not sure, restart your computer) to be able to see the cell functions that come with this package.&lt;br /&gt;
&lt;br /&gt;
==Using==&lt;br /&gt;
&lt;br /&gt;
Using the add-on is very simple at this stage. To see the tool at work, open Calc. In the menus, go to R Add-on &amp;gt; Rdump(). A new dialog window will pop up. Type in an R script -- here are some examples:&lt;br /&gt;
&lt;br /&gt;
* rnorm(10)&lt;br /&gt;
* cor.test(c(1,2,3,4), c(1,2,2,3))&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Run&amp;quot;. A new sheet should appear. Close the dialog with &amp;quot;Close&amp;quot; and check the new sheet -- you should see various pieces of information on the sheet.&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
So far, the software has been tested on the following.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.7===&lt;br /&gt;
&lt;br /&gt;
* 64-bit Gentoo Linux running JDK 1.5.0.12 (64-bit version), OpenOffice 2.2.1, and R 2.4.1&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.6===&lt;br /&gt;
&lt;br /&gt;
* Ubuntu Feisty Fawn on Java 1.6.0 &lt;br /&gt;
&lt;br /&gt;
===Version 0.1.5===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 7 running native Java&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP SP2 running running JDK 1.6.0_02 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.0===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 6 running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP running running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
==Known Issues==&lt;br /&gt;
&lt;br /&gt;
Yes, we already have some known issues! That&amp;#039;s OK, these are common issues and are not problematic with regards to the code:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #1 (&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Fixed in 0.1.1&amp;lt;/font&amp;gt;):&amp;#039;&amp;#039;&amp;#039; Strings and characters, when part of the R object model, do not get published in Rdump().&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #2:&amp;#039;&amp;#039;&amp;#039; RDUMP() does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #3:&amp;#039;&amp;#039;&amp;#039; Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
&lt;br /&gt;
==About==&lt;br /&gt;
&lt;br /&gt;
This add-on is the result of a Google [[Summer of Code 2007]] project. It was initially created by [[User:Wojciech|Wojciech Gryc]]. For information pertaining to the development of this add-on, see [http://www.11-55.org/ooblog/ Wojciech&amp;#039;s Blog].&lt;br /&gt;
&lt;br /&gt;
==Older Versions==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.8&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-09-04/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-09-04/rcalc-0_1_8.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.7&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-08-23/RAddon.uno.pkg UNO Package]&lt;br /&gt;
([http://www.11-55.org/rcalc/2007-08-23/rcalc-0_1_7.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.6&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-08-19/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-19/rcalc-0_1_6.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.5&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-16/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-16/rcalc-0_1_5.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.4&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-10/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-10/rcalc-0_1_4.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.3&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-02/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-02/rcalc-0_1_3.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.2&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-06-01/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-06-01/rcalc-0_1_2.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.1&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-25/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-25/rcalc-0_1_1.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.0&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-15/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-15/rcalc-0.1.0.zip Source Code])&lt;br /&gt;
&lt;br /&gt;
[[Category:Calc]]&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=44493</id>
		<title>R and Calc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=44493"/>
		<updated>2007-09-04T05:13:05Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;blockquote style=&amp;quot;background: white; border: 1px solid rgb(153, 153, 153); padding: 1em;&amp;quot;&amp;gt;This page is meant as a general overview and installation guide for the software. Please see [[R and Calc Documentation]] for more information on functions, scripting, and general usage. Also feel free to submit bug reports in the [[R and Calc: Bugs and Feature Requests]] page.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;R and Calc&amp;quot; is an [[OpenOffice.org]] (OO.o) [[Calc]] add-on that allows you to use [http://www.r-project.org/ R] methods and functions. The software is currently in early development, though a &amp;#039;&amp;#039;&amp;#039;basic&amp;#039;&amp;#039;&amp;#039; working version does exist, and is available for download.&lt;br /&gt;
&lt;br /&gt;
We welcome any and all comments and name suggestions. Please send them to [[User:Wojciech|Wojciech Gryc]].&lt;br /&gt;
&lt;br /&gt;
For those who come here often, here is the latest version:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Version:&amp;#039;&amp;#039;&amp;#039; 0.1.8&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Release Date:&amp;#039;&amp;#039;&amp;#039; September 4, 2007 (1:12 am EST)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Link:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-09-04/RAddon.uno.pkg&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Source Code:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-09-04/rcalc-0_1_8.zip&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Manual:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-09-04/manual.pdf&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
You need the following software to run this add-on. While older versions may suffice, they have not been tested yet.&lt;br /&gt;
* OpenOffice.org 2.1&lt;br /&gt;
* Java 5.0&lt;br /&gt;
* RServe 0.4.7&lt;br /&gt;
&lt;br /&gt;
==Installing==&lt;br /&gt;
&lt;br /&gt;
The current version is a prototype and implements only one tool: RDUMP. This method is accessed through the actual Calc menu, and allows you to see the R object structure for various method calls. &lt;br /&gt;
&lt;br /&gt;
To use the add-on, you need to install R and [http://www.rforge.net/Rserve Rserve]. Instructions for installing R can be found at http://www.r-project.org/ Once installed, run R and type the following to install Rserve. Click &amp;quot;enter&amp;quot; at the end of each bullet point:&lt;br /&gt;
&lt;br /&gt;
* install.packages(&amp;quot;Rserve&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Rserve needs to be running to work, and can be launched with the following commands... Note that you only need to do this when you want to use the R Add-on for Calc.&lt;br /&gt;
&lt;br /&gt;
* library(Rserve)&lt;br /&gt;
* Rserve()&lt;br /&gt;
&lt;br /&gt;
Now that you have the prerequisites installed, download the package RAddon.uno.pkg (linked above). Unzip the file, and let&amp;#039;s call the directory you unzipped it in &amp;lt;RA_DIR&amp;gt;. Now let &amp;lt;OO_HOME&amp;gt; be your OpenOffice.org installation directory. Open the command prompt or terminal window and go to &amp;lt;OO_HOME&amp;gt;/program/ and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg add &amp;lt;RA_DIR&amp;gt;/RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
If this is not your first time installing the add-in, you need to check if a previous version is also on the system. If it is, then you will not be able to install the new version. To do this, go to &amp;lt;OO HOME&amp;gt;/program and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg list&lt;br /&gt;
&lt;br /&gt;
This will show you the list of packages already installed, and you should be able to check if the add-is is there. Remember to look for &amp;quot;RAddon.uno.pkg&amp;quot;. You can also skip this step and try to uninstall RAddon.uno.pkg regardless -- this will not harm your OpenOffice.org installation in any way, even if RAddon.uno.pkg is abset. To do this, type:&lt;br /&gt;
&lt;br /&gt;
* unopkg remove RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
Finally, some operating systems require that you restart your OpenOffice.org installation (if you&amp;#039;re not sure, restart your computer) to be able to see the cell functions that come with this package.&lt;br /&gt;
&lt;br /&gt;
==Using==&lt;br /&gt;
&lt;br /&gt;
Using the add-on is very simple at this stage. To see the tool at work, open Calc. In the menus, go to R Add-on &amp;gt; Rdump(). A new dialog window will pop up. Type in an R script -- here are some examples:&lt;br /&gt;
&lt;br /&gt;
* rnorm(10)&lt;br /&gt;
* cor.test(c(1,2,3,4), c(1,2,2,3))&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Run&amp;quot;. A new sheet should appear. Close the dialog with &amp;quot;Close&amp;quot; and check the new sheet -- you should see various pieces of information on the sheet.&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
So far, the software has been tested on the following.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.7===&lt;br /&gt;
&lt;br /&gt;
* 64-bit Gentoo Linux running JDK 1.5.0.12 (64-bit version), OpenOffice 2.2.1, and R 2.4.1&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.6===&lt;br /&gt;
&lt;br /&gt;
* Ubuntu Feisty Fawn on Java 1.6.0 &lt;br /&gt;
&lt;br /&gt;
===Version 0.1.5===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 7 running native Java&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP SP2 running running JDK 1.6.0_02 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.0===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 6 running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP running running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
==Known Issues==&lt;br /&gt;
&lt;br /&gt;
Yes, we already have some known issues! That&amp;#039;s OK, these are common issues and are not problematic with regards to the code:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #1 (&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Fixed in 0.1.1&amp;lt;/font&amp;gt;):&amp;#039;&amp;#039;&amp;#039; Strings and characters, when part of the R object model, do not get published in Rdump().&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #2:&amp;#039;&amp;#039;&amp;#039; RDUMP() does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #3:&amp;#039;&amp;#039;&amp;#039; Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
&lt;br /&gt;
==About==&lt;br /&gt;
&lt;br /&gt;
This add-on is the result of a Google [[Summer of Code 2007]] project. It was initially created by [[User:Wojciech|Wojciech Gryc]]. For information pertaining to the development of this add-on, see [http://www.11-55.org/ooblog/ Wojciech&amp;#039;s Blog].&lt;br /&gt;
&lt;br /&gt;
==Older Versions==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.7&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-08-23/RAddon.uno.pkg UNO Package]&lt;br /&gt;
([http://www.11-55.org/rcalc/2007-08-23/rcalc-0_1_7.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.6&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-08-19/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-19/rcalc-0_1_6.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.5&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-16/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-16/rcalc-0_1_5.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.4&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-10/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-10/rcalc-0_1_4.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.3&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-02/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-02/rcalc-0_1_3.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.2&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-06-01/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-06-01/rcalc-0_1_2.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.1&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-25/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-25/rcalc-0_1_1.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.0&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-15/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-15/rcalc-0.1.0.zip Source Code])&lt;br /&gt;
&lt;br /&gt;
[[Category:Calc]]&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=44492</id>
		<title>R and Calc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=44492"/>
		<updated>2007-09-04T05:12:45Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;blockquote style=&amp;quot;background: white; border: 1px solid rgb(153, 153, 153); padding: 1em;&amp;quot;&amp;gt;This page is meant as a general overview and installation guide for the software. Please see [[R and Calc Documentation]] for more information on functions, scripting, and general usage. Also feel free to submit bug reports in the [[R and Calc: Bugs and Feature Requests]] page.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;R and Calc&amp;quot; is an [[OpenOffice.org]] (OO.o) [[Calc]] add-on that allows you to use [http://www.r-project.org/ R] methods and functions. The software is currently in early development, though a &amp;#039;&amp;#039;&amp;#039;basic&amp;#039;&amp;#039;&amp;#039; working version does exist, and is available for download.&lt;br /&gt;
&lt;br /&gt;
We welcome any and all comments and name suggestions. Please send them to [[User:Wojciech|Wojciech Gryc]].&lt;br /&gt;
&lt;br /&gt;
For those who come here often, here is the latest version:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Version:&amp;#039;&amp;#039;&amp;#039; 0.1.8&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Release Date:&amp;#039;&amp;#039;&amp;#039; September 4, 2007 (1:12 am EST)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Link:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-09-04/RAddon.uno.pkg&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Source Code:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-09-04/rcalc-0_1_7.zip&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Manual:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-09-04/manual.pdf&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
You need the following software to run this add-on. While older versions may suffice, they have not been tested yet.&lt;br /&gt;
* OpenOffice.org 2.1&lt;br /&gt;
* Java 5.0&lt;br /&gt;
* RServe 0.4.7&lt;br /&gt;
&lt;br /&gt;
==Installing==&lt;br /&gt;
&lt;br /&gt;
The current version is a prototype and implements only one tool: RDUMP. This method is accessed through the actual Calc menu, and allows you to see the R object structure for various method calls. &lt;br /&gt;
&lt;br /&gt;
To use the add-on, you need to install R and [http://www.rforge.net/Rserve Rserve]. Instructions for installing R can be found at http://www.r-project.org/ Once installed, run R and type the following to install Rserve. Click &amp;quot;enter&amp;quot; at the end of each bullet point:&lt;br /&gt;
&lt;br /&gt;
* install.packages(&amp;quot;Rserve&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Rserve needs to be running to work, and can be launched with the following commands... Note that you only need to do this when you want to use the R Add-on for Calc.&lt;br /&gt;
&lt;br /&gt;
* library(Rserve)&lt;br /&gt;
* Rserve()&lt;br /&gt;
&lt;br /&gt;
Now that you have the prerequisites installed, download the package RAddon.uno.pkg (linked above). Unzip the file, and let&amp;#039;s call the directory you unzipped it in &amp;lt;RA_DIR&amp;gt;. Now let &amp;lt;OO_HOME&amp;gt; be your OpenOffice.org installation directory. Open the command prompt or terminal window and go to &amp;lt;OO_HOME&amp;gt;/program/ and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg add &amp;lt;RA_DIR&amp;gt;/RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
If this is not your first time installing the add-in, you need to check if a previous version is also on the system. If it is, then you will not be able to install the new version. To do this, go to &amp;lt;OO HOME&amp;gt;/program and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg list&lt;br /&gt;
&lt;br /&gt;
This will show you the list of packages already installed, and you should be able to check if the add-is is there. Remember to look for &amp;quot;RAddon.uno.pkg&amp;quot;. You can also skip this step and try to uninstall RAddon.uno.pkg regardless -- this will not harm your OpenOffice.org installation in any way, even if RAddon.uno.pkg is abset. To do this, type:&lt;br /&gt;
&lt;br /&gt;
* unopkg remove RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
Finally, some operating systems require that you restart your OpenOffice.org installation (if you&amp;#039;re not sure, restart your computer) to be able to see the cell functions that come with this package.&lt;br /&gt;
&lt;br /&gt;
==Using==&lt;br /&gt;
&lt;br /&gt;
Using the add-on is very simple at this stage. To see the tool at work, open Calc. In the menus, go to R Add-on &amp;gt; Rdump(). A new dialog window will pop up. Type in an R script -- here are some examples:&lt;br /&gt;
&lt;br /&gt;
* rnorm(10)&lt;br /&gt;
* cor.test(c(1,2,3,4), c(1,2,2,3))&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Run&amp;quot;. A new sheet should appear. Close the dialog with &amp;quot;Close&amp;quot; and check the new sheet -- you should see various pieces of information on the sheet.&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
So far, the software has been tested on the following.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.7===&lt;br /&gt;
&lt;br /&gt;
* 64-bit Gentoo Linux running JDK 1.5.0.12 (64-bit version), OpenOffice 2.2.1, and R 2.4.1&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.6===&lt;br /&gt;
&lt;br /&gt;
* Ubuntu Feisty Fawn on Java 1.6.0 &lt;br /&gt;
&lt;br /&gt;
===Version 0.1.5===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 7 running native Java&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP SP2 running running JDK 1.6.0_02 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.0===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 6 running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP running running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
==Known Issues==&lt;br /&gt;
&lt;br /&gt;
Yes, we already have some known issues! That&amp;#039;s OK, these are common issues and are not problematic with regards to the code:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #1 (&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Fixed in 0.1.1&amp;lt;/font&amp;gt;):&amp;#039;&amp;#039;&amp;#039; Strings and characters, when part of the R object model, do not get published in Rdump().&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #2:&amp;#039;&amp;#039;&amp;#039; RDUMP() does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #3:&amp;#039;&amp;#039;&amp;#039; Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
&lt;br /&gt;
==About==&lt;br /&gt;
&lt;br /&gt;
This add-on is the result of a Google [[Summer of Code 2007]] project. It was initially created by [[User:Wojciech|Wojciech Gryc]]. For information pertaining to the development of this add-on, see [http://www.11-55.org/ooblog/ Wojciech&amp;#039;s Blog].&lt;br /&gt;
&lt;br /&gt;
==Older Versions==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.7&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-08-23/RAddon.uno.pkg UNO Package]&lt;br /&gt;
([http://www.11-55.org/rcalc/2007-08-23/rcalc-0_1_7.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.6&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-08-19/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-19/rcalc-0_1_6.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.5&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-16/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-16/rcalc-0_1_5.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.4&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-10/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-10/rcalc-0_1_4.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.3&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-02/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-02/rcalc-0_1_3.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.2&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-06-01/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-06-01/rcalc-0_1_2.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.1&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-25/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-25/rcalc-0_1_1.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.0&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-15/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-15/rcalc-0.1.0.zip Source Code])&lt;br /&gt;
&lt;br /&gt;
[[Category:Calc]]&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=44442</id>
		<title>R and Calc: Bugs and Feature Requests</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=44442"/>
		<updated>2007-09-04T02:49:56Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This section is meant to keep track of the bugs plaguing the add-on, as well as any features people would like to see in upcoming versions. For now, there are three categories on this page:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Bugs: &amp;#039;&amp;#039;&amp;#039; things that need to be fixed urgently (ideally, in the next release).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Feature Requests: &amp;#039;&amp;#039;&amp;#039; things that need to be added at some point in the future, but are not necessary for the healthy functioning of the software.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Implemented Requests: &amp;#039;&amp;#039;&amp;#039; once anything in the categories above is implemented, it is moved here.&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
* As it stands, RCalcCaller can&amp;#039;t read values from matrices with equations. This code does not work &amp;lt;code&amp;gt;=RTestConnection()&amp;lt;/code&amp;gt; with a value of 0 or 1, it will throw an error if we refer to this in code. For example, try the code below:&lt;br /&gt;
:: &amp;lt;code&amp;gt;// First, type =RTestConnection() in cell A1.&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a &amp;lt;- {$A1}&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a*3&amp;lt;/code&amp;gt;&lt;br /&gt;
* RCalcCaller can&amp;#039;t accept String inputs from cells.&lt;br /&gt;
* Need to implement missing values.&lt;br /&gt;
* Passing the following code to RCalcDump causes a NullPointerException:&lt;br /&gt;
:: &amp;lt;code&amp;gt;nls(y ~ a*x + b, data = data.frame(cbind(x = c(1.1, 2.1, 3, 3.9), y = c(1, 2, 3, 4))), start=list(a = 1, b = 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
This is likely because the returned R object has embedded REXPs, functions, and environments.&lt;br /&gt;
* Passing &amp;lt;code&amp;gt;a&amp;lt;-127&amp;lt;/code&amp;gt; to RCalcDump will cause it to print the outputs of the previous statement rather than this one.&lt;br /&gt;
* Passing the following code causes the RCalcCoder to crash:&lt;br /&gt;
:: &amp;lt;code&amp;gt;3+3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#C1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* R optional packages must be installed in the default R location... Otherwise they cannot be loaded.&lt;br /&gt;
* The add-on needs to be installed manually -- Tools &amp;gt; Extension Manager fails to install properly.&lt;br /&gt;
* Very slow in extremely large sets of data (probably due to using TCP/IP to send information).&lt;br /&gt;
* RCalcDump does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
* The *.txt files used for GUI scripting don&amp;#039;t load properly on many computers. May have something to do with using &amp;quot;library&amp;quot;, and &amp;quot;require&amp;quot; might be a better option.&lt;br /&gt;
&lt;br /&gt;
== Feature Requests ==&lt;br /&gt;
&lt;br /&gt;
* Dynamic array output. As it stands, you need to know the size of the array if you want the RCalcCoder to output properly.&lt;br /&gt;
* Need to implement error output -- right now, nothing happens. This applies to RCalcDump and RCalcCaller.&lt;br /&gt;
* Make it so the {$BASE} keyword can be replaced with code. Currently, RCalcCaller won&amp;#039;t work with&lt;br /&gt;
&amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-var(c(1,2,3,4))&amp;lt;/code&amp;gt;&lt;br /&gt;
But having such code support would be extremely useful.&lt;br /&gt;
* Make the actual syntax more intuitive and easier to use.&lt;br /&gt;
* The getOutputs() function in the RCalcInterface is very inefficient and should be replaced (&amp;#039;&amp;#039;note that this is a fairly substantial coding change&amp;#039;&amp;#039;).&lt;br /&gt;
* Make the coding window non-modal.&lt;br /&gt;
* Allow for saving scripts in spreadsheets.&lt;br /&gt;
* Make the &amp;quot;help()&amp;quot; function available through the add-on.&lt;br /&gt;
* Communication between data.frames and spreadsheets in Calc.&lt;br /&gt;
&lt;br /&gt;
== Implemented Requests ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1:&lt;br /&gt;
:: &amp;lt;code&amp;gt;rnorm(1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1 (seems to be a one character input line problem):&lt;br /&gt;
:: &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=44347</id>
		<title>R and Calc: Bugs and Feature Requests</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=44347"/>
		<updated>2007-09-03T15:48:05Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This section is meant to keep track of the bugs plaguing the add-on, as well as any features people would like to see in upcoming versions. For now, there are three categories on this page:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Bugs: &amp;#039;&amp;#039;&amp;#039; things that need to be fixed urgently (ideally, in the next release).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Feature Requests: &amp;#039;&amp;#039;&amp;#039; things that need to be added at some point in the future, but are not necessary for the healthy functioning of the software.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Implemented Requests: &amp;#039;&amp;#039;&amp;#039; once anything in the categories above is implemented, it is moved here.&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
* As it stands, RCalcCaller can&amp;#039;t read values from matrices with equations. This code does not work &amp;lt;code&amp;gt;=RTestConnection()&amp;lt;/code&amp;gt; with a value of 0 or 1, it will throw an error if we refer to this in code. For example, try the code below:&lt;br /&gt;
:: &amp;lt;code&amp;gt;// First, type =RTestConnection() in cell A1.&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a &amp;lt;- {$A1}&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a*3&amp;lt;/code&amp;gt;&lt;br /&gt;
* RCalcCaller can&amp;#039;t accept String inputs from cells.&lt;br /&gt;
* Need to implement missing values.&lt;br /&gt;
* The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1 (seems to be a one character input line problem):&lt;br /&gt;
:: &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* Passing the following code to RCalcDump causes a NullPointerException:&lt;br /&gt;
:: &amp;lt;code&amp;gt;nls(y ~ a*x + b, data = data.frame(cbind(x = c(1.1, 2.1, 3, 3.9), y = c(1, 2, 3, 4))), start=list(a = 1, b = 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
This is likely because the returned R object has embedded REXPs, functions, and environments.&lt;br /&gt;
* Passing &amp;lt;code&amp;gt;a&amp;lt;-127&amp;lt;/code&amp;gt; to RCalcDump will cause it to print the outputs of the previous statement rather than this one.&lt;br /&gt;
* Passing the following code causes the RCalcCoder to crash:&lt;br /&gt;
:: &amp;lt;code&amp;gt;3+3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#C1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* R optional packages must be installed in the default R location... Otherwise they cannot be loaded.&lt;br /&gt;
* The add-on needs to be installed manually -- Tools &amp;gt; Extension Manager fails to install properly.&lt;br /&gt;
* Very slow in extremely large sets of data (probably due to using TCP/IP to send information).&lt;br /&gt;
* RCalcDump does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
* The *.txt files used for GUI scripting don&amp;#039;t load properly on many computers. May have something to do with using &amp;quot;library&amp;quot;, and &amp;quot;require&amp;quot; might be a better option.&lt;br /&gt;
&lt;br /&gt;
== Feature Requests ==&lt;br /&gt;
&lt;br /&gt;
* Dynamic array output. As it stands, you need to know the size of the array if you want the RCalcCoder to output properly.&lt;br /&gt;
* Need to implement error output -- right now, nothing happens. This applies to RCalcDump and RCalcCaller.&lt;br /&gt;
* Make it so the {$BASE} keyword can be replaced with code. Currently, RCalcCaller won&amp;#039;t work with&lt;br /&gt;
&amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-var(c(1,2,3,4))&amp;lt;/code&amp;gt;&lt;br /&gt;
But having such code support would be extremely useful.&lt;br /&gt;
* Make the actual syntax more intuitive and easier to use.&lt;br /&gt;
* The getOutputs() function in the RCalcInterface is very inefficient and should be replaced (&amp;#039;&amp;#039;note that this is a fairly substantial coding change&amp;#039;&amp;#039;).&lt;br /&gt;
* Make the coding window non-modal.&lt;br /&gt;
* Allow for saving scripts in spreadsheets.&lt;br /&gt;
* Make the &amp;quot;help()&amp;quot; function available through the add-on.&lt;br /&gt;
* Communication between data.frames and spreadsheets in Calc.&lt;br /&gt;
&lt;br /&gt;
== Implemented Requests ==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Fixed bug:&amp;#039;&amp;#039;&amp;#039; The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1:&lt;br /&gt;
:: &amp;lt;code&amp;gt;rnorm(1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=44237</id>
		<title>R and Calc: Bugs and Feature Requests</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=44237"/>
		<updated>2007-09-03T05:12:29Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This section is meant to keep track of the bugs plaguing the add-on, as well as any features people would like to see in upcoming versions. For now, there are three categories on this page:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Bugs: &amp;#039;&amp;#039;&amp;#039; things that need to be fixed urgently (ideally, in the next release).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Feature Requests: &amp;#039;&amp;#039;&amp;#039; things that need to be added at some point in the future, but are not necessary for the healthy functioning of the software.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Implemented Requests: &amp;#039;&amp;#039;&amp;#039; once anything in the categories above is implemented, it is moved here.&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
* As it stands, RCalcCaller can&amp;#039;t read values from matrices with equations. This code does not work &amp;lt;code&amp;gt;=RTestConnection()&amp;lt;/code&amp;gt; with a value of 0 or 1, it will throw an error if we refer to this in code. For example, try the code below:&lt;br /&gt;
:: &amp;lt;code&amp;gt;// First, type =RTestConnection() in cell A1.&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a &amp;lt;- {$A1}&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a*3&amp;lt;/code&amp;gt;&lt;br /&gt;
* RCalcCaller can&amp;#039;t accept String inputs from cells.&lt;br /&gt;
* Need to implement missing values.&lt;br /&gt;
* The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1:&lt;br /&gt;
:: &amp;lt;code&amp;gt;rnorm(1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* Passing the following code to RCalcDump causes a NullPointerException:&lt;br /&gt;
:: &amp;lt;code&amp;gt;nls(y ~ a*x + b, data = data.frame(cbind(x = c(1.1, 2.1, 3, 3.9), y = c(1, 2, 3, 4))), start=list(a = 1, b = 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
This is likely because the returned R object has embedded REXPs, functions, and environments.&lt;br /&gt;
* Passing &amp;lt;code&amp;gt;a&amp;lt;-127&amp;lt;/code&amp;gt; to RCalcDump will cause it to print the outputs of the previous statement rather than this one.&lt;br /&gt;
* Passing the following code causes the RCalcCoder to crash:&lt;br /&gt;
:: &amp;lt;code&amp;gt;3+3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#C1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* R optional packages must be installed in the default R location... Otherwise they cannot be loaded.&lt;br /&gt;
* The add-on needs to be installed manually -- Tools &amp;gt; Extension Manager fails to install properly.&lt;br /&gt;
* Very slow in extremely large sets of data (probably due to using TCP/IP to send information).&lt;br /&gt;
* RCalcDump does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
* The *.txt files used for GUI scripting don&amp;#039;t load properly on many computers. May have something to do with using &amp;quot;library&amp;quot;, and &amp;quot;require&amp;quot; might be a better option.&lt;br /&gt;
&lt;br /&gt;
== Feature Requests ==&lt;br /&gt;
&lt;br /&gt;
* Dynamic array output. As it stands, you need to know the size of the array if you want the RCalcCoder to output properly.&lt;br /&gt;
* Need to implement error output -- right now, nothing happens. This applies to RCalcDump and RCalcCaller.&lt;br /&gt;
* Make it so the {$BASE} keyword can be replaced with code. Currently, RCalcCaller won&amp;#039;t work with&lt;br /&gt;
&amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-var(c(1,2,3,4))&amp;lt;/code&amp;gt;&lt;br /&gt;
But having such code support would be extremely useful.&lt;br /&gt;
* Make the actual syntax more intuitive and easier to use.&lt;br /&gt;
* The getOutputs() function in the RCalcInterface is very inefficient and should be replaced (&amp;#039;&amp;#039;note that this is a fairly substantial coding change&amp;#039;&amp;#039;).&lt;br /&gt;
* Make the coding window non-modal.&lt;br /&gt;
* Allow for saving scripts in spreadsheets.&lt;br /&gt;
* Make the &amp;quot;help()&amp;quot; function available through the add-on.&lt;br /&gt;
* Communication between data.frames and spreadsheets in Calc.&lt;br /&gt;
&lt;br /&gt;
== Implemented Requests ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;None yet, this list was just put up.&amp;#039;&amp;#039; :)&lt;br /&gt;
&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=44236</id>
		<title>R and Calc: Bugs and Feature Requests</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=44236"/>
		<updated>2007-09-02T20:48:51Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This section is meant to keep track of the bugs plaguing the add-on, as well as any features people would like to see in upcoming versions. For now, there are three categories on this page:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Bugs: &amp;#039;&amp;#039;&amp;#039; things that need to be fixed urgently (ideally, in the next release).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Feature Requests: &amp;#039;&amp;#039;&amp;#039; things that need to be added at some point in the future, but are not necessary for the healthy functioning of the software.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Implemented Requests: &amp;#039;&amp;#039;&amp;#039; once anything in the categories above is implemented, it is moved here.&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
* As it stands, RCalcCaller can&amp;#039;t read values from matrices with equations. This code does not work &amp;lt;code&amp;gt;=RTestConnection()&amp;lt;/code&amp;gt; with a value of 0 or 1, it will throw an error if we refer to this in code. For example, try the code below:&lt;br /&gt;
:: &amp;lt;code&amp;gt;// First, type =RTestConnection() in cell A1.&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a &amp;lt;- {$A1}&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a*3&amp;lt;/code&amp;gt;&lt;br /&gt;
* RCalcCaller can&amp;#039;t accept String inputs from cells.&lt;br /&gt;
* Need to implement missing values.&lt;br /&gt;
* The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1:&lt;br /&gt;
:: &amp;lt;code&amp;gt;rnorm(1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* Passing the following code to RCalcDump causes a NullPointerException:&lt;br /&gt;
:: &amp;lt;code&amp;gt;nls(y ~ a*x + b, data = data.frame(cbind(x = c(1.1, 2.1, 3, 3.9), y = c(1, 2, 3, 4))), start=list(a = 1, b = 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
This is likely because the returned R object has embedded REXPs, functions, and environments.&lt;br /&gt;
* Passing &amp;lt;code&amp;gt;a&amp;lt;-127&amp;lt;/code&amp;gt; to RCalcDump will cause it to print the outputs of the previous statement rather than this one.&lt;br /&gt;
* Passing the following code causes the RCalcCoder to crash:&lt;br /&gt;
:: &amp;lt;code&amp;gt;3+3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#C1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* R optional packages must be installed in the default R location... Otherwise they cannot be loaded.&lt;br /&gt;
* The add-on needs to be installed manually -- Tools &amp;gt; Extension Manager fails to install properly.&lt;br /&gt;
* Very slow in extremely large sets of data (probably due to using TCP/IP to send information).&lt;br /&gt;
* RCalcDump does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
&lt;br /&gt;
== Feature Requests ==&lt;br /&gt;
&lt;br /&gt;
* Dynamic array output. As it stands, you need to know the size of the array if you want the RCalcCoder to output properly.&lt;br /&gt;
* Need to implement error output -- right now, nothing happens. This applies to RCalcDump and RCalcCaller.&lt;br /&gt;
* Make it so the {$BASE} keyword can be replaced with code. Currently, RCalcCaller won&amp;#039;t work with&lt;br /&gt;
&amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-var(c(1,2,3,4))&amp;lt;/code&amp;gt;&lt;br /&gt;
But having such code support would be extremely useful.&lt;br /&gt;
* Make the actual syntax more intuitive and easier to use.&lt;br /&gt;
* The getOutputs() function in the RCalcInterface is very inefficient and should be replaced (&amp;#039;&amp;#039;note that this is a fairly substantial coding change&amp;#039;&amp;#039;).&lt;br /&gt;
* Make the coding window non-modal.&lt;br /&gt;
* Allow for saving scripts in spreadsheets.&lt;br /&gt;
* Make the &amp;quot;help()&amp;quot; function available through the add-on.&lt;br /&gt;
&lt;br /&gt;
== Implemented Requests ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;None yet, this list was just put up.&amp;#039;&amp;#039; :)&lt;br /&gt;
&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=43826</id>
		<title>R and Calc: Bugs and Feature Requests</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=43826"/>
		<updated>2007-08-29T20:30:48Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: /* Bugs */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This section is meant to keep track of the bugs plaguing the add-on, as well as any features people would like to see in upcoming versions. For now, there are three categories on this page:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Bugs: &amp;#039;&amp;#039;&amp;#039; things that need to be fixed urgently (ideally, in the next release).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Feature Requests: &amp;#039;&amp;#039;&amp;#039; things that need to be added at some point in the future, but are not necessary for the healthy functioning of the software.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Implemented Requests: &amp;#039;&amp;#039;&amp;#039; once anything in the categories above is implemented, it is moved here.&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
* As it stands, RCalcCaller can&amp;#039;t read values from matrices with equations. This code does not work &amp;lt;code&amp;gt;=RTestConnection()&amp;lt;/code&amp;gt; with a value of 0 or 1, it will throw an error if we refer to this in code. For example, try the code below:&lt;br /&gt;
:: &amp;lt;code&amp;gt;// First, type =RTestConnection() in cell A1.&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a &amp;lt;- {$A1}&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a*3&amp;lt;/code&amp;gt;&lt;br /&gt;
* RCalcCaller can&amp;#039;t accept String inputs from cells.&lt;br /&gt;
* Need to implement missing values.&lt;br /&gt;
* The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1:&lt;br /&gt;
:: &amp;lt;code&amp;gt;rnorm(1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* Passing the following code to RCalcDump causes a NullPointerException:&lt;br /&gt;
:: &amp;lt;code&amp;gt;nls(y ~ a*x + b, data = data.frame(cbind(x = c(1.1, 2.1, 3, 3.9), y = c(1, 2, 3, 4))), start=list(a = 1, b = 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
This is likely because the returned R object has embedded REXPs, functions, and environments.&lt;br /&gt;
* Passing &amp;lt;code&amp;gt;a&amp;lt;-127&amp;lt;/code&amp;gt; to RCalcDump will cause it to print the outputs of the previous statement rather than this one.&lt;br /&gt;
* Passing the following code causes the RCalcCoder to crash:&lt;br /&gt;
:: &amp;lt;code&amp;gt;3+3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#C1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* R optional packages must be installed in the default R location... Otherwise they cannot be loaded.&lt;br /&gt;
* The add-on needs to be installed manually -- Tools &amp;gt; Extension Manager fails to install properly.&lt;br /&gt;
* Very slow in extremely large sets of data (probably due to using TCP/IP to send information).&lt;br /&gt;
* RCalcDump does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
&lt;br /&gt;
== Feature Requests ==&lt;br /&gt;
&lt;br /&gt;
* Dynamic array output. As it stands, you need to know the size of the array if you want the RCalcCoder to output properly.&lt;br /&gt;
* Need to implement error output -- right now, nothing happens. This applies to RCalcDump and RCalcCaller.&lt;br /&gt;
* Make it so the {$BASE} keyword can be replaced with code. Currently, RCalcCaller won&amp;#039;t work with&lt;br /&gt;
&amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-var(c(1,2,3,4))&amp;lt;/code&amp;gt;&lt;br /&gt;
But having such code support would be extremely useful.&lt;br /&gt;
* Make the actual syntax more intuitive and easier to use.&lt;br /&gt;
* The getOutputs() function in the RCalcInterface is very inefficient and should be replaced (&amp;#039;&amp;#039;note that this is a fairly substantial coding change&amp;#039;&amp;#039;).&lt;br /&gt;
&lt;br /&gt;
== Implemented Requests ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;None yet, this list was just put up.&amp;#039;&amp;#039; :)&lt;br /&gt;
&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=43825</id>
		<title>R and Calc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=43825"/>
		<updated>2007-08-29T20:29:46Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: /* Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;blockquote style=&amp;quot;background: white; border: 1px solid rgb(153, 153, 153); padding: 1em;&amp;quot;&amp;gt;This page is meant as a general overview and installation guide for the software. Please see [[R and Calc Documentation]] for more information on functions, scripting, and general usage. Also feel free to submit bug reports in the [[R and Calc: Bugs and Feature Requests]] page.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;R and Calc&amp;quot; is an [[OpenOffice.org]] (OO.o) [[Calc]] add-on that allows you to use [http://www.r-project.org/ R] methods and functions. The software is currently in early development, though a &amp;#039;&amp;#039;&amp;#039;basic&amp;#039;&amp;#039;&amp;#039; working version does exist, and is available for download.&lt;br /&gt;
&lt;br /&gt;
We welcome any and all comments and name suggestions. Please send them to [[User:Wojciech|Wojciech Gryc]].&lt;br /&gt;
&lt;br /&gt;
For those who come here often, here is the latest version:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Version:&amp;#039;&amp;#039;&amp;#039; 0.1.7&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Release Date:&amp;#039;&amp;#039;&amp;#039; August 23, 2007 (10:39 pm EST)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Link:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-23/RAddon.uno.pkg&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Source Code:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-23/rcalc-0_1_7.zip&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Manual:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-23/manual.pdf&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
You need the following software to run this add-on. While older versions may suffice, they have not been tested yet.&lt;br /&gt;
* OpenOffice.org 2.1&lt;br /&gt;
* Java 5.0&lt;br /&gt;
* RServe 0.4.7&lt;br /&gt;
&lt;br /&gt;
==Installing==&lt;br /&gt;
&lt;br /&gt;
The current version is a prototype and implements only one tool: RDUMP. This method is accessed through the actual Calc menu, and allows you to see the R object structure for various method calls. &lt;br /&gt;
&lt;br /&gt;
To use the add-on, you need to install R and [http://www.rforge.net/Rserve Rserve]. Instructions for installing R can be found at http://www.r-project.org/ Once installed, run R and type the following to install Rserve. Click &amp;quot;enter&amp;quot; at the end of each bullet point:&lt;br /&gt;
&lt;br /&gt;
* install.packages(&amp;quot;Rserve&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Rserve needs to be running to work, and can be launched with the following commands... Note that you only need to do this when you want to use the R Add-on for Calc.&lt;br /&gt;
&lt;br /&gt;
* library(Rserve)&lt;br /&gt;
* Rserve()&lt;br /&gt;
&lt;br /&gt;
Now that you have the prerequisites installed, download the package RAddon.uno.pkg (linked above). Unzip the file, and let&amp;#039;s call the directory you unzipped it in &amp;lt;RA_DIR&amp;gt;. Now let &amp;lt;OO_HOME&amp;gt; be your OpenOffice.org installation directory. Open the command prompt or terminal window and go to &amp;lt;OO_HOME&amp;gt;/program/ and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg add &amp;lt;RA_DIR&amp;gt;/RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
If this is not your first time installing the add-in, you need to check if a previous version is also on the system. If it is, then you will not be able to install the new version. To do this, go to &amp;lt;OO HOME&amp;gt;/program and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg list&lt;br /&gt;
&lt;br /&gt;
This will show you the list of packages already installed, and you should be able to check if the add-is is there. Remember to look for &amp;quot;RAddon.uno.pkg&amp;quot;. You can also skip this step and try to uninstall RAddon.uno.pkg regardless -- this will not harm your OpenOffice.org installation in any way, even if RAddon.uno.pkg is abset. To do this, type:&lt;br /&gt;
&lt;br /&gt;
* unopkg remove RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
Finally, some operating systems require that you restart your OpenOffice.org installation (if you&amp;#039;re not sure, restart your computer) to be able to see the cell functions that come with this package.&lt;br /&gt;
&lt;br /&gt;
==Using==&lt;br /&gt;
&lt;br /&gt;
Using the add-on is very simple at this stage. To see the tool at work, open Calc. In the menus, go to R Add-on &amp;gt; Rdump(). A new dialog window will pop up. Type in an R script -- here are some examples:&lt;br /&gt;
&lt;br /&gt;
* rnorm(10)&lt;br /&gt;
* cor.test(c(1,2,3,4), c(1,2,2,3))&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Run&amp;quot;. A new sheet should appear. Close the dialog with &amp;quot;Close&amp;quot; and check the new sheet -- you should see various pieces of information on the sheet.&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
So far, the software has been tested on the following.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.7===&lt;br /&gt;
&lt;br /&gt;
* 64-bit Gentoo Linux running JDK 1.5.0.12 (64-bit version), OpenOffice 2.2.1, and R 2.4.1&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.6===&lt;br /&gt;
&lt;br /&gt;
* Ubuntu Feisty Fawn on Java 1.6.0 &lt;br /&gt;
&lt;br /&gt;
===Version 0.1.5===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 7 running native Java&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP SP2 running running JDK 1.6.0_02 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.0===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 6 running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP running running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
==Known Issues==&lt;br /&gt;
&lt;br /&gt;
Yes, we already have some known issues! That&amp;#039;s OK, these are common issues and are not problematic with regards to the code:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #1 (&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Fixed in 0.1.1&amp;lt;/font&amp;gt;):&amp;#039;&amp;#039;&amp;#039; Strings and characters, when part of the R object model, do not get published in Rdump().&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #2:&amp;#039;&amp;#039;&amp;#039; RDUMP() does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #3:&amp;#039;&amp;#039;&amp;#039; Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
&lt;br /&gt;
==About==&lt;br /&gt;
&lt;br /&gt;
This add-on is the result of a Google [[Summer of Code 2007]] project. It was initially created by [[User:Wojciech|Wojciech Gryc]]. For information pertaining to the development of this add-on, see [http://www.11-55.org/ooblog/ Wojciech&amp;#039;s Blog].&lt;br /&gt;
&lt;br /&gt;
==Older Versions==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.6&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-08-19/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-19/rcalc-0_1_6.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.5&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-16/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-16/rcalc-0_1_5.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.4&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-10/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-10/rcalc-0_1_4.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.3&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-02/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-02/rcalc-0_1_3.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.2&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-06-01/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-06-01/rcalc-0_1_2.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.1&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-25/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-25/rcalc-0_1_1.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.0&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-15/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-15/rcalc-0.1.0.zip Source Code])&lt;br /&gt;
&lt;br /&gt;
[[Category:Calc]]&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=43824</id>
		<title>R and Calc: Bugs and Feature Requests</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=43824"/>
		<updated>2007-08-29T20:28:03Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This section is meant to keep track of the bugs plaguing the add-on, as well as any features people would like to see in upcoming versions. For now, there are three categories on this page:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Bugs: &amp;#039;&amp;#039;&amp;#039; things that need to be fixed urgently (ideally, in the next release).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Feature Requests: &amp;#039;&amp;#039;&amp;#039; things that need to be added at some point in the future, but are not necessary for the healthy functioning of the software.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Implemented Requests: &amp;#039;&amp;#039;&amp;#039; once anything in the categories above is implemented, it is moved here.&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
* As it stands, RCalcCaller can&amp;#039;t read values from matrices with equations. This code does not work &amp;lt;code&amp;gt;=RTestConnection()&amp;lt;/code&amp;gt; with a value of 0 or 1, it will throw an error if we refer to this in code. For example, try the code below:&lt;br /&gt;
:: &amp;lt;code&amp;gt;// First, type =RTestConnection() in cell A1.&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a &amp;lt;- {$A1}&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a*3&amp;lt;/code&amp;gt;&lt;br /&gt;
* RCalcCaller can&amp;#039;t accept String inputs from cells.&lt;br /&gt;
* Need to implement missing values.&lt;br /&gt;
* The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1:&lt;br /&gt;
:: &amp;lt;code&amp;gt;rnorm(1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* Passing the following code to RCalcDump causes a NullPointerException:&lt;br /&gt;
:: &amp;lt;code&amp;gt;nls(y ~ a*x + b, data = data.frame(cbind(x = c(1.1, 2.1, 3, 3.9), y = c(1, 2, 3, 4))), start=list(a = 1, b = 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
This is likely because the returned R object has embedded REXPs, functions, and environments.&lt;br /&gt;
* Passing &amp;lt;code&amp;gt;a&amp;lt;-127&amp;lt;/code&amp;gt; to RCalcDump will cause it to print the outputs of the previous statement rather than this one.&lt;br /&gt;
* Passing the following code causes the RCalcCoder to crash:&lt;br /&gt;
:: &amp;lt;code&amp;gt;3+3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#C1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* R optional packages must be installed in the default R location... Otherwise they cannot be loaded.&lt;br /&gt;
* The add-on needs to be installed manually -- Tools &amp;gt; Extension Manager fails to install properly.&lt;br /&gt;
* Very slow in extremely large sets of data (probably due to using TCP/IP to send information).&lt;br /&gt;
&lt;br /&gt;
== Feature Requests ==&lt;br /&gt;
&lt;br /&gt;
* Dynamic array output. As it stands, you need to know the size of the array if you want the RCalcCoder to output properly.&lt;br /&gt;
* Need to implement error output -- right now, nothing happens. This applies to RCalcDump and RCalcCaller.&lt;br /&gt;
* Make it so the {$BASE} keyword can be replaced with code. Currently, RCalcCaller won&amp;#039;t work with&lt;br /&gt;
&amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-var(c(1,2,3,4))&amp;lt;/code&amp;gt;&lt;br /&gt;
But having such code support would be extremely useful.&lt;br /&gt;
* Make the actual syntax more intuitive and easier to use.&lt;br /&gt;
* The getOutputs() function in the RCalcInterface is very inefficient and should be replaced (&amp;#039;&amp;#039;note that this is a fairly substantial coding change&amp;#039;&amp;#039;).&lt;br /&gt;
&lt;br /&gt;
== Implemented Requests ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;None yet, this list was just put up.&amp;#039;&amp;#039; :)&lt;br /&gt;
&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=43823</id>
		<title>R and Calc: Bugs and Feature Requests</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=43823"/>
		<updated>2007-08-29T20:26:54Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This section is meant to keep track of the bugs plaguing the add-on, as well as any features people would like to see in upcoming versions. For now, there are three categories on this page:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Bugs: &amp;#039;&amp;#039;&amp;#039; things that need to be fixed urgently (ideally, in the next release).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Feature Requests: &amp;#039;&amp;#039;&amp;#039; things that need to be added at some point in the future, but are not necessary for the healthy functioning of the software.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Implemented Requests: &amp;#039;&amp;#039;&amp;#039; once anything in the categories above is implemented, it is moved here.&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
* As it stands, RCalcCaller can&amp;#039;t read values from matrices with equations. This code does not work &amp;lt;code&amp;gt;=RTestConnection()&amp;lt;/code&amp;gt; with a value of 0 or 1, it will throw an error if we refer to this in code. For example, try the code below:&lt;br /&gt;
:: &amp;lt;code&amp;gt;// First, type =RTestConnection() in cell A1.&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a &amp;lt;- {$A1}&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a*3&amp;lt;/code&amp;gt;&lt;br /&gt;
* RCalcCaller can&amp;#039;t accept String inputs from cells.&lt;br /&gt;
* Need to implement missing values.&lt;br /&gt;
* The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1:&lt;br /&gt;
:: &amp;lt;code&amp;gt;rnorm(1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* Passing the following code to RCalcDump causes a NullPointerException:&lt;br /&gt;
:: &amp;lt;code&amp;gt;nls(y ~ a*x + b, data = data.frame(cbind(x = c(1.1, 2.1, 3, 3.9), y = c(1, 2, 3, 4))), start=list(a = 1, b = 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
This is likely because the returned R object has embedded REXPs, functions, and environments.&lt;br /&gt;
* Passing &amp;lt;code&amp;gt;a&amp;lt;-127&amp;lt;/code&amp;gt; to RCalcDump will cause it to print the outputs of the previous statement rather than this one.&lt;br /&gt;
* Passing the following code causes the RCalcCoder to crash:&lt;br /&gt;
:: &amp;lt;code&amp;gt;3+3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#C1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* R optional packages must be installed in the default R location... Otherwise they cannot be loaded.&lt;br /&gt;
&lt;br /&gt;
== Feature Requests ==&lt;br /&gt;
&lt;br /&gt;
* Dynamic array output. As it stands, you need to know the size of the array if you want the RCalcCoder to output properly.&lt;br /&gt;
* Need to implement error output -- right now, nothing happens. This applies to RCalcDump and RCalcCaller.&lt;br /&gt;
* Make it so the {$BASE} keyword can be replaced with code. Currently, RCalcCaller won&amp;#039;t work with&lt;br /&gt;
&amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-var(c(1,2,3,4))&amp;lt;/code&amp;gt;&lt;br /&gt;
But having such code support would be extremely useful.&lt;br /&gt;
* Make the actual syntax more intuitive and easier to use.&lt;br /&gt;
* The getOutputs() function in the RCalcInterface is very inefficient and should be replaced (&amp;#039;&amp;#039;note that this is a fairly substantial coding change&amp;#039;&amp;#039;).&lt;br /&gt;
&lt;br /&gt;
== Implemented Requests ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;None yet, this list was just put up.&amp;#039;&amp;#039; :)&lt;br /&gt;
&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=43665</id>
		<title>R and Calc: Bugs and Feature Requests</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=43665"/>
		<updated>2007-08-28T04:14:19Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This section is meant to keep track of the bugs plaguing the add-on, as well as any features people would like to see in upcoming versions. For now, there are three categories on this page:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Bugs: &amp;#039;&amp;#039;&amp;#039; things that need to be fixed urgently (ideally, in the next release).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Feature Requests: &amp;#039;&amp;#039;&amp;#039; things that need to be added at some point in the future, but are not necessary for the healthy functioning of the software.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Implemented Requests: &amp;#039;&amp;#039;&amp;#039; once anything in the categories above is implemented, it is moved here.&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
* As it stands, RCalcCaller can&amp;#039;t read values from matrices with equations. This code does not work &amp;lt;code&amp;gt;=RTestConnection()&amp;lt;/code&amp;gt; with a value of 0 or 1, it will throw an error if we refer to this in code. For example, try the code below:&lt;br /&gt;
:: &amp;lt;code&amp;gt;// First, type =RTestConnection() in cell A1.&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a &amp;lt;- {$A1}&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a*3&amp;lt;/code&amp;gt;&lt;br /&gt;
* RCalcCaller can&amp;#039;t accept String inputs from cells.&lt;br /&gt;
* Need to implement missing values.&lt;br /&gt;
* The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1:&lt;br /&gt;
:: &amp;lt;code&amp;gt;rnorm(1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* Passing the following code to RCalcDump causes a NullPointerException:&lt;br /&gt;
:: &amp;lt;code&amp;gt;nls(y ~ a*x + b, data = data.frame(cbind(x = c(1.1, 2.1, 3, 3.9), y = c(1, 2, 3, 4))), start=list(a = 1, b = 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
This is likely because the returned R object has embedded REXPs, functions, and environments.&lt;br /&gt;
* Passing &amp;lt;code&amp;gt;a&amp;lt;-127&amp;lt;/code&amp;gt; to RCalcDump will cause it to print the outputs of the previous statement rather than this one.&lt;br /&gt;
* Passing the following code causes the RCalcCoder to crash:&lt;br /&gt;
:: &amp;lt;code&amp;gt;3+3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#C1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Feature Requests ==&lt;br /&gt;
&lt;br /&gt;
* Dynamic array output. As it stands, you need to know the size of the array if you want the RCalcCoder to output properly.&lt;br /&gt;
* Need to implement error output -- right now, nothing happens. This applies to RCalcDump and RCalcCaller.&lt;br /&gt;
* Make it so the {$BASE} keyword can be replaced with code. Currently, RCalcCaller won&amp;#039;t work with&lt;br /&gt;
&amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-var(c(1,2,3,4))&amp;lt;/code&amp;gt;&lt;br /&gt;
But having such code support would be extremely useful.&lt;br /&gt;
* Make the actual syntax more intuitive and easier to use.&lt;br /&gt;
* The getOutputs() function in the RCalcInterface is very inefficient and should be replaced (&amp;#039;&amp;#039;note that this is a fairly substantial coding change&amp;#039;&amp;#039;).&lt;br /&gt;
&lt;br /&gt;
== Implemented Requests ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;None yet, this list was just put up.&amp;#039;&amp;#039; :)&lt;br /&gt;
&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=43664</id>
		<title>R and Calc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=43664"/>
		<updated>2007-08-28T04:13:46Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;blockquote style=&amp;quot;background: white; border: 1px solid rgb(153, 153, 153); padding: 1em;&amp;quot;&amp;gt;This page is meant as a general overview and installation guide for the software. Please see [[R and Calc Documentation]] for more information on functions, scripting, and general usage. Also feel free to submit bug reports in the [[R and Calc: Bugs and Feature Requests]] page.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;R and Calc&amp;quot; is an [[OpenOffice.org]] (OO.o) [[Calc]] add-on that allows you to use [http://www.r-project.org/ R] methods and functions. The software is currently in early development, though a &amp;#039;&amp;#039;&amp;#039;basic&amp;#039;&amp;#039;&amp;#039; working version does exist, and is available for download.&lt;br /&gt;
&lt;br /&gt;
We welcome any and all comments and name suggestions. Please send them to [[User:Wojciech|Wojciech Gryc]].&lt;br /&gt;
&lt;br /&gt;
For those who come here often, here is the latest version:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Version:&amp;#039;&amp;#039;&amp;#039; 0.1.7&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Release Date:&amp;#039;&amp;#039;&amp;#039; August 23, 2007 (10:39 pm EST)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Link:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-23/RAddon.uno.pkg&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Source Code:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-23/rcalc-0_1_7.zip&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Manual:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-23/manual.pdf&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
You need the following software to run this add-on. While older versions may suffice, they have not been tested yet.&lt;br /&gt;
* OpenOffice.org 2.1&lt;br /&gt;
* Java 5.0&lt;br /&gt;
* RServe 0.4.7&lt;br /&gt;
&lt;br /&gt;
==Installing==&lt;br /&gt;
&lt;br /&gt;
The current version is a prototype and implements only one tool: RDUMP. This method is accessed through the actual Calc menu, and allows you to see the R object structure for various method calls. &lt;br /&gt;
&lt;br /&gt;
To use the add-on, you need to install R and [http://www.rforge.net/Rserve Rserve]. Instructions for installing R can be found at http://www.r-project.org/ Once installed, run R and type the following to install Rserve. Click &amp;quot;enter&amp;quot; at the end of each bullet point:&lt;br /&gt;
&lt;br /&gt;
* install.packages(&amp;quot;Rserve&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Rserve needs to be running to work, and can be launched with the following commands... Note that you only need to do this when you want to use the R Add-on for Calc.&lt;br /&gt;
&lt;br /&gt;
* library(Rserve)&lt;br /&gt;
* Rserve()&lt;br /&gt;
&lt;br /&gt;
Now that you have the prerequisites installed, download the package RAddon.uno.pkg (linked above). Unzip the file, and let&amp;#039;s call the directory you unzipped it in &amp;lt;RA_DIR&amp;gt;. Now let &amp;lt;OO_HOME&amp;gt; be your OpenOffice.org installation directory. Open the command prompt or terminal window and go to &amp;lt;OO_HOME&amp;gt;/program/ and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg add &amp;lt;RA_DIR&amp;gt;/RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
If this is not your first time installing the add-in, you need to check if a previous version is also on the system. If it is, then you will not be able to install the new version. To do this, go to &amp;lt;OO HOME&amp;gt;/program and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg list&lt;br /&gt;
&lt;br /&gt;
This will show you the list of packages already installed, and you should be able to check if the add-is is there. Remember to look for &amp;quot;RAddon.uno.pkg&amp;quot;. You can also skip this step and try to uninstall RAddon.uno.pkg regardless -- this will not harm your OpenOffice.org installation in any way, even if RAddon.uno.pkg is abset. To do this, type:&lt;br /&gt;
&lt;br /&gt;
* unopkg remove RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
Finally, some operating systems require that you restart your OpenOffice.org installation (if you&amp;#039;re not sure, restart your computer) to be able to see the cell functions that come with this package.&lt;br /&gt;
&lt;br /&gt;
==Using==&lt;br /&gt;
&lt;br /&gt;
Using the add-on is very simple at this stage. To see the tool at work, open Calc. In the menus, go to R Add-on &amp;gt; Rdump(). A new dialog window will pop up. Type in an R script -- here are some examples:&lt;br /&gt;
&lt;br /&gt;
* rnorm(10)&lt;br /&gt;
* cor.test(c(1,2,3,4), c(1,2,2,3))&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Run&amp;quot;. A new sheet should appear. Close the dialog with &amp;quot;Close&amp;quot; and check the new sheet -- you should see various pieces of information on the sheet.&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
So far, the software has been tested on the following.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.6===&lt;br /&gt;
&lt;br /&gt;
* Ubuntu Feisty Fawn on Java 1.6.0 &lt;br /&gt;
&lt;br /&gt;
===Version 0.1.5===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 7 running native Java&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP SP2 running running JDK 1.6.0_02 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.0===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 6 running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP running running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
==Known Issues==&lt;br /&gt;
&lt;br /&gt;
Yes, we already have some known issues! That&amp;#039;s OK, these are common issues and are not problematic with regards to the code:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #1 (&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Fixed in 0.1.1&amp;lt;/font&amp;gt;):&amp;#039;&amp;#039;&amp;#039; Strings and characters, when part of the R object model, do not get published in Rdump().&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #2:&amp;#039;&amp;#039;&amp;#039; RDUMP() does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #3:&amp;#039;&amp;#039;&amp;#039; Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
&lt;br /&gt;
==About==&lt;br /&gt;
&lt;br /&gt;
This add-on is the result of a Google [[Summer of Code 2007]] project. It was initially created by [[User:Wojciech|Wojciech Gryc]]. For information pertaining to the development of this add-on, see [http://www.11-55.org/ooblog/ Wojciech&amp;#039;s Blog].&lt;br /&gt;
&lt;br /&gt;
==Older Versions==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.6&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-08-19/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-19/rcalc-0_1_6.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.5&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-16/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-16/rcalc-0_1_5.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.4&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-10/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-10/rcalc-0_1_4.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.3&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-02/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-02/rcalc-0_1_3.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.2&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-06-01/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-06-01/rcalc-0_1_2.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.1&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-25/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-25/rcalc-0_1_1.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.0&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-15/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-15/rcalc-0.1.0.zip Source Code])&lt;br /&gt;
&lt;br /&gt;
[[Category:Calc]]&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=43663</id>
		<title>R and Calc: Bugs and Feature Requests</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc:_Bugs_and_Feature_Requests&amp;diff=43663"/>
		<updated>2007-08-28T04:12:54Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This section is meant to keep track of the bugs plaguing the add-on, as well as any features people would like to see in upcoming versions. For now, there are three categories on this page:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Bugs: &amp;#039;&amp;#039;&amp;#039; things that need to be fixed urgently (ideally, in the next release).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Feature Requests: &amp;#039;&amp;#039;&amp;#039; things that need to be added at some point in the future, but are not necessary for the healthy functioning of the software.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Implemented Requests: &amp;#039;&amp;#039;&amp;#039; once anything in the categories above is implemented, it is moved here.&lt;br /&gt;
&lt;br /&gt;
== Bugs ==&lt;br /&gt;
&lt;br /&gt;
* As it stands, RCalcCaller can&amp;#039;t read values from matrices with equations. This code does not work &amp;lt;code&amp;gt;=RTestConnection()&amp;lt;/code&amp;gt; with a value of 0 or 1, it will throw an error if we refer to this in code. For example, try the code below:&lt;br /&gt;
:: &amp;lt;code&amp;gt;// First, type =RTestConnection() in cell A1.&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a &amp;lt;- {$A1}&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;a*3&amp;lt;/code&amp;gt;&lt;br /&gt;
* RCalcCaller can&amp;#039;t accept String inputs from cells.&lt;br /&gt;
* Need to implement missing values.&lt;br /&gt;
* The following code doesn&amp;#039;t seem to work in the RCalcCoder on Windows XP SP2, R 2.5.1:&lt;br /&gt;
:: &amp;lt;code&amp;gt;rnorm(1)&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
* Passing the following code to RCalcDump causes a NullPointerException:&lt;br /&gt;
:: &amp;lt;code&amp;gt;nls(y ~ a*x + b, data = data.frame(cbind(x = c(1.1, 2.1, 3, 3.9), y = c(1, 2, 3, 4))), start=list(a = 1, b = 1))&amp;lt;/code&amp;gt;&lt;br /&gt;
This is likely because the returned R object has embedded REXPs, functions, and environments.&lt;br /&gt;
* Passing &amp;lt;code&amp;gt;a&amp;lt;-127&amp;lt;/code&amp;gt; to RCalcDump will cause it to print the outputs of the previous statement rather than this one.&lt;br /&gt;
* Passing the following code causes the RCalcCoder to crash:&lt;br /&gt;
:: &amp;lt;code&amp;gt;3+3&amp;lt;/code&amp;gt;&lt;br /&gt;
:: &amp;lt;code&amp;gt;{$OUT#C1}&amp;lt;-{$BASE}&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Feature Requests ==&lt;br /&gt;
&lt;br /&gt;
* Dynamic array output. As it stands, you need to know the size of the array if you want the RCalcCoder to output properly.&lt;br /&gt;
* Need to implement error output -- right now, nothing happens. This applies to RCalcDump and RCalcCaller.&lt;br /&gt;
* Make it so the {$BASE} keyword can be replaced with code. Currently, RCalcCaller won&amp;#039;t work with&lt;br /&gt;
&amp;lt;code&amp;gt;{$OUT#A1}&amp;lt;-var(c(1,2,3,4))&amp;lt;/code&amp;gt;&lt;br /&gt;
But having such code support would be extremely useful.&lt;br /&gt;
* Make the actual syntax more intuitive and easier to use.&lt;br /&gt;
* The getOutputs() function in the RCalcInterface is very inefficient and should be replaced (&amp;#039;&amp;#039;note that this is a fairly substantial coding change&amp;#039;&amp;#039;).&lt;br /&gt;
&lt;br /&gt;
== Implemented Requests ==&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;None yet, this list was just put up.&amp;#039;&amp;#039; :)&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc_Documentation&amp;diff=43636</id>
		<title>R and Calc Documentation</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc_Documentation&amp;diff=43636"/>
		<updated>2007-08-27T17:15:45Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Please note that this documentation is for Version 0.1.1. See the main [[R and Calc]] page for information on installation and setup.&lt;br /&gt;
&lt;br /&gt;
==Cell Functions==&lt;br /&gt;
&lt;br /&gt;
Note that the function names may change in future versions... I&amp;#039;m not really concerned about properly naming everything for users yet, but making things simpler for development.&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;RNDBLMAT( &amp;lt;command&amp;gt; , &amp;lt;matrix&amp;gt; , &amp;lt;matrix&amp;gt;)&amp;#039;&amp;#039;&amp;#039;: passes a command and two matrices. For example, RNDBLMAT(&amp;quot;cov&amp;quot;;A1:A100;B1:B100).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;RNMAT( &amp;lt;command&amp;gt; , &amp;lt;matrix&amp;gt; )&amp;#039;&amp;#039;&amp;#039;: passes a command and matrix as a parameter. For example, RNNUM(&amp;quot;var&amp;quot;;A1:A100).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;RNNUM( &amp;lt;command&amp;gt; , &amp;lt;number&amp;gt; )&amp;#039;&amp;#039;&amp;#039;: passes a command and a numeric parameter. For example, RNNUM(&amp;quot;rnorm&amp;quot;; 1).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;RNUMPROP( &amp;lt;command&amp;gt; , &amp;lt;property&amp;gt; )&amp;#039;&amp;#039;&amp;#039;: passes a command to R and prints a specific property from the output. This is useful if the values returned from R aren&amp;#039;t numeric but contain a variety of information. For example, RNUMPROP(&amp;quot;cor.test(c(1,2,3,4), c(1,2,2,3))&amp;quot;; &amp;quot;p.value&amp;quot;).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;RSIMPLENUM( &amp;lt;command&amp;gt; )&amp;#039;&amp;#039;&amp;#039;: passes a command to R, prints a number if one is returned.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;RTESTCONNECTION()&amp;#039;&amp;#039;&amp;#039;: tests R connection (for RServe).&lt;br /&gt;
&lt;br /&gt;
==R Add-On Menu==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Correlation:&amp;#039;&amp;#039;&amp;#039; an advanced correlation tool that allows you to see p values and 95% confidence intervals. Also allows you to change the type of correlation.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Linear Regression:&amp;#039;&amp;#039;&amp;#039; a simple tool that prints the slope and intercept of a line of best fit. It&amp;#039;s a good example to start from if you plan on making your own scripts (the code is in &amp;#039;&amp;#039;&amp;lt;base dir&amp;gt;/RAddon/rcall_linreg.txt&amp;#039;&amp;#039;).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;General Linear Model:&amp;#039;&amp;#039;&amp;#039; fits a general linear model (GLM) to your data and allows you to see the p value for the model.&lt;br /&gt;
&lt;br /&gt;
===ANOVA Submenu===&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;One-Way ANOVA&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Two-Way ANOVA&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
===Advanced Submenu===&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Load External Script:&amp;#039;&amp;#039;&amp;#039; allows you to load an external GUI script for custom R commands.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Dump R Output: &amp;#039;&amp;#039;&amp;#039; creates a new spreadsheet with the object structure returned by a specific R script.&lt;br /&gt;
&lt;br /&gt;
== Advanced ==&lt;br /&gt;
&lt;br /&gt;
=== Coding Window ===&lt;br /&gt;
&lt;br /&gt;
==== Intro ====&lt;br /&gt;
&lt;br /&gt;
The coding window allows performing more complex operations in R. The user is able to:&lt;br /&gt;
* read data from the spreadsheet (cells and cell-ranges) and import the data into R&lt;br /&gt;
* issue R-commands&lt;br /&gt;
* export the results back into Calc&lt;br /&gt;
&lt;br /&gt;
==== Command Description ====&lt;br /&gt;
There are generally 4 types of commands:&lt;br /&gt;
* data input commands&lt;br /&gt;
* data output commands&lt;br /&gt;
* specific R-commands&lt;br /&gt;
* and specific escape commands&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Data Input&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
To read a data-range in R from the spreadsheet, one uses:&lt;br /&gt;
 &amp;#039;&amp;#039;new_variable_name&amp;#039;&amp;#039; &amp;lt;- &amp;#039;&amp;#039;&amp;#039;{#&amp;#039;&amp;#039;range_start_cell&amp;#039;&amp;#039;:&amp;#039;&amp;#039;range_end_cell&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 where the data is read from the cell range &amp;#039;&amp;#039;range_start_cell&amp;#039;&amp;#039;:&amp;#039;&amp;#039;range_end_cell&amp;#039;&amp;#039;&lt;br /&gt;
 and stored in the variable &amp;#039;&amp;#039;new_variable_name&amp;#039;&amp;#039;&lt;br /&gt;
Implementation Detail: the resulting R-variable is of type &amp;#039;&amp;#039;matrix&amp;#039;&amp;#039;&lt;br /&gt;
 my.variable.class &amp;lt;- class(&amp;#039;&amp;#039;new_variable_name&amp;#039;&amp;#039;)&lt;br /&gt;
 {$OUT#C1} &amp;lt;- {$BASE}&lt;br /&gt;
 &lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;OUTPUT:&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;matrix&amp;#039;&amp;#039;&lt;br /&gt;
&lt;br /&gt;
To store the variable as a list or as a data.frame, use:&lt;br /&gt;
 &amp;#039;&amp;#039;my.list&amp;#039;&amp;#039; &amp;lt;- list( {#&amp;#039;&amp;#039;cell_begin:cell_end&amp;#039;&amp;#039;} )&lt;br /&gt;
 &amp;#039;&amp;#039;my.data.frame&amp;#039;&amp;#039; &amp;lt;- data.frame( {#&amp;#039;&amp;#039;cell_begin:cell_end&amp;#039;&amp;#039;} )&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Data Output&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
Similarly, to write the output back to a Calc cell, one uses:&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;{$OUT#&amp;#039;&amp;#039;results_cell&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;&amp;lt;-&amp;#039;&amp;#039;name_of_variable&amp;#039;&amp;#039;&lt;br /&gt;
Alternatively, when the returned object has just one value:&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;{$OUT#&amp;#039;&amp;#039;results_cell&amp;#039;&amp;#039;}&amp;#039;&amp;#039;&amp;#039;&amp;lt;-&amp;#039;&amp;#039;{$BASE}&amp;#039;&amp;#039;&lt;br /&gt;
: where &amp;#039;&amp;#039;name_of_variable&amp;#039;&amp;#039; is one of the variable names from the &amp;#039;&amp;#039;returned object&amp;#039;&amp;#039; (aka one of the returned strings from names(variable), respectively the &amp;#039;&amp;#039;name_of_variable&amp;#039;&amp;#039; in the R object: &amp;#039;&amp;#039;variable$name_of_variable&amp;#039;&amp;#039;)&lt;br /&gt;
: {$BASE} is the returned value, when there is just one value&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;NOTE for v0.1.6:&amp;#039;&amp;#039;&amp;#039; Any space before the &amp;#039;&amp;#039;&amp;#039;_space_&amp;#039;&amp;#039;{$OUT:...}&amp;#039; will prevent the code from returning any output. Hope this gets fixed.&lt;br /&gt;
&lt;br /&gt;
==== Examples ====&lt;br /&gt;
&lt;br /&gt;
Some examples may explain better the concept. Lets consider that the user data is in the cells A1:A20 and B1:B20. The scripts look then as follows:&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;Wilcoxon test:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 wilcox.test({#A1:A20},{#B1:B20})&lt;br /&gt;
 {$OUT#A22} &amp;lt;- p.value&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;Correlation&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 cor.test({#A1:A20},{#B1:B20})&lt;br /&gt;
 {$OUT#B22} &amp;lt;- p.value&lt;br /&gt;
&lt;br /&gt;
Lets say cells C1, C2, D1 and D2 containing count data forming a contingency table. The Fisher-exact test for count data can be computed as follows: (&amp;#039;&amp;#039;&amp;#039;ATTENTION: computing the Fisher-exact test with large data values may take some time!&amp;#039;&amp;#039;&amp;#039;)&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;Fisher-exact test:&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 fisher.test({#C1:D2})&lt;br /&gt;
 {$OUT#C22} &amp;lt;- p.value&lt;br /&gt;
&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;Chi-Square Test&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
 chisq.test({#C1:D2})&lt;br /&gt;
 {$OUT#D22} &amp;lt;- p.value&lt;br /&gt;
&lt;br /&gt;
==== Complex Examples ====&lt;br /&gt;
&lt;br /&gt;
The following script will perform a &amp;#039;&amp;#039;&amp;#039;Multivariate Linear Regression&amp;#039;&amp;#039;&amp;#039; (least-squares-fitting). Suppose the user data is in cells &amp;#039;&amp;#039;A1:C100&amp;#039;&amp;#039;, while &amp;#039;&amp;#039;D1:D100&amp;#039;&amp;#039; contains the dependent variable. We will perform a multivariate regression of the form D = I + x1* A + x2 * B + x3 * C, where:&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;I&amp;#039;&amp;#039;&amp;#039; is the Intercept&lt;br /&gt;
 &amp;#039;&amp;#039;&amp;#039;x1-x3&amp;#039;&amp;#039;&amp;#039; are the corresponding regression coefficients&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Multivariate Linear Regression&amp;#039;&amp;#039;&amp;#039; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;#039;&amp;#039;considering the variable names are stored in A1:D1 (in the column headers)&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
my.data &amp;lt;- data.frame({#A2:D100})&lt;br /&gt;
l&amp;lt;-length(my.data[1,])&lt;br /&gt;
// will be used in a future version instead of hardcoding INDEXes&lt;br /&gt;
&lt;br /&gt;
linear.model&amp;lt;-lm(my.data[,4]~my.data[,1]+my.data[,2]+my.data[,3])&lt;br /&gt;
sx&amp;lt;-summary(linear.model)[[4]]&lt;br /&gt;
&lt;br /&gt;
// ANNOTATION&lt;br /&gt;
my.labels&amp;lt;-c(&amp;quot;pm&amp;quot;=&amp;quot;Parameter&amp;quot;,&amp;quot;Intercept&amp;quot;=&amp;quot;Intercept&amp;quot;,c({#A1:C1}))&lt;br /&gt;
// STRING IMPORT IS BROKEN&lt;br /&gt;
//{$OUT#F1:5}&amp;lt;-{$BASE} // DOES NOT FUNCTION&lt;br /&gt;
{$OUT#F1}&amp;lt;-pm&lt;br /&gt;
{$OUT#F2}&amp;lt;-Intercept&lt;br /&gt;
&lt;br /&gt;
s&amp;lt;-list(&amp;quot;b&amp;quot;=&amp;quot;beta-coeff&amp;quot;, &amp;quot;bIntercept&amp;quot;=sx[[1]], &amp;quot;b1&amp;quot;=sx[[2]], &amp;quot;b2&amp;quot;=sx[[3]], &amp;quot;b3&amp;quot;=sx[[4]] )&lt;br /&gt;
 s&amp;lt;-c(s,&amp;quot;p&amp;quot;=&amp;quot;p-value&amp;quot;, &amp;quot;pIntercept&amp;quot;=sx[[13]], &amp;quot;p1&amp;quot;=sx[[14]], &amp;quot;p2&amp;quot;=sx[[15]], &amp;quot;p3&amp;quot;=sx[[16]])&lt;br /&gt;
// beta-COEFFICIENTS&lt;br /&gt;
{$OUT#G1}&amp;lt;-b&lt;br /&gt;
{$OUT#G2}&amp;lt;-bIntercept&lt;br /&gt;
{$OUT#G3}&amp;lt;-b1&lt;br /&gt;
{$OUT#G4}&amp;lt;-b2&lt;br /&gt;
{$OUT#G5}&amp;lt;-b3&lt;br /&gt;
&lt;br /&gt;
// p-VALUES&lt;br /&gt;
{$OUT#H1}&amp;lt;-p&lt;br /&gt;
{$OUT#H2}&amp;lt;-pIntercept&lt;br /&gt;
{$OUT#H3}&amp;lt;-p1&lt;br /&gt;
{$OUT#H4}&amp;lt;-p2&lt;br /&gt;
{$OUT#H5}&amp;lt;-p3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Finally, to test the validity of the regression model, one has to run an ANOVA-test (Analysis of Variance) on the model. We will do this using the &amp;#039;&amp;#039;&amp;#039;R&amp;#039;&amp;#039;&amp;#039; &amp;#039;&amp;#039;aov&amp;#039;&amp;#039;-function:&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;Testing the model&amp;#039;&amp;#039;&amp;#039;&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
my.aov&amp;lt;-summary(aov(linear.model))[[1]]&lt;br /&gt;
mx&amp;lt;-my.aov[[5]]&lt;br /&gt;
s&amp;lt;-list(&amp;quot;m&amp;quot;=&amp;quot;ANOVA&amp;quot;,&amp;quot;m1&amp;quot;=mx[[1]],&amp;quot;m2&amp;quot;=mx[[2]],&amp;quot;m3&amp;quot;=mx[[3]])&lt;br /&gt;
{$OUT#I1}&amp;lt;-m&lt;br /&gt;
{$OUT#I3}&amp;lt;-m1&lt;br /&gt;
{$OUT#I4}&amp;lt;-m2&lt;br /&gt;
{$OUT#I5}&amp;lt;-m3&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
That&amp;#039;s it.&lt;br /&gt;
&lt;br /&gt;
==Tips &amp;amp; Tricks==&lt;br /&gt;
&lt;br /&gt;
===Running External Libraries===&lt;br /&gt;
&lt;br /&gt;
At this time, it&amp;#039;s not possible to load libraries ahead of time using Rserve. However, you can load a library through a function cell. The example below loads a library called [http://erzuli.ss.uci.edu/R.stuff/ sna] and calls a function, passing a matrix as a parameter. Note that the library needs to be installed prior to using it.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;RNMAT(&amp;quot;library(sna);gden&amp;quot;; A1:D4)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===summary() Hack for Complex R Objects===&lt;br /&gt;
&lt;br /&gt;
There are times when the R object structure you are dealing with is very complex, to the point that it&amp;#039;s difficult to find specific values. One such example is the nonlinear least squares function (used for curve fitting, for example). You use this function by calling nls() and one of the most useful things it gives is values for coefficients in an equation. The only problem is the object returned by nls() is organized in a way that makes it difficult to find values for these coefficients.&lt;br /&gt;
&lt;br /&gt;
One workaround is to call nls() with summary()... This will allow you to see some of the variables (such as coefficient values) and makes it much easier to extract information using the R/Calc interface.&lt;br /&gt;
&lt;br /&gt;
See the example implementation with one variable: http://www.11-55.org/rcalc/2007-06-01/rcall_nls.txt&lt;br /&gt;
&lt;br /&gt;
===Random Numbers===&lt;br /&gt;
&lt;br /&gt;
If you try to generate random numbers with a cell function like &amp;lt;code&amp;gt;rsimplenum(&amp;quot;rnorm(1)&amp;quot;)&amp;lt;/code&amp;gt; and try to expand it to multiple cells by dragging, you&amp;#039;ll notice the numbers are all the same (at least in Linux!). This occurs because R is using the same seed number for every cell, causing all the numbers to be the same. There are a number of ways to fix this.&lt;br /&gt;
&lt;br /&gt;
If you just need a list of random numbers, the easiest way to get one is to go to &amp;#039;&amp;#039;R Add-On &amp;gt; Advanced &amp;gt; Dump R Output&amp;#039;&amp;#039; and type your function here. For example, if you want 100 normally distributed numbers, type &amp;lt;code&amp;gt;rnorm(100)&amp;lt;/code&amp;gt; and click &amp;#039;&amp;#039;Run&amp;#039;&amp;#039;. This will create a new spreadsheet with your numbers.&lt;br /&gt;
&lt;br /&gt;
A second, harder way is setting the R seed with each cell call. Pick a cell and write &amp;lt;code&amp;gt;rsimplenum(&amp;quot;set.seed(543);rnorm(1)&amp;quot;)&amp;lt;/code&amp;gt; you will first set the random number generator&amp;#039;s seed to 543, and then get a random number. In this way, however, the random number will not change if you refresh the function because the seed does not change. Unfortunately, the only way to change the seed in this method is manually for every cell.&lt;br /&gt;
&lt;br /&gt;
==Creating Your Own Dialogs and Scripts==&lt;br /&gt;
&lt;br /&gt;
Using a basic text file, it is possible to create your own scripts and functions that will then call R and provide output. A basic [http://www.11-55.org/ooblog/wp-content/uploads/2007/05/correl-may-21.txt correlation example] is provided, and an outline of the tile structure is given below.&lt;br /&gt;
&lt;br /&gt;
First and foremost, there are four sections to a file:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;__ETC:&amp;#039;&amp;#039;&amp;#039; ignored -- a set of comments.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;__GUI:&amp;#039;&amp;#039;&amp;#039; for user interface objects.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;__CALL:&amp;#039;&amp;#039;&amp;#039; allows you to define the R function call based on GUI inputs.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;__OUTPUT:&amp;#039;&amp;#039;&amp;#039; allows you to set where the output will go.&lt;br /&gt;
&lt;br /&gt;
===Using __GUI:===&lt;br /&gt;
&lt;br /&gt;
Currently, the following GUI objects can be defined in the file:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;TextField:&amp;#039;&amp;#039;&amp;#039; for text-based arguments.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;NumberField:&amp;#039;&amp;#039;&amp;#039; for numeric arguments -- either actual numbers or a reference to a sheet cell.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;ArrayField:&amp;#039;&amp;#039;&amp;#039; refers to data in the spreadsheet (current active sheet).&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Label:&amp;#039;&amp;#039;&amp;#039; a basic label.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;RunButton:&amp;#039;&amp;#039;&amp;#039; runs the code and prints output.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;CancelButton:&amp;#039;&amp;#039;&amp;#039; closes the dialog.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Dialog:&amp;#039;&amp;#039;&amp;#039; allows you to define the size and location of the dialog.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;OutputField:&amp;#039;&amp;#039;&amp;#039; allows for the user to input information for outputs.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;ComboBox:&amp;#039;&amp;#039;&amp;#039; creates a combo box. Rather than passing &amp;#039;&amp;#039;label_text&amp;#039;&amp;#039;, pass a list of options with &amp;quot;;&amp;quot; as the delimiter. For example, &amp;quot;a;b;c;d&amp;quot; will have the combo box show four options: a, b, c, and d.&lt;br /&gt;
&lt;br /&gt;
The format for the above is as follows, with &amp;#039;&amp;#039;italic&amp;#039;&amp;#039; fields representing variables and parameters: &amp;#039;&amp;#039;Object_Name&amp;#039;&amp;#039;&amp;lt;-Label( &amp;#039;&amp;#039;x position&amp;#039;&amp;#039; , &amp;#039;&amp;#039; y position &amp;#039;&amp;#039;, &amp;#039;&amp;#039;width&amp;#039;&amp;#039; , &amp;#039;&amp;#039;height&amp;#039;&amp;#039;, &amp;#039;&amp;#039;label_text&amp;#039;&amp;#039; ). If you want to use special symbols in labels or other parts of the GUI, the following characters need to be replaced with the corresponding variables:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;(&amp;#039;&amp;#039;&amp;#039; {$BL}&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;)&amp;#039;&amp;#039;&amp;#039; {$BR}&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;=&amp;#039;&amp;#039;&amp;#039; {$EQ}&lt;br /&gt;
&lt;br /&gt;
===Using __CALL:===&lt;br /&gt;
&lt;br /&gt;
In this case, simply write your call text, with variables being represented as {$&amp;#039;&amp;#039;variable-name&amp;#039;&amp;#039;} where the name itself corresponds to the names you gave the GUI objects above. This only works with TextField, NumberField, and ArrayField. You can have multiple lines of R scripts here, but can only use the output of the final line of code in this section.&lt;br /&gt;
&lt;br /&gt;
===Using __OUTPUT:===&lt;br /&gt;
&lt;br /&gt;
In this case, you write every line like so: &amp;#039;&amp;#039;Cell-Address&amp;#039;&amp;#039;&amp;lt;-&amp;#039;&amp;#039;Value&amp;#039;&amp;#039; where &amp;#039;&amp;#039;Value&amp;#039;&amp;#039; is either the name of a specific property in the R object structure (e.g. &amp;#039;&amp;#039;p.value&amp;#039;&amp;#039; or &amp;#039;&amp;#039;estimate&amp;#039;&amp;#039;) or a general piece of text. The software will always test to see if your text is a property, and if it is not, the text itself will be printed.&lt;br /&gt;
&lt;br /&gt;
[[Category:Calc]]&lt;br /&gt;
[[Category:Add-Ins]]&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Category:R_and_Calc&amp;diff=43635</id>
		<title>Category:R and Calc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Category:R_and_Calc&amp;diff=43635"/>
		<updated>2007-08-27T17:15:07Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This category specifically relates to pages dealing with the R and Calc integration project. Those interested in learning about the add-on should see the main page, [[R_and_Calc]]. To contact someone with regards to the add-on, please see [[User:Wojciech | Wojciech Gryc]].&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=43634</id>
		<title>R and Calc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=43634"/>
		<updated>2007-08-27T17:13:38Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;blockquote style=&amp;quot;background: white; border: 1px solid rgb(153, 153, 153); padding: 1em;&amp;quot;&amp;gt;This page is meant as a general overview and installation guide for the software. Please see [[R and Calc Documentation]] for more information on functions, scripting, and general usage.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;R and Calc&amp;quot; is an [[OpenOffice.org]] (OO.o) [[Calc]] add-on that allows you to use [http://www.r-project.org/ R] methods and functions. The software is currently in early development, though a &amp;#039;&amp;#039;&amp;#039;basic&amp;#039;&amp;#039;&amp;#039; working version does exist, and is available for download.&lt;br /&gt;
&lt;br /&gt;
We welcome any and all comments and name suggestions. Please send them to [[User:Wojciech|Wojciech Gryc]].&lt;br /&gt;
&lt;br /&gt;
For those who come here often, here is the latest version:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Version:&amp;#039;&amp;#039;&amp;#039; 0.1.7&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Release Date:&amp;#039;&amp;#039;&amp;#039; August 23, 2007 (10:39 pm EST)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Link:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-23/RAddon.uno.pkg&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Source Code:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-23/rcalc-0_1_7.zip&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Manual:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-23/manual.pdf&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
You need the following software to run this add-on. While older versions may suffice, they have not been tested yet.&lt;br /&gt;
* OpenOffice.org 2.1&lt;br /&gt;
* Java 5.0&lt;br /&gt;
* RServe 0.4.7&lt;br /&gt;
&lt;br /&gt;
==Installing==&lt;br /&gt;
&lt;br /&gt;
The current version is a prototype and implements only one tool: RDUMP. This method is accessed through the actual Calc menu, and allows you to see the R object structure for various method calls. &lt;br /&gt;
&lt;br /&gt;
To use the add-on, you need to install R and [http://www.rforge.net/Rserve Rserve]. Instructions for installing R can be found at http://www.r-project.org/ Once installed, run R and type the following to install Rserve. Click &amp;quot;enter&amp;quot; at the end of each bullet point:&lt;br /&gt;
&lt;br /&gt;
* install.packages(&amp;quot;Rserve&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Rserve needs to be running to work, and can be launched with the following commands... Note that you only need to do this when you want to use the R Add-on for Calc.&lt;br /&gt;
&lt;br /&gt;
* library(Rserve)&lt;br /&gt;
* Rserve()&lt;br /&gt;
&lt;br /&gt;
Now that you have the prerequisites installed, download the package RAddon.uno.pkg (linked above). Unzip the file, and let&amp;#039;s call the directory you unzipped it in &amp;lt;RA_DIR&amp;gt;. Now let &amp;lt;OO_HOME&amp;gt; be your OpenOffice.org installation directory. Open the command prompt or terminal window and go to &amp;lt;OO_HOME&amp;gt;/program/ and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg add &amp;lt;RA_DIR&amp;gt;/RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
If this is not your first time installing the add-in, you need to check if a previous version is also on the system. If it is, then you will not be able to install the new version. To do this, go to &amp;lt;OO HOME&amp;gt;/program and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg list&lt;br /&gt;
&lt;br /&gt;
This will show you the list of packages already installed, and you should be able to check if the add-is is there. Remember to look for &amp;quot;RAddon.uno.pkg&amp;quot;. You can also skip this step and try to uninstall RAddon.uno.pkg regardless -- this will not harm your OpenOffice.org installation in any way, even if RAddon.uno.pkg is abset. To do this, type:&lt;br /&gt;
&lt;br /&gt;
* unopkg remove RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
Finally, some operating systems require that you restart your OpenOffice.org installation (if you&amp;#039;re not sure, restart your computer) to be able to see the cell functions that come with this package.&lt;br /&gt;
&lt;br /&gt;
==Using==&lt;br /&gt;
&lt;br /&gt;
Using the add-on is very simple at this stage. To see the tool at work, open Calc. In the menus, go to R Add-on &amp;gt; Rdump(). A new dialog window will pop up. Type in an R script -- here are some examples:&lt;br /&gt;
&lt;br /&gt;
* rnorm(10)&lt;br /&gt;
* cor.test(c(1,2,3,4), c(1,2,2,3))&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Run&amp;quot;. A new sheet should appear. Close the dialog with &amp;quot;Close&amp;quot; and check the new sheet -- you should see various pieces of information on the sheet.&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
So far, the software has been tested on the following.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.6===&lt;br /&gt;
&lt;br /&gt;
* Ubuntu Feisty Fawn on Java 1.6.0 &lt;br /&gt;
&lt;br /&gt;
===Version 0.1.5===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 7 running native Java&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP SP2 running running JDK 1.6.0_02 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.0===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 6 running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP running running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
==Known Issues==&lt;br /&gt;
&lt;br /&gt;
Yes, we already have some known issues! That&amp;#039;s OK, these are common issues and are not problematic with regards to the code:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #1 (&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Fixed in 0.1.1&amp;lt;/font&amp;gt;):&amp;#039;&amp;#039;&amp;#039; Strings and characters, when part of the R object model, do not get published in Rdump().&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #2:&amp;#039;&amp;#039;&amp;#039; RDUMP() does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #3:&amp;#039;&amp;#039;&amp;#039; Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
&lt;br /&gt;
==About==&lt;br /&gt;
&lt;br /&gt;
This add-on is the result of a Google [[Summer of Code 2007]] project. It was initially created by [[User:Wojciech|Wojciech Gryc]]. For information pertaining to the development of this add-on, see [http://www.11-55.org/ooblog/ Wojciech&amp;#039;s Blog].&lt;br /&gt;
&lt;br /&gt;
==Older Versions==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.6&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-08-19/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-19/rcalc-0_1_6.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.5&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-16/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-16/rcalc-0_1_5.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.4&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-10/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-10/rcalc-0_1_4.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.3&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-02/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-02/rcalc-0_1_3.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.2&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-06-01/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-06-01/rcalc-0_1_2.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.1&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-25/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-25/rcalc-0_1_1.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.0&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-15/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-15/rcalc-0.1.0.zip Source Code])&lt;br /&gt;
&lt;br /&gt;
[[Category:Calc]]&lt;br /&gt;
[[Category: R and Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=43380</id>
		<title>R and Calc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=43380"/>
		<updated>2007-08-24T03:40:22Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: /* Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;blockquote style=&amp;quot;background: white; border: 1px solid rgb(153, 153, 153); padding: 1em;&amp;quot;&amp;gt;This page is meant as a general overview and installation guide for the software. Please see [[R and Calc Documentation]] for more information on functions, scripting, and general usage.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;R and Calc&amp;quot; is an [[OpenOffice.org]] (OO.o) [[Calc]] add-on that allows you to use [http://www.r-project.org/ R] methods and functions. The software is currently in early development, though a &amp;#039;&amp;#039;&amp;#039;basic&amp;#039;&amp;#039;&amp;#039; working version does exist, and is available for download.&lt;br /&gt;
&lt;br /&gt;
We welcome any and all comments and name suggestions. Please send them to [[User:Wojciech|Wojciech Gryc]].&lt;br /&gt;
&lt;br /&gt;
For those who come here often, here is the latest version:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Version:&amp;#039;&amp;#039;&amp;#039; 0.1.7&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Release Date:&amp;#039;&amp;#039;&amp;#039; August 23, 2007 (10:39 pm EST)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Link:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-23/RAddon.uno.pkg&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Source Code:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-23/rcalc-0_1_7.zip&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Manual:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-23/manual.pdf&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
You need the following software to run this add-on. While older versions may suffice, they have not been tested yet.&lt;br /&gt;
* OpenOffice.org 2.1&lt;br /&gt;
* Java 5.0&lt;br /&gt;
* RServe 0.4.7&lt;br /&gt;
&lt;br /&gt;
==Installing==&lt;br /&gt;
&lt;br /&gt;
The current version is a prototype and implements only one tool: RDUMP. This method is accessed through the actual Calc menu, and allows you to see the R object structure for various method calls. &lt;br /&gt;
&lt;br /&gt;
To use the add-on, you need to install R and [http://www.rforge.net/Rserve Rserve]. Instructions for installing R can be found at http://www.r-project.org/ Once installed, run R and type the following to install Rserve. Click &amp;quot;enter&amp;quot; at the end of each bullet point:&lt;br /&gt;
&lt;br /&gt;
* install.packages(&amp;quot;Rserve&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Rserve needs to be running to work, and can be launched with the following commands... Note that you only need to do this when you want to use the R Add-on for Calc.&lt;br /&gt;
&lt;br /&gt;
* library(Rserve)&lt;br /&gt;
* Rserve()&lt;br /&gt;
&lt;br /&gt;
Now that you have the prerequisites installed, download the package RAddon.uno.pkg (linked above). Unzip the file, and let&amp;#039;s call the directory you unzipped it in &amp;lt;RA_DIR&amp;gt;. Now let &amp;lt;OO_HOME&amp;gt; be your OpenOffice.org installation directory. Open the command prompt or terminal window and go to &amp;lt;OO_HOME&amp;gt;/program/ and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg add &amp;lt;RA_DIR&amp;gt;/RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
If this is not your first time installing the add-in, you need to check if a previous version is also on the system. If it is, then you will not be able to install the new version. To do this, go to &amp;lt;OO HOME&amp;gt;/program and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg list&lt;br /&gt;
&lt;br /&gt;
This will show you the list of packages already installed, and you should be able to check if the add-is is there. Remember to look for &amp;quot;RAddon.uno.pkg&amp;quot;. You can also skip this step and try to uninstall RAddon.uno.pkg regardless -- this will not harm your OpenOffice.org installation in any way, even if RAddon.uno.pkg is abset. To do this, type:&lt;br /&gt;
&lt;br /&gt;
* unopkg remove RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
Finally, some operating systems require that you restart your OpenOffice.org installation (if you&amp;#039;re not sure, restart your computer) to be able to see the cell functions that come with this package.&lt;br /&gt;
&lt;br /&gt;
==Using==&lt;br /&gt;
&lt;br /&gt;
Using the add-on is very simple at this stage. To see the tool at work, open Calc. In the menus, go to R Add-on &amp;gt; Rdump(). A new dialog window will pop up. Type in an R script -- here are some examples:&lt;br /&gt;
&lt;br /&gt;
* rnorm(10)&lt;br /&gt;
* cor.test(c(1,2,3,4), c(1,2,2,3))&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Run&amp;quot;. A new sheet should appear. Close the dialog with &amp;quot;Close&amp;quot; and check the new sheet -- you should see various pieces of information on the sheet.&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
So far, the software has been tested on the following.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.6===&lt;br /&gt;
&lt;br /&gt;
* Ubuntu Feisty Fawn on Java 1.6.0 &lt;br /&gt;
&lt;br /&gt;
===Version 0.1.5===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 7 running native Java&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP SP2 running running JDK 1.6.0_02 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.0===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 6 running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP running running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
==Known Issues==&lt;br /&gt;
&lt;br /&gt;
Yes, we already have some known issues! That&amp;#039;s OK, these are common issues and are not problematic with regards to the code:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #1 (&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Fixed in 0.1.1&amp;lt;/font&amp;gt;):&amp;#039;&amp;#039;&amp;#039; Strings and characters, when part of the R object model, do not get published in Rdump().&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #2:&amp;#039;&amp;#039;&amp;#039; RDUMP() does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #3:&amp;#039;&amp;#039;&amp;#039; Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
&lt;br /&gt;
==About==&lt;br /&gt;
&lt;br /&gt;
This add-on is the result of a Google [[Summer of Code 2007]] project. It was initially created by [[User:Wojciech|Wojciech Gryc]]. For information pertaining to the development of this add-on, see [http://www.11-55.org/ooblog/ Wojciech&amp;#039;s Blog].&lt;br /&gt;
&lt;br /&gt;
==Older Versions==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.6&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-08-19/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-19/rcalc-0_1_6.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.5&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-16/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-16/rcalc-0_1_5.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.4&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-10/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-10/rcalc-0_1_4.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.3&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-02/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-02/rcalc-0_1_3.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.2&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-06-01/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-06-01/rcalc-0_1_2.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.1&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-25/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-25/rcalc-0_1_1.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.0&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-15/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-15/rcalc-0.1.0.zip Source Code])&lt;br /&gt;
&lt;br /&gt;
[[Category:Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=43379</id>
		<title>R and Calc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=43379"/>
		<updated>2007-08-24T03:39:44Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: /* Older Versions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;blockquote style=&amp;quot;background: white; border: 1px solid rgb(153, 153, 153); padding: 1em;&amp;quot;&amp;gt;This page is meant as a general overview and installation guide for the software. Please see [[R and Calc Documentation]] for more information on functions, scripting, and general usage.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;R and Calc&amp;quot; is an [[OpenOffice.org]] (OO.o) [[Calc]] add-on that allows you to use [http://www.r-project.org/ R] methods and functions. The software is currently in early development, though a &amp;#039;&amp;#039;&amp;#039;basic&amp;#039;&amp;#039;&amp;#039; working version does exist, and is available for download.&lt;br /&gt;
&lt;br /&gt;
We welcome any and all comments and name suggestions. Please send them to [[User:Wojciech|Wojciech Gryc]].&lt;br /&gt;
&lt;br /&gt;
For those who come here often, here is the latest version:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Version:&amp;#039;&amp;#039;&amp;#039; 0.1.7&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Release Date:&amp;#039;&amp;#039;&amp;#039; August 23, 2007 (10:39 pm EST)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Link:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-23/RAddon.uno.pkg&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Source Code:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-23/rcalc-0_1_7.zip&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Manual:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-23/manual.pdf&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
You need the following software to run this add-on. While older versions may suffice, they have not been tested yet.&lt;br /&gt;
* OpenOffice.org 2.1&lt;br /&gt;
* Java 5.0&lt;br /&gt;
* RServe 0.4.7&lt;br /&gt;
&lt;br /&gt;
==Installing==&lt;br /&gt;
&lt;br /&gt;
The current version is a prototype and implements only one tool: RDUMP. This method is accessed through the actual Calc menu, and allows you to see the R object structure for various method calls. &lt;br /&gt;
&lt;br /&gt;
To use the add-on, you need to install R and [http://www.rforge.net/Rserve Rserve]. Instructions for installing R can be found at http://www.r-project.org/ Once installed, run R and type the following to install Rserve. Click &amp;quot;enter&amp;quot; at the end of each bullet point:&lt;br /&gt;
&lt;br /&gt;
* install.packages(&amp;quot;Rserve&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Rserve needs to be running to work, and can be launched with the following commands... Note that you only need to do this when you want to use the R Add-on for Calc.&lt;br /&gt;
&lt;br /&gt;
* library(Rserve)&lt;br /&gt;
* Rserve()&lt;br /&gt;
&lt;br /&gt;
Now that you have the prerequisites installed, download the package RAddon.uno.pkg (linked above). Unzip the file, and let&amp;#039;s call the directory you unzipped it in &amp;lt;RA_DIR&amp;gt;. Now let &amp;lt;OO_HOME&amp;gt; be your OpenOffice.org installation directory. Open the command prompt or terminal window and go to &amp;lt;OO_HOME&amp;gt;/program/ and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg add &amp;lt;RA_DIR&amp;gt;/RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
If this is not your first time installing the add-in, you need to check if a previous version is also on the system. If it is, then you will not be able to install the new version. To do this, go to &amp;lt;OO HOME&amp;gt;/program and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg list&lt;br /&gt;
&lt;br /&gt;
This will show you the list of packages already installed, and you should be able to check if the add-is is there. Remember to look for &amp;quot;RAddon.uno.pkg&amp;quot;. You can also skip this step and try to uninstall RAddon.uno.pkg regardless -- this will not harm your OpenOffice.org installation in any way, even if RAddon.uno.pkg is abset. To do this, type:&lt;br /&gt;
&lt;br /&gt;
* unopkg remove RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
Finally, some operating systems require that you restart your OpenOffice.org installation (if you&amp;#039;re not sure, restart your computer) to be able to see the cell functions that come with this package.&lt;br /&gt;
&lt;br /&gt;
==Using==&lt;br /&gt;
&lt;br /&gt;
Using the add-on is very simple at this stage. To see the tool at work, open Calc. In the menus, go to R Add-on &amp;gt; Rdump(). A new dialog window will pop up. Type in an R script -- here are some examples:&lt;br /&gt;
&lt;br /&gt;
* rnorm(10)&lt;br /&gt;
* cor.test(c(1,2,3,4), c(1,2,2,3))&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Run&amp;quot;. A new sheet should appear. Close the dialog with &amp;quot;Close&amp;quot; and check the new sheet -- you should see various pieces of information on the sheet.&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
So far, the software has been tested on the following.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.5===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 7 running native Java&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP SP2 running running JDK 1.6.0_02 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.0===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 6 running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP running running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
==Known Issues==&lt;br /&gt;
&lt;br /&gt;
Yes, we already have some known issues! That&amp;#039;s OK, these are common issues and are not problematic with regards to the code:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #1 (&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Fixed in 0.1.1&amp;lt;/font&amp;gt;):&amp;#039;&amp;#039;&amp;#039; Strings and characters, when part of the R object model, do not get published in Rdump().&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #2:&amp;#039;&amp;#039;&amp;#039; RDUMP() does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #3:&amp;#039;&amp;#039;&amp;#039; Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
&lt;br /&gt;
==About==&lt;br /&gt;
&lt;br /&gt;
This add-on is the result of a Google [[Summer of Code 2007]] project. It was initially created by [[User:Wojciech|Wojciech Gryc]]. For information pertaining to the development of this add-on, see [http://www.11-55.org/ooblog/ Wojciech&amp;#039;s Blog].&lt;br /&gt;
&lt;br /&gt;
==Older Versions==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.6&amp;#039;&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-08-19/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-19/rcalc-0_1_6.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.5&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-16/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-16/rcalc-0_1_5.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.4&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-10/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-10/rcalc-0_1_4.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.3&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-02/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-02/rcalc-0_1_3.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.2&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-06-01/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-06-01/rcalc-0_1_2.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.1&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-25/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-25/rcalc-0_1_1.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.0&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-15/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-15/rcalc-0.1.0.zip Source Code])&lt;br /&gt;
&lt;br /&gt;
[[Category:Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=43378</id>
		<title>R and Calc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=43378"/>
		<updated>2007-08-24T02:39:30Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;blockquote style=&amp;quot;background: white; border: 1px solid rgb(153, 153, 153); padding: 1em;&amp;quot;&amp;gt;This page is meant as a general overview and installation guide for the software. Please see [[R and Calc Documentation]] for more information on functions, scripting, and general usage.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;R and Calc&amp;quot; is an [[OpenOffice.org]] (OO.o) [[Calc]] add-on that allows you to use [http://www.r-project.org/ R] methods and functions. The software is currently in early development, though a &amp;#039;&amp;#039;&amp;#039;basic&amp;#039;&amp;#039;&amp;#039; working version does exist, and is available for download.&lt;br /&gt;
&lt;br /&gt;
We welcome any and all comments and name suggestions. Please send them to [[User:Wojciech|Wojciech Gryc]].&lt;br /&gt;
&lt;br /&gt;
For those who come here often, here is the latest version:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Version:&amp;#039;&amp;#039;&amp;#039; 0.1.7&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Release Date:&amp;#039;&amp;#039;&amp;#039; August 23, 2007 (10:39 pm EST)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Link:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-23/RAddon.uno.pkg&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Source Code:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-23/rcalc-0_1_7.zip&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Manual:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-23/manual.pdf&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
You need the following software to run this add-on. While older versions may suffice, they have not been tested yet.&lt;br /&gt;
* OpenOffice.org 2.1&lt;br /&gt;
* Java 5.0&lt;br /&gt;
* RServe 0.4.7&lt;br /&gt;
&lt;br /&gt;
==Installing==&lt;br /&gt;
&lt;br /&gt;
The current version is a prototype and implements only one tool: RDUMP. This method is accessed through the actual Calc menu, and allows you to see the R object structure for various method calls. &lt;br /&gt;
&lt;br /&gt;
To use the add-on, you need to install R and [http://www.rforge.net/Rserve Rserve]. Instructions for installing R can be found at http://www.r-project.org/ Once installed, run R and type the following to install Rserve. Click &amp;quot;enter&amp;quot; at the end of each bullet point:&lt;br /&gt;
&lt;br /&gt;
* install.packages(&amp;quot;Rserve&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Rserve needs to be running to work, and can be launched with the following commands... Note that you only need to do this when you want to use the R Add-on for Calc.&lt;br /&gt;
&lt;br /&gt;
* library(Rserve)&lt;br /&gt;
* Rserve()&lt;br /&gt;
&lt;br /&gt;
Now that you have the prerequisites installed, download the package RAddon.uno.pkg (linked above). Unzip the file, and let&amp;#039;s call the directory you unzipped it in &amp;lt;RA_DIR&amp;gt;. Now let &amp;lt;OO_HOME&amp;gt; be your OpenOffice.org installation directory. Open the command prompt or terminal window and go to &amp;lt;OO_HOME&amp;gt;/program/ and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg add &amp;lt;RA_DIR&amp;gt;/RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
If this is not your first time installing the add-in, you need to check if a previous version is also on the system. If it is, then you will not be able to install the new version. To do this, go to &amp;lt;OO HOME&amp;gt;/program and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg list&lt;br /&gt;
&lt;br /&gt;
This will show you the list of packages already installed, and you should be able to check if the add-is is there. Remember to look for &amp;quot;RAddon.uno.pkg&amp;quot;. You can also skip this step and try to uninstall RAddon.uno.pkg regardless -- this will not harm your OpenOffice.org installation in any way, even if RAddon.uno.pkg is abset. To do this, type:&lt;br /&gt;
&lt;br /&gt;
* unopkg remove RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
Finally, some operating systems require that you restart your OpenOffice.org installation (if you&amp;#039;re not sure, restart your computer) to be able to see the cell functions that come with this package.&lt;br /&gt;
&lt;br /&gt;
==Using==&lt;br /&gt;
&lt;br /&gt;
Using the add-on is very simple at this stage. To see the tool at work, open Calc. In the menus, go to R Add-on &amp;gt; Rdump(). A new dialog window will pop up. Type in an R script -- here are some examples:&lt;br /&gt;
&lt;br /&gt;
* rnorm(10)&lt;br /&gt;
* cor.test(c(1,2,3,4), c(1,2,2,3))&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Run&amp;quot;. A new sheet should appear. Close the dialog with &amp;quot;Close&amp;quot; and check the new sheet -- you should see various pieces of information on the sheet.&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
So far, the software has been tested on the following.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.5===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 7 running native Java&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP SP2 running running JDK 1.6.0_02 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.0===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 6 running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP running running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
==Known Issues==&lt;br /&gt;
&lt;br /&gt;
Yes, we already have some known issues! That&amp;#039;s OK, these are common issues and are not problematic with regards to the code:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #1 (&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Fixed in 0.1.1&amp;lt;/font&amp;gt;):&amp;#039;&amp;#039;&amp;#039; Strings and characters, when part of the R object model, do not get published in Rdump().&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #2:&amp;#039;&amp;#039;&amp;#039; RDUMP() does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #3:&amp;#039;&amp;#039;&amp;#039; Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
&lt;br /&gt;
==About==&lt;br /&gt;
&lt;br /&gt;
This add-on is the result of a Google [[Summer of Code 2007]] project. It was initially created by [[User:Wojciech|Wojciech Gryc]]. For information pertaining to the development of this add-on, see [http://www.11-55.org/ooblog/ Wojciech&amp;#039;s Blog].&lt;br /&gt;
&lt;br /&gt;
==Older Versions==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.6&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-08-19/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-19/rcalc-0_1_6.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.5&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-16/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-16/rcalc-0_1_5.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.4&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-10/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-10/rcalc-0_1_4.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.3&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-02/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-02/rcalc-0_1_3.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.2&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-06-01/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-06-01/rcalc-0_1_2.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.1&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-25/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-25/rcalc-0_1_1.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.0&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-15/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-15/rcalc-0.1.0.zip Source Code])&lt;br /&gt;
&lt;br /&gt;
[[Category:Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=43377</id>
		<title>R and Calc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=43377"/>
		<updated>2007-08-24T02:39:19Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;blockquote style=&amp;quot;background: white; border: 1px solid rgb(153, 153, 153); padding: 1em;&amp;quot;&amp;gt;This page is meant as a general overview and installation guide for the software. Please see [[R and Calc Documentation]] for more information on functions, scripting, and general usage.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;R and Calc&amp;quot; is an [[OpenOffice.org]] (OO.o) [[Calc]] add-on that allows you to use [http://www.r-project.org/ R] methods and functions. The software is currently in early development, though a &amp;#039;&amp;#039;&amp;#039;basic&amp;#039;&amp;#039;&amp;#039; working version does exist, and is available for download.&lt;br /&gt;
&lt;br /&gt;
We welcome any and all comments and name suggestions. Please send them to [[User:Wojciech|Wojciech Gryc]].&lt;br /&gt;
&lt;br /&gt;
For those who come here often, here is the latest version:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Version:&amp;#039;&amp;#039;&amp;#039; 0.1.6&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Release Date:&amp;#039;&amp;#039;&amp;#039; August 23, 2007 (10:39 pm EST)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Link:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-23/RAddon.uno.pkg&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Source Code:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-23/rcalc-0_1_7.zip&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Manual:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-23/manual.pdf&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
You need the following software to run this add-on. While older versions may suffice, they have not been tested yet.&lt;br /&gt;
* OpenOffice.org 2.1&lt;br /&gt;
* Java 5.0&lt;br /&gt;
* RServe 0.4.7&lt;br /&gt;
&lt;br /&gt;
==Installing==&lt;br /&gt;
&lt;br /&gt;
The current version is a prototype and implements only one tool: RDUMP. This method is accessed through the actual Calc menu, and allows you to see the R object structure for various method calls. &lt;br /&gt;
&lt;br /&gt;
To use the add-on, you need to install R and [http://www.rforge.net/Rserve Rserve]. Instructions for installing R can be found at http://www.r-project.org/ Once installed, run R and type the following to install Rserve. Click &amp;quot;enter&amp;quot; at the end of each bullet point:&lt;br /&gt;
&lt;br /&gt;
* install.packages(&amp;quot;Rserve&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Rserve needs to be running to work, and can be launched with the following commands... Note that you only need to do this when you want to use the R Add-on for Calc.&lt;br /&gt;
&lt;br /&gt;
* library(Rserve)&lt;br /&gt;
* Rserve()&lt;br /&gt;
&lt;br /&gt;
Now that you have the prerequisites installed, download the package RAddon.uno.pkg (linked above). Unzip the file, and let&amp;#039;s call the directory you unzipped it in &amp;lt;RA_DIR&amp;gt;. Now let &amp;lt;OO_HOME&amp;gt; be your OpenOffice.org installation directory. Open the command prompt or terminal window and go to &amp;lt;OO_HOME&amp;gt;/program/ and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg add &amp;lt;RA_DIR&amp;gt;/RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
If this is not your first time installing the add-in, you need to check if a previous version is also on the system. If it is, then you will not be able to install the new version. To do this, go to &amp;lt;OO HOME&amp;gt;/program and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg list&lt;br /&gt;
&lt;br /&gt;
This will show you the list of packages already installed, and you should be able to check if the add-is is there. Remember to look for &amp;quot;RAddon.uno.pkg&amp;quot;. You can also skip this step and try to uninstall RAddon.uno.pkg regardless -- this will not harm your OpenOffice.org installation in any way, even if RAddon.uno.pkg is abset. To do this, type:&lt;br /&gt;
&lt;br /&gt;
* unopkg remove RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
Finally, some operating systems require that you restart your OpenOffice.org installation (if you&amp;#039;re not sure, restart your computer) to be able to see the cell functions that come with this package.&lt;br /&gt;
&lt;br /&gt;
==Using==&lt;br /&gt;
&lt;br /&gt;
Using the add-on is very simple at this stage. To see the tool at work, open Calc. In the menus, go to R Add-on &amp;gt; Rdump(). A new dialog window will pop up. Type in an R script -- here are some examples:&lt;br /&gt;
&lt;br /&gt;
* rnorm(10)&lt;br /&gt;
* cor.test(c(1,2,3,4), c(1,2,2,3))&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Run&amp;quot;. A new sheet should appear. Close the dialog with &amp;quot;Close&amp;quot; and check the new sheet -- you should see various pieces of information on the sheet.&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
So far, the software has been tested on the following.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.5===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 7 running native Java&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP SP2 running running JDK 1.6.0_02 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.0===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 6 running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP running running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
==Known Issues==&lt;br /&gt;
&lt;br /&gt;
Yes, we already have some known issues! That&amp;#039;s OK, these are common issues and are not problematic with regards to the code:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #1 (&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Fixed in 0.1.1&amp;lt;/font&amp;gt;):&amp;#039;&amp;#039;&amp;#039; Strings and characters, when part of the R object model, do not get published in Rdump().&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #2:&amp;#039;&amp;#039;&amp;#039; RDUMP() does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #3:&amp;#039;&amp;#039;&amp;#039; Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
&lt;br /&gt;
==About==&lt;br /&gt;
&lt;br /&gt;
This add-on is the result of a Google [[Summer of Code 2007]] project. It was initially created by [[User:Wojciech|Wojciech Gryc]]. For information pertaining to the development of this add-on, see [http://www.11-55.org/ooblog/ Wojciech&amp;#039;s Blog].&lt;br /&gt;
&lt;br /&gt;
==Older Versions==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.6&amp;#039;&amp;#039; [http://www.11-55.org/rcalc/2007-08-19/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-19/rcalc-0_1_6.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.5&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-16/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-16/rcalc-0_1_5.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.4&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-10/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-10/rcalc-0_1_4.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.3&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-02/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-02/rcalc-0_1_3.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.2&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-06-01/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-06-01/rcalc-0_1_2.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.1&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-25/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-25/rcalc-0_1_1.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.0&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-15/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-15/rcalc-0.1.0.zip Source Code])&lt;br /&gt;
&lt;br /&gt;
[[Category:Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=43037</id>
		<title>R and Calc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=43037"/>
		<updated>2007-08-20T05:43:38Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: /* Older Versions */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;blockquote style=&amp;quot;background: white; border: 1px solid rgb(153, 153, 153); padding: 1em;&amp;quot;&amp;gt;This page is meant as a general overview and installation guide for the software. Please see [[R and Calc Documentation]] for more information on functions, scripting, and general usage.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;R and Calc&amp;quot; is an [[OpenOffice.org]] (OO.o) [[Calc]] add-on that allows you to use [http://www.r-project.org/ R] methods and functions. The software is currently in early development, though a &amp;#039;&amp;#039;&amp;#039;basic&amp;#039;&amp;#039;&amp;#039; working version does exist, and is available for download.&lt;br /&gt;
&lt;br /&gt;
We welcome any and all comments and name suggestions. Please send them to [[User:Wojciech|Wojciech Gryc]].&lt;br /&gt;
&lt;br /&gt;
For those who come here often, here is the latest version:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Version:&amp;#039;&amp;#039;&amp;#039; 0.1.6&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Release Date:&amp;#039;&amp;#039;&amp;#039; August 20, 2007 (1:38 am EST)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Link:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-19/RAddon.uno.pkg&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Source Code:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-19/rcalc-0_1_6.zip&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Manual:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-19/manual.pdf&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
You need the following software to run this add-on. While older versions may suffice, they have not been tested yet.&lt;br /&gt;
* OpenOffice.org 2.1&lt;br /&gt;
* Java 5.0&lt;br /&gt;
* RServe 0.4.7&lt;br /&gt;
&lt;br /&gt;
==Installing==&lt;br /&gt;
&lt;br /&gt;
The current version is a prototype and implements only one tool: RDUMP. This method is accessed through the actual Calc menu, and allows you to see the R object structure for various method calls. &lt;br /&gt;
&lt;br /&gt;
To use the add-on, you need to install R and [http://www.rforge.net/Rserve Rserve]. Instructions for installing R can be found at http://www.r-project.org/ Once installed, run R and type the following to install Rserve. Click &amp;quot;enter&amp;quot; at the end of each bullet point:&lt;br /&gt;
&lt;br /&gt;
* install.packages(&amp;quot;Rserve&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Rserve needs to be running to work, and can be launched with the following commands... Note that you only need to do this when you want to use the R Add-on for Calc.&lt;br /&gt;
&lt;br /&gt;
* library(Rserve)&lt;br /&gt;
* Rserve()&lt;br /&gt;
&lt;br /&gt;
Now that you have the prerequisites installed, download the package RAddon.uno.pkg (linked above). Unzip the file, and let&amp;#039;s call the directory you unzipped it in &amp;lt;RA_DIR&amp;gt;. Now let &amp;lt;OO_HOME&amp;gt; be your OpenOffice.org installation directory. Open the command prompt or terminal window and go to &amp;lt;OO_HOME&amp;gt;/program/ and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg add &amp;lt;RA_DIR&amp;gt;/RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
If this is not your first time installing the add-in, you need to check if a previous version is also on the system. If it is, then you will not be able to install the new version. To do this, go to &amp;lt;OO HOME&amp;gt;/program and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg list&lt;br /&gt;
&lt;br /&gt;
This will show you the list of packages already installed, and you should be able to check if the add-is is there. Remember to look for &amp;quot;RAddon.uno.pkg&amp;quot;. You can also skip this step and try to uninstall RAddon.uno.pkg regardless -- this will not harm your OpenOffice.org installation in any way, even if RAddon.uno.pkg is abset. To do this, type:&lt;br /&gt;
&lt;br /&gt;
* unopkg remove RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
Finally, some operating systems require that you restart your OpenOffice.org installation (if you&amp;#039;re not sure, restart your computer) to be able to see the cell functions that come with this package.&lt;br /&gt;
&lt;br /&gt;
==Using==&lt;br /&gt;
&lt;br /&gt;
Using the add-on is very simple at this stage. To see the tool at work, open Calc. In the menus, go to R Add-on &amp;gt; Rdump(). A new dialog window will pop up. Type in an R script -- here are some examples:&lt;br /&gt;
&lt;br /&gt;
* rnorm(10)&lt;br /&gt;
* cor.test(c(1,2,3,4), c(1,2,2,3))&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Run&amp;quot;. A new sheet should appear. Close the dialog with &amp;quot;Close&amp;quot; and check the new sheet -- you should see various pieces of information on the sheet.&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
So far, the software has been tested on the following.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.5===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 7 running native Java&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP SP2 running running JDK 1.6.0_02 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.0===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 6 running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP running running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
==Known Issues==&lt;br /&gt;
&lt;br /&gt;
Yes, we already have some known issues! That&amp;#039;s OK, these are common issues and are not problematic with regards to the code:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #1 (&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Fixed in 0.1.1&amp;lt;/font&amp;gt;):&amp;#039;&amp;#039;&amp;#039; Strings and characters, when part of the R object model, do not get published in Rdump().&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #2:&amp;#039;&amp;#039;&amp;#039; RDUMP() does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #3:&amp;#039;&amp;#039;&amp;#039; Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
&lt;br /&gt;
==About==&lt;br /&gt;
&lt;br /&gt;
This add-on is the result of a Google [[Summer of Code 2007]] project. It was initially created by [[User:Wojciech|Wojciech Gryc]]. For information pertaining to the development of this add-on, see [http://www.11-55.org/ooblog/ Wojciech&amp;#039;s Blog].&lt;br /&gt;
&lt;br /&gt;
==Older Versions==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.5&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-16/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-16/rcalc-0_1_5.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.4&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-10/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-10/rcalc-0_1_4.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.3&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-02/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-02/rcalc-0_1_3.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.2&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-06-01/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-06-01/rcalc-0_1_2.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.1&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-25/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-25/rcalc-0_1_1.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.0&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-15/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-15/rcalc-0.1.0.zip Source Code])&lt;br /&gt;
&lt;br /&gt;
[[Category:Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=43036</id>
		<title>R and Calc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=43036"/>
		<updated>2007-08-20T05:40:05Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;blockquote style=&amp;quot;background: white; border: 1px solid rgb(153, 153, 153); padding: 1em;&amp;quot;&amp;gt;This page is meant as a general overview and installation guide for the software. Please see [[R and Calc Documentation]] for more information on functions, scripting, and general usage.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;R and Calc&amp;quot; is an [[OpenOffice.org]] (OO.o) [[Calc]] add-on that allows you to use [http://www.r-project.org/ R] methods and functions. The software is currently in early development, though a &amp;#039;&amp;#039;&amp;#039;basic&amp;#039;&amp;#039;&amp;#039; working version does exist, and is available for download.&lt;br /&gt;
&lt;br /&gt;
We welcome any and all comments and name suggestions. Please send them to [[User:Wojciech|Wojciech Gryc]].&lt;br /&gt;
&lt;br /&gt;
For those who come here often, here is the latest version:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Version:&amp;#039;&amp;#039;&amp;#039; 0.1.6&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Release Date:&amp;#039;&amp;#039;&amp;#039; August 20, 2007 (1:38 am EST)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Link:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-19/RAddon.uno.pkg&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Source Code:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-19/rcalc-0_1_6.zip&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Manual:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-19/manual.pdf&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
You need the following software to run this add-on. While older versions may suffice, they have not been tested yet.&lt;br /&gt;
* OpenOffice.org 2.1&lt;br /&gt;
* Java 5.0&lt;br /&gt;
* RServe 0.4.7&lt;br /&gt;
&lt;br /&gt;
==Installing==&lt;br /&gt;
&lt;br /&gt;
The current version is a prototype and implements only one tool: RDUMP. This method is accessed through the actual Calc menu, and allows you to see the R object structure for various method calls. &lt;br /&gt;
&lt;br /&gt;
To use the add-on, you need to install R and [http://www.rforge.net/Rserve Rserve]. Instructions for installing R can be found at http://www.r-project.org/ Once installed, run R and type the following to install Rserve. Click &amp;quot;enter&amp;quot; at the end of each bullet point:&lt;br /&gt;
&lt;br /&gt;
* install.packages(&amp;quot;Rserve&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Rserve needs to be running to work, and can be launched with the following commands... Note that you only need to do this when you want to use the R Add-on for Calc.&lt;br /&gt;
&lt;br /&gt;
* library(Rserve)&lt;br /&gt;
* Rserve()&lt;br /&gt;
&lt;br /&gt;
Now that you have the prerequisites installed, download the package RAddon.uno.pkg (linked above). Unzip the file, and let&amp;#039;s call the directory you unzipped it in &amp;lt;RA_DIR&amp;gt;. Now let &amp;lt;OO_HOME&amp;gt; be your OpenOffice.org installation directory. Open the command prompt or terminal window and go to &amp;lt;OO_HOME&amp;gt;/program/ and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg add &amp;lt;RA_DIR&amp;gt;/RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
If this is not your first time installing the add-in, you need to check if a previous version is also on the system. If it is, then you will not be able to install the new version. To do this, go to &amp;lt;OO HOME&amp;gt;/program and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg list&lt;br /&gt;
&lt;br /&gt;
This will show you the list of packages already installed, and you should be able to check if the add-is is there. Remember to look for &amp;quot;RAddon.uno.pkg&amp;quot;. You can also skip this step and try to uninstall RAddon.uno.pkg regardless -- this will not harm your OpenOffice.org installation in any way, even if RAddon.uno.pkg is abset. To do this, type:&lt;br /&gt;
&lt;br /&gt;
* unopkg remove RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
Finally, some operating systems require that you restart your OpenOffice.org installation (if you&amp;#039;re not sure, restart your computer) to be able to see the cell functions that come with this package.&lt;br /&gt;
&lt;br /&gt;
==Using==&lt;br /&gt;
&lt;br /&gt;
Using the add-on is very simple at this stage. To see the tool at work, open Calc. In the menus, go to R Add-on &amp;gt; Rdump(). A new dialog window will pop up. Type in an R script -- here are some examples:&lt;br /&gt;
&lt;br /&gt;
* rnorm(10)&lt;br /&gt;
* cor.test(c(1,2,3,4), c(1,2,2,3))&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Run&amp;quot;. A new sheet should appear. Close the dialog with &amp;quot;Close&amp;quot; and check the new sheet -- you should see various pieces of information on the sheet.&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
So far, the software has been tested on the following.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.5===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 7 running native Java&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP SP2 running running JDK 1.6.0_02 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.0===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 6 running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP running running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
==Known Issues==&lt;br /&gt;
&lt;br /&gt;
Yes, we already have some known issues! That&amp;#039;s OK, these are common issues and are not problematic with regards to the code:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #1 (&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Fixed in 0.1.1&amp;lt;/font&amp;gt;):&amp;#039;&amp;#039;&amp;#039; Strings and characters, when part of the R object model, do not get published in Rdump().&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #2:&amp;#039;&amp;#039;&amp;#039; RDUMP() does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #3:&amp;#039;&amp;#039;&amp;#039; Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
&lt;br /&gt;
==About==&lt;br /&gt;
&lt;br /&gt;
This add-on is the result of a Google [[Summer of Code 2007]] project. It was initially created by [[User:Wojciech|Wojciech Gryc]]. For information pertaining to the development of this add-on, see [http://www.11-55.org/ooblog/ Wojciech&amp;#039;s Blog].&lt;br /&gt;
&lt;br /&gt;
==Older Versions==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.5&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-16/RAddon.uno.pkg UNO Package ([http://www.11-55.org/rcalc/2007-08-16/rcalc-0_1_5.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.4&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-10/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-10/rcalc-0_1_4.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.3&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-02/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-02/rcalc-0_1_3.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.2&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-06-01/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-06-01/rcalc-0_1_2.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.1&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-25/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-25/rcalc-0_1_1.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.0&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-15/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-15/rcalc-0.1.0.zip Source Code])&lt;br /&gt;
&lt;br /&gt;
[[Category:Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=42995</id>
		<title>R and Calc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=42995"/>
		<updated>2007-08-19T01:37:22Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: /* Testing */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;blockquote style=&amp;quot;background: white; border: 1px solid rgb(153, 153, 153); padding: 1em;&amp;quot;&amp;gt;This page is meant as a general overview and installation guide for the software. Please see [[R and Calc Documentation]] for more information on functions, scripting, and general usage.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;R and Calc&amp;quot; is an [[OpenOffice.org]] (OO.o) [[Calc]] add-on that allows you to use [http://www.r-project.org/ R] methods and functions. The software is currently in early development, though a &amp;#039;&amp;#039;&amp;#039;basic&amp;#039;&amp;#039;&amp;#039; working version does exist, and is available for download.&lt;br /&gt;
&lt;br /&gt;
We welcome any and all comments and name suggestions. Please send them to [[User:Wojciech|Wojciech Gryc]].&lt;br /&gt;
&lt;br /&gt;
For those who come here often, here is the latest version:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Version:&amp;#039;&amp;#039;&amp;#039; 0.1.5&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Release Date:&amp;#039;&amp;#039;&amp;#039; August 16, 2007 (10:51 pm EST)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Link:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-16/RAddon.uno.pkg&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Source Code:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-16/rcalc-0_1_5.zip&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Manual:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-16/manual.pdf&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
You need the following software to run this add-on. While older versions may suffice, they have not been tested yet.&lt;br /&gt;
* OpenOffice.org 2.1&lt;br /&gt;
* Java 5.0&lt;br /&gt;
* RServe 0.4.7&lt;br /&gt;
&lt;br /&gt;
==Installing==&lt;br /&gt;
&lt;br /&gt;
The current version is a prototype and implements only one tool: RDUMP. This method is accessed through the actual Calc menu, and allows you to see the R object structure for various method calls. &lt;br /&gt;
&lt;br /&gt;
To use the add-on, you need to install R and [http://www.rforge.net/Rserve Rserve]. Instructions for installing R can be found at http://www.r-project.org/ Once installed, run R and type the following to install Rserve. Click &amp;quot;enter&amp;quot; at the end of each bullet point:&lt;br /&gt;
&lt;br /&gt;
* install.packages(&amp;quot;Rserve&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Rserve needs to be running to work, and can be launched with the following commands... Note that you only need to do this when you want to use the R Add-on for Calc.&lt;br /&gt;
&lt;br /&gt;
* library(Rserve)&lt;br /&gt;
* Rserve()&lt;br /&gt;
&lt;br /&gt;
Now that you have the prerequisites installed, download the package RAddon.uno.pkg (linked above). Unzip the file, and let&amp;#039;s call the directory you unzipped it in &amp;lt;RA_DIR&amp;gt;. Now let &amp;lt;OO_HOME&amp;gt; be your OpenOffice.org installation directory. Open the command prompt or terminal window and go to &amp;lt;OO_HOME&amp;gt;/program/ and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg add &amp;lt;RA_DIR&amp;gt;/RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
If this is not your first time installing the add-in, you need to check if a previous version is also on the system. If it is, then you will not be able to install the new version. To do this, go to &amp;lt;OO HOME&amp;gt;/program and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg list&lt;br /&gt;
&lt;br /&gt;
This will show you the list of packages already installed, and you should be able to check if the add-is is there. Remember to look for &amp;quot;RAddon.uno.pkg&amp;quot;. You can also skip this step and try to uninstall RAddon.uno.pkg regardless -- this will not harm your OpenOffice.org installation in any way, even if RAddon.uno.pkg is abset. To do this, type:&lt;br /&gt;
&lt;br /&gt;
* unopkg remove RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
Finally, some operating systems require that you restart your OpenOffice.org installation (if you&amp;#039;re not sure, restart your computer) to be able to see the cell functions that come with this package.&lt;br /&gt;
&lt;br /&gt;
==Using==&lt;br /&gt;
&lt;br /&gt;
Using the add-on is very simple at this stage. To see the tool at work, open Calc. In the menus, go to R Add-on &amp;gt; Rdump(). A new dialog window will pop up. Type in an R script -- here are some examples:&lt;br /&gt;
&lt;br /&gt;
* rnorm(10)&lt;br /&gt;
* cor.test(c(1,2,3,4), c(1,2,2,3))&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Run&amp;quot;. A new sheet should appear. Close the dialog with &amp;quot;Close&amp;quot; and check the new sheet -- you should see various pieces of information on the sheet.&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
So far, the software has been tested on the following.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.5===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 7 running native Java&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP SP2 running running JDK 1.6.0_02 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.0===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 6 running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP running running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
==Known Issues==&lt;br /&gt;
&lt;br /&gt;
Yes, we already have some known issues! That&amp;#039;s OK, these are common issues and are not problematic with regards to the code:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #1 (&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Fixed in 0.1.1&amp;lt;/font&amp;gt;):&amp;#039;&amp;#039;&amp;#039; Strings and characters, when part of the R object model, do not get published in Rdump().&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #2:&amp;#039;&amp;#039;&amp;#039; RDUMP() does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #3:&amp;#039;&amp;#039;&amp;#039; Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
&lt;br /&gt;
==About==&lt;br /&gt;
&lt;br /&gt;
This add-on is the result of a Google [[Summer of Code 2007]] project. It was initially created by [[User:Wojciech|Wojciech Gryc]]. For information pertaining to the development of this add-on, see [http://www.11-55.org/ooblog/ Wojciech&amp;#039;s Blog].&lt;br /&gt;
&lt;br /&gt;
==Older Versions==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.4&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-10/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-10/rcalc-0_1_4.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.3&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-02/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-02/rcalc-0_1_3.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.2&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-06-01/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-06-01/rcalc-0_1_2.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.1&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-25/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-25/rcalc-0_1_1.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.0&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-15/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-15/rcalc-0.1.0.zip Source Code])&lt;br /&gt;
&lt;br /&gt;
[[Category:Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=42720</id>
		<title>R and Calc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=42720"/>
		<updated>2007-08-17T02:52:54Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;blockquote style=&amp;quot;background: white; border: 1px solid rgb(153, 153, 153); padding: 1em;&amp;quot;&amp;gt;This page is meant as a general overview and installation guide for the software. Please see [[R and Calc Documentation]] for more information on functions, scripting, and general usage.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;R and Calc&amp;quot; is an [[OpenOffice.org]] (OO.o) [[Calc]] add-on that allows you to use [http://www.r-project.org/ R] methods and functions. The software is currently in early development, though a &amp;#039;&amp;#039;&amp;#039;basic&amp;#039;&amp;#039;&amp;#039; working version does exist, and is available for download.&lt;br /&gt;
&lt;br /&gt;
We welcome any and all comments and name suggestions. Please send them to [[User:Wojciech|Wojciech Gryc]].&lt;br /&gt;
&lt;br /&gt;
For those who come here often, here is the latest version:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Version:&amp;#039;&amp;#039;&amp;#039; 0.1.5&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Release Date:&amp;#039;&amp;#039;&amp;#039; August 16, 2007 (10:51 pm EST)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Link:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-16/RAddon.uno.pkg&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Source Code:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-16/rcalc-0_1_5.zip&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Manual:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-16/manual.pdf&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
You need the following software to run this add-on. While older versions may suffice, they have not been tested yet.&lt;br /&gt;
* OpenOffice.org 2.1&lt;br /&gt;
* Java 5.0&lt;br /&gt;
* RServe 0.4.7&lt;br /&gt;
&lt;br /&gt;
==Installing==&lt;br /&gt;
&lt;br /&gt;
The current version is a prototype and implements only one tool: RDUMP. This method is accessed through the actual Calc menu, and allows you to see the R object structure for various method calls. &lt;br /&gt;
&lt;br /&gt;
To use the add-on, you need to install R and [http://www.rforge.net/Rserve Rserve]. Instructions for installing R can be found at http://www.r-project.org/ Once installed, run R and type the following to install Rserve. Click &amp;quot;enter&amp;quot; at the end of each bullet point:&lt;br /&gt;
&lt;br /&gt;
* install.packages(&amp;quot;Rserve&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Rserve needs to be running to work, and can be launched with the following commands... Note that you only need to do this when you want to use the R Add-on for Calc.&lt;br /&gt;
&lt;br /&gt;
* library(Rserve)&lt;br /&gt;
* Rserve()&lt;br /&gt;
&lt;br /&gt;
Now that you have the prerequisites installed, download the package RAddon.uno.pkg (linked above). Unzip the file, and let&amp;#039;s call the directory you unzipped it in &amp;lt;RA_DIR&amp;gt;. Now let &amp;lt;OO_HOME&amp;gt; be your OpenOffice.org installation directory. Open the command prompt or terminal window and go to &amp;lt;OO_HOME&amp;gt;/program/ and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg add &amp;lt;RA_DIR&amp;gt;/RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
If this is not your first time installing the add-in, you need to check if a previous version is also on the system. If it is, then you will not be able to install the new version. To do this, go to &amp;lt;OO HOME&amp;gt;/program and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg list&lt;br /&gt;
&lt;br /&gt;
This will show you the list of packages already installed, and you should be able to check if the add-is is there. Remember to look for &amp;quot;RAddon.uno.pkg&amp;quot;. You can also skip this step and try to uninstall RAddon.uno.pkg regardless -- this will not harm your OpenOffice.org installation in any way, even if RAddon.uno.pkg is abset. To do this, type:&lt;br /&gt;
&lt;br /&gt;
* unopkg remove RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
Finally, some operating systems require that you restart your OpenOffice.org installation (if you&amp;#039;re not sure, restart your computer) to be able to see the cell functions that come with this package.&lt;br /&gt;
&lt;br /&gt;
==Using==&lt;br /&gt;
&lt;br /&gt;
Using the add-on is very simple at this stage. To see the tool at work, open Calc. In the menus, go to R Add-on &amp;gt; Rdump(). A new dialog window will pop up. Type in an R script -- here are some examples:&lt;br /&gt;
&lt;br /&gt;
* rnorm(10)&lt;br /&gt;
* cor.test(c(1,2,3,4), c(1,2,2,3))&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Run&amp;quot;. A new sheet should appear. Close the dialog with &amp;quot;Close&amp;quot; and check the new sheet -- you should see various pieces of information on the sheet.&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
So far, the software has been tested on the following.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.0===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 6 running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP running running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
==Known Issues==&lt;br /&gt;
&lt;br /&gt;
Yes, we already have some known issues! That&amp;#039;s OK, these are common issues and are not problematic with regards to the code:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #1 (&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Fixed in 0.1.1&amp;lt;/font&amp;gt;):&amp;#039;&amp;#039;&amp;#039; Strings and characters, when part of the R object model, do not get published in Rdump().&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #2:&amp;#039;&amp;#039;&amp;#039; RDUMP() does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #3:&amp;#039;&amp;#039;&amp;#039; Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
&lt;br /&gt;
==About==&lt;br /&gt;
&lt;br /&gt;
This add-on is the result of a Google [[Summer of Code 2007]] project. It was initially created by [[User:Wojciech|Wojciech Gryc]]. For information pertaining to the development of this add-on, see [http://www.11-55.org/ooblog/ Wojciech&amp;#039;s Blog].&lt;br /&gt;
&lt;br /&gt;
==Older Versions==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.4&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-10/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-10/rcalc-0_1_4.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.3&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-02/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-02/rcalc-0_1_3.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.2&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-06-01/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-06-01/rcalc-0_1_2.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.1&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-25/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-25/rcalc-0_1_1.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.0&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-15/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-15/rcalc-0.1.0.zip Source Code])&lt;br /&gt;
&lt;br /&gt;
[[Category:Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=42719</id>
		<title>R and Calc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=42719"/>
		<updated>2007-08-17T02:51:59Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;blockquote style=&amp;quot;background: white; border: 1px solid rgb(153, 153, 153); padding: 1em;&amp;quot;&amp;gt;This page is meant as a general overview and installation guide for the software. Please see [[R and Calc Documentation]] for more information on functions, scripting, and general usage.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;R and Calc&amp;quot; is an [[OpenOffice.org]] (OO.o) [[Calc]] add-on that allows you to use [http://www.r-project.org/ R] methods and functions. The software is currently in early development, though a &amp;#039;&amp;#039;&amp;#039;basic&amp;#039;&amp;#039;&amp;#039; working version does exist, and is available for download.&lt;br /&gt;
&lt;br /&gt;
We welcome any and all comments and name suggestions. Please send them to [[User:Wojciech|Wojciech Gryc]].&lt;br /&gt;
&lt;br /&gt;
For those who come here often, here is the latest version:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Version:&amp;#039;&amp;#039;&amp;#039; 0.1.5&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Release Date:&amp;#039;&amp;#039;&amp;#039; August 16, 2007 (10:51 pm EST)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Link:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-16/RAddon.uno.pkg&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Source Code:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-16/rcalc-0_1_4.zip&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Manual:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-16/manual.pdf&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
You need the following software to run this add-on. While older versions may suffice, they have not been tested yet.&lt;br /&gt;
* OpenOffice.org 2.1&lt;br /&gt;
* Java 5.0&lt;br /&gt;
* RServe 0.4.7&lt;br /&gt;
&lt;br /&gt;
==Installing==&lt;br /&gt;
&lt;br /&gt;
The current version is a prototype and implements only one tool: RDUMP. This method is accessed through the actual Calc menu, and allows you to see the R object structure for various method calls. &lt;br /&gt;
&lt;br /&gt;
To use the add-on, you need to install R and [http://www.rforge.net/Rserve Rserve]. Instructions for installing R can be found at http://www.r-project.org/ Once installed, run R and type the following to install Rserve. Click &amp;quot;enter&amp;quot; at the end of each bullet point:&lt;br /&gt;
&lt;br /&gt;
* install.packages(&amp;quot;Rserve&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Rserve needs to be running to work, and can be launched with the following commands... Note that you only need to do this when you want to use the R Add-on for Calc.&lt;br /&gt;
&lt;br /&gt;
* library(Rserve)&lt;br /&gt;
* Rserve()&lt;br /&gt;
&lt;br /&gt;
Now that you have the prerequisites installed, download the package RAddon.uno.pkg (linked above). Unzip the file, and let&amp;#039;s call the directory you unzipped it in &amp;lt;RA_DIR&amp;gt;. Now let &amp;lt;OO_HOME&amp;gt; be your OpenOffice.org installation directory. Open the command prompt or terminal window and go to &amp;lt;OO_HOME&amp;gt;/program/ and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg add &amp;lt;RA_DIR&amp;gt;/RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
If this is not your first time installing the add-in, you need to check if a previous version is also on the system. If it is, then you will not be able to install the new version. To do this, go to &amp;lt;OO HOME&amp;gt;/program and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg list&lt;br /&gt;
&lt;br /&gt;
This will show you the list of packages already installed, and you should be able to check if the add-is is there. Remember to look for &amp;quot;RAddon.uno.pkg&amp;quot;. You can also skip this step and try to uninstall RAddon.uno.pkg regardless -- this will not harm your OpenOffice.org installation in any way, even if RAddon.uno.pkg is abset. To do this, type:&lt;br /&gt;
&lt;br /&gt;
* unopkg remove RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
Finally, some operating systems require that you restart your OpenOffice.org installation (if you&amp;#039;re not sure, restart your computer) to be able to see the cell functions that come with this package.&lt;br /&gt;
&lt;br /&gt;
==Using==&lt;br /&gt;
&lt;br /&gt;
Using the add-on is very simple at this stage. To see the tool at work, open Calc. In the menus, go to R Add-on &amp;gt; Rdump(). A new dialog window will pop up. Type in an R script -- here are some examples:&lt;br /&gt;
&lt;br /&gt;
* rnorm(10)&lt;br /&gt;
* cor.test(c(1,2,3,4), c(1,2,2,3))&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Run&amp;quot;. A new sheet should appear. Close the dialog with &amp;quot;Close&amp;quot; and check the new sheet -- you should see various pieces of information on the sheet.&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
So far, the software has been tested on the following.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.0===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 6 running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP running running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
==Known Issues==&lt;br /&gt;
&lt;br /&gt;
Yes, we already have some known issues! That&amp;#039;s OK, these are common issues and are not problematic with regards to the code:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #1 (&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Fixed in 0.1.1&amp;lt;/font&amp;gt;):&amp;#039;&amp;#039;&amp;#039; Strings and characters, when part of the R object model, do not get published in Rdump().&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #2:&amp;#039;&amp;#039;&amp;#039; RDUMP() does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #3:&amp;#039;&amp;#039;&amp;#039; Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
&lt;br /&gt;
==About==&lt;br /&gt;
&lt;br /&gt;
This add-on is the result of a Google [[Summer of Code 2007]] project. It was initially created by [[User:Wojciech|Wojciech Gryc]]. For information pertaining to the development of this add-on, see [http://www.11-55.org/ooblog/ Wojciech&amp;#039;s Blog].&lt;br /&gt;
&lt;br /&gt;
==Older Versions==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.4&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-10/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-10/rcalc-0_1_4.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.3&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-02/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-02/rcalc-0_1_3.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.2&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-06-01/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-06-01/rcalc-0_1_2.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.1&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-25/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-25/rcalc-0_1_1.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.0&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-15/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-15/rcalc-0.1.0.zip Source Code])&lt;br /&gt;
&lt;br /&gt;
[[Category:Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Calc/API/Programming&amp;diff=42531</id>
		<title>Calc/API/Programming</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Calc/API/Programming&amp;diff=42531"/>
		<updated>2007-08-16T03:13:02Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: /* Embedding Images */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
To avoid to search in the previous code where we insert the new listings given in this chapter, we first give it again (only the main() part) :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 1 Again our starting main Code&lt;br /&gt;
int main( ) {&lt;br /&gt;
//retrieve an instance of the remote service manager&lt;br /&gt;
    Reference&amp;lt; XMultiServiceFactory &amp;gt; rOfficeServiceManager;&lt;br /&gt;
    rOfficeServiceManager = ooConnect();&lt;br /&gt;
    if( rOfficeServiceManager.is() ){&lt;br /&gt;
        printf( &amp;quot;Connected sucessfully to the office\n&amp;quot; );&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
//get the desktop service using createInstance returns an XInterface type&lt;br /&gt;
    Reference&amp;lt; XInterface  &amp;gt; Desktop = rOfficeServiceManager-&amp;gt;createInstance(&lt;br /&gt;
    OUString::createFromAscii( &amp;quot;com.sun.star.frame.Desktop&amp;quot; ));&lt;br /&gt;
&lt;br /&gt;
//query for the XComponentLoader interface&lt;br /&gt;
    Reference&amp;lt; XComponentLoader &amp;gt; rComponentLoader (Desktop, UNO_QUERY);&lt;br /&gt;
    if( rComponentLoader.is() ){&lt;br /&gt;
        	printf( &amp;quot;XComponentloader successfully instanciated\n&amp;quot; );&lt;br /&gt;
    	}&lt;br /&gt;
&lt;br /&gt;
//get an instance of the spreadsheet&lt;br /&gt;
    Reference&amp;lt; XComponent &amp;gt; xcomponent = rComponentLoader-&amp;gt;loadComponentFromURL(&lt;br /&gt;
	OUString::createFromAscii(&amp;quot;private:factory/scalc&amp;quot;),&lt;br /&gt;
        OUString::createFromAscii(&amp;quot;_blank&amp;quot;),&lt;br /&gt;
        0,&lt;br /&gt;
        Sequence &amp;lt; ::com::sun::star::beans::PropertyValue &amp;gt;());&lt;br /&gt;
// add code here&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Remember each time you query for an interface you have to add code lines (if they don&amp;#039;t exist) in the source code and a line in the makefile. I will generally add comments to prevent omissions. You can find more explanations [[IDL_Files_and_Cpp#IDL__and_C.2B.2B|here]] (if you are not a beginner).&lt;br /&gt;
&lt;br /&gt;
=To find the Sheet=&lt;br /&gt;
The most important interface for this chapter is XspreadsheetDocument. This interface supply the getSheets() method. This interface is inherited from XInterface which provide queries for a new interface to an existing UNO object : queryInterface.&lt;br /&gt;
&lt;br /&gt;
==An existing Sheet==&lt;br /&gt;
If you know the sheet&amp;#039;s name use the getByName method :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 2 How to find a Sheet in a Spreadsheet&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
//query for a XSpreadsheetDocument interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY); &lt;br /&gt;
&lt;br /&gt;
//use it to get the XSpreadsheets interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets(); &lt;br /&gt;
&lt;br /&gt;
//use getByName to get a reference (type Any) &lt;br /&gt;
	Any rSheet = rSheets-&amp;gt;getByName( OUString::createFromAscii(&amp;quot;Sheet2&amp;quot;));&lt;br /&gt;
&amp;lt;/code&amp;gt; &lt;br /&gt;
If we have a look at getByName method, we can see it can manage an  “no such element” exception. The the previous code would be better written with a try and catch statement. &lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
Listing 3 Finding a Sheet and managing Exception&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
//query for a XSpreadsheetDocument interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY); &lt;br /&gt;
&lt;br /&gt;
//use it to get the XSpreadsheets interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets(); &lt;br /&gt;
&lt;br /&gt;
//use getByName to get a reference (type Any)&lt;br /&gt;
	try { &lt;br /&gt;
		Any rSheet = rSheets-&amp;gt;getByName( OUString::createFromAscii(&amp;quot;Sheet2&amp;quot;)); &lt;br /&gt;
	}&lt;br /&gt;
	catch( Exception &amp;amp;e ){&lt;br /&gt;
      OString o = OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US );&lt;br /&gt;
      printf( &amp;quot;Error: No such element ;%s\n&amp;quot;, o.pData-&amp;gt;buffer );&lt;br /&gt;
   }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For sake of simplicity we will only use this exception managing only at the end of this document, when “helpers” will be tackled in ([[Constructing_Helpers|Constructing Helpers]]). &lt;br /&gt;
If you only know the sheet&amp;#039;s number you can retrieve the sheet using this way :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 4 Finding a Sheet with an Index&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::container;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/container/XIndexAccess.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.container.XIndexAccess \&amp;quot; in the makefile&lt;br /&gt;
//query for a XSpreadsheetDocument interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY); &lt;br /&gt;
&lt;br /&gt;
//use it to get the XSpreadsheets interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets();&lt;br /&gt;
&lt;br /&gt;
// query for the ::com::sun::star::container::XIndexAccess service&lt;br /&gt;
    Reference&amp;lt; XIndexAccess &amp;gt; rSheetsByIndex (rSheets, UNO_QUERY);  &lt;br /&gt;
&lt;br /&gt;
//use getByName to get a reference (type Any) &lt;br /&gt;
	Any rSheet = rSheetsByIndex-&amp;gt;getByIndex( (short)1 ); &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
As you can see we have to query a new service XIndexAccess. This means adding two lines in the code and one in the makefile as seen in C++ comments.&lt;br /&gt;
Take care : UNO considers the sheet numbering, starting from 0, and then 1 is the second sheet.&lt;br /&gt;
&lt;br /&gt;
==Create, rename, copy and delete a Sheet==&lt;br /&gt;
To create a sheet the method insertNewByName is used :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 5 Create a Sheet&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
//query for a XSpreadsheetDocument interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY); &lt;br /&gt;
&lt;br /&gt;
//use it to get the XSpreadsheets interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets(); &lt;br /&gt;
&lt;br /&gt;
//use it to create a new sheet called MySheet &lt;br /&gt;
	rSheets-&amp;gt;insertNewByName(OUString::createFromAscii(&amp;quot;MySheet&amp;quot;), (short)0);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
(short)0 is the index of position where the new sheet is inserted. Here “MySheet” will be the first sheet.&lt;br /&gt;
&lt;br /&gt;
How to move a sheet when its name is known:&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 6 Moving a Sheet&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
//query for a XSpreadsheetDocument interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY); &lt;br /&gt;
&lt;br /&gt;
//use it to get the XSpreadsheets interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets(); &lt;br /&gt;
&lt;br /&gt;
//use it to move a sheet called MySheet in third(back)/second(forward) position  &lt;br /&gt;
	rSheets-&amp;gt;moveByName(OUString::createFromAscii(&amp;quot;MySheet&amp;quot;), (short)2);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
How to copy a sheet &lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 7 Copying a Sheet&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
//query for a XSpreadsheetDocument interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY); &lt;br /&gt;
&lt;br /&gt;
//use it to get the XSpreadsheets interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets(); &lt;br /&gt;
&lt;br /&gt;
//use it to copy a sheet called MySheet in second position with the name &amp;quot;MySheet2&amp;quot; &lt;br /&gt;
	rSheets-&amp;gt;copyByName(OUString::createFromAscii(&amp;quot;MySheet&amp;quot;),&lt;br /&gt;
                                 OUString::createFromAscii(&amp;quot;MySheet2&amp;quot;), (short)1);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
MySheet2 is an exact copy of &amp;quot;MySheet&amp;quot; inserted as a second sheet.&lt;br /&gt;
How to rename a sheet : &lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 8 Renaming a Sheet&lt;br /&gt;
//C++ &lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::container;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/container/XNamed.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.container.XNamed \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
//query for a XSpreadsheetDocument interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY); &lt;br /&gt;
&lt;br /&gt;
//use it to get the XSpreadsheets interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets(); &lt;br /&gt;
&lt;br /&gt;
//use getByName to get a reference (type Any) &lt;br /&gt;
	Any rSheet = rSheets-&amp;gt;getByName( OUString::createFromAscii(&amp;quot;Sheet2&amp;quot;)); &lt;br /&gt;
&lt;br /&gt;
// query for XNamed Interface&lt;br /&gt;
	Reference&amp;lt; XNamed &amp;gt; rname (rSheet, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
// rename&lt;br /&gt;
	rname-&amp;gt;setName(OUString::createFromAscii(&amp;quot;MySheet&amp;quot;)); &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
How to remove a sheet :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 9  Removing a Sheet&lt;br /&gt;
// C++&lt;br /&gt;
	rSheets-&amp;gt;removeByName(OUString::createFromAscii(&amp;quot;Sheet1&amp;quot;)); &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
works properly. You can use also the XnameContainer interface like :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 10 Removing a Sheet (an other way)&lt;br /&gt;
// C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::container;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/container/XNameContainer.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.container.xNameContainer \&amp;quot; in the makefile&lt;br /&gt;
	Reference&amp;lt;XNameContainer&amp;gt; xNameContainer (rSheets, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
	xNameContainer-&amp;gt;removeByName(OUString::createFromAscii(&amp;quot;Sheet1&amp;quot;)); //OK&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Retrieve or change the currently focused Sheet==&lt;br /&gt;
&lt;br /&gt;
How to set a known-named sheet as currently focused sheet :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 11 Focus and C++ programming&lt;br /&gt;
//C++ &lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::frame;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/frame/XModel.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.frame.XModel \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetView.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetView \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheet.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheet \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
//query for a XSpreadsheetDocument interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY); &lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets(); &lt;br /&gt;
	&lt;br /&gt;
//use getByName to get a reference (type Any) &lt;br /&gt;
	Any rSheet = rSheets-&amp;gt;getByName( OUString::createFromAscii(&amp;quot;Sheet2&amp;quot;)); &lt;br /&gt;
// we want to make our new sheet the current sheet, so we need to ask the model &lt;br /&gt;
// for the controller: first query the XModel interface from our spreadsheet component &lt;br /&gt;
&lt;br /&gt;
//query for the XSpreadsheet interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheet &amp;gt; rSpSheet (rSheet, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
	Reference&amp;lt; XModel &amp;gt; rSpreadsheetModel (rSheetDoc, UNO_QUERY); &lt;br /&gt;
&lt;br /&gt;
// then get the current controller from the model &lt;br /&gt;
	Reference&amp;lt; XController &amp;gt; rSpreadsheetController = rSpreadsheetModel-&amp;gt;getCurrentController(); &lt;br /&gt;
 &lt;br /&gt;
// get the XSpreadsheetView interface from the controller, we want to call its method &lt;br /&gt;
// setActiveSheet &lt;br /&gt;
	Reference&amp;lt; XSpreadsheetView &amp;gt; rSpreadsheetView (rSpreadsheetController, UNO_QUERY); &lt;br /&gt;
 &lt;br /&gt;
// make our newly inserted sheet the active sheet using setActiveSheet &lt;br /&gt;
	rSpreadsheetView-&amp;gt;setActiveSheet(rSpSheet); &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
How to retrieve the currently focused sheet ? This problem is in fact a little variation of the previous one but the test is not so straightforward. If a new spreadsheet is created as previously we have no chance to choose ourself a sheet with focus because the program take always the same default sheet when just created. Then before resolving this problem we have to modify the loadComponentFromURL as previously done (&lt;br /&gt;
[[ UNO_automation_with_a_binary_%28executable%29#The_default_opened_Document|default opened document]])&lt;br /&gt;
Here is a piece of code which retrieves the sheet under focus. &lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 12 Retrieve the Sheet under Focus&lt;br /&gt;
//C++&lt;br /&gt;
int main( ) {&lt;br /&gt;
//retrieve an instance of the remote service manager&lt;br /&gt;
    Reference&amp;lt; XMultiServiceFactory &amp;gt; rOfficeServiceManager;&lt;br /&gt;
    rOfficeServiceManager = ooConnect();&lt;br /&gt;
    if( rOfficeServiceManager.is() ){&lt;br /&gt;
        printf( &amp;quot;Connected sucessfully to the office\n&amp;quot; );&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
//get the desktop service using createInstance returns an XInterface type&lt;br /&gt;
    Reference&amp;lt; XInterface  &amp;gt; Desktop = rOfficeServiceManager-&amp;gt;createInstance(&lt;br /&gt;
    OUString::createFromAscii( &amp;quot;com.sun.star.frame.Desktop&amp;quot; ));&lt;br /&gt;
// Don&amp;#039;t forget the #include &amp;lt;com/sun/star/frame/XDesktop.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add com.sun.star.frame.XDesktop \ in the makefile&lt;br /&gt;
//query the XDesktop Interface&lt;br /&gt;
	Reference&amp;lt; XDesktop &amp;gt; xDesktop (Desktop, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
	Reference&amp;lt; XComponent &amp;gt; xcomponent = xDesktop-&amp;gt;getCurrentComponent();&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
//query for a XSpreadsheetDocument interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::frame;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/frame/XModel.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.frame.XModel \&amp;quot; in the makefile&lt;br /&gt;
	Reference&amp;lt; XModel &amp;gt; rSpreadsheetModel (rSheetDoc, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
// then get the current controller from the model&lt;br /&gt;
	Reference&amp;lt; XController &amp;gt; rSpreadsheetController = &lt;br /&gt;
			rSpreadsheetModel-&amp;gt;getCurrentController();&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetView.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetView \&amp;quot; in the makefile&lt;br /&gt;
// get the XSpreadsheetView interface from the controller, we want to call its method&lt;br /&gt;
// getActiveSheet&lt;br /&gt;
	Reference&amp;lt; XSpreadsheetView &amp;gt; rSpreadsheetView (rSpreadsheetController, UNO_QUERY);&lt;br /&gt;
	Reference&amp;lt; XSpreadsheet&amp;gt; rSheet=rSpreadsheetView-&amp;gt;getActiveSheet();&lt;br /&gt;
// for a test&lt;br /&gt;
	Reference&amp;lt; XCell &amp;gt; rCell = rSheet-&amp;gt;getCellByPosition(0, 0);&lt;br /&gt;
	rCell-&amp;gt;setFormula(OUString::createFromAscii(&amp;quot;Hello&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The way to obtain a cell is explained above, then don&amp;#039;t read the two last lines before the return : they only allow me to test the code.&lt;br /&gt;
&lt;br /&gt;
=How to obtain the Cell=&lt;br /&gt;
When you have your sheet, obtain a particular cell is easy :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 13  Obtaining a Cell&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::table; (for XCell)&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheet.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheet \&amp;quot; in the makefile&lt;br /&gt;
//query for a XSpreadsheetDocument interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
//use it to get the XSpreadsheets interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets();&lt;br /&gt;
&lt;br /&gt;
//use getByName to get a reference (type Any)&lt;br /&gt;
	Any rSheet = rSheets-&amp;gt;getByName( OUString::createFromAscii(&amp;quot;Sheet1&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
//query for the XSpreadsheet interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheet &amp;gt; rSpSheet (rSheet, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
	Reference&amp;lt; XCell &amp;gt; rCell = rSpSheet-&amp;gt;getCellByPosition(0, 0);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The first parameter is the column number, and the second is the row number, both starting from 0. See above the example where we access to the top left cell called A1.&lt;br /&gt;
&lt;br /&gt;
=What can be done with a Cell ?=&lt;br /&gt;
The XCell interface provide six methods :&lt;br /&gt;
&lt;br /&gt;
getFormula       returns the formula string of a cell. &lt;br /&gt;
setFormula       sets a formula into the cell. &lt;br /&gt;
getValue         returns the floating point value of the cell. &lt;br /&gt;
setValue         sets a floating point value into the cell. &lt;br /&gt;
getType          returns the type of the cell. &lt;br /&gt;
getError         returns the error value of the cell. &lt;br /&gt;
&lt;br /&gt;
==Numerical Value in a Cell==&lt;br /&gt;
To put a numerical value in a cell is easy :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 14 Putting a numerical Value in a Cell&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::table; (for XCell)&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheet.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheet \&amp;quot; in the makefile&lt;br /&gt;
//query for a XSpreadsheetDocument interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
//use it to get the XSpreadsheets interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets();&lt;br /&gt;
&lt;br /&gt;
//use getByName to get a reference (type Any)&lt;br /&gt;
	Any rSheet = rSheets-&amp;gt;getByName( OUString::createFromAscii(&amp;quot;Sheet1&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
//query the reference of type Any for the XSpreadsheet interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheet &amp;gt; rSpSheet (rSheet, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
	Reference&amp;lt; XCell &amp;gt; rCell = rSpSheet-&amp;gt;getCellByPosition(0, 0);&lt;br /&gt;
&lt;br /&gt;
//set the cell value then get another cell etc..&lt;br /&gt;
	rCell-&amp;gt;setValue(219);&lt;br /&gt;
	rCell = rSpSheet-&amp;gt;getCellByPosition(0, 1);&lt;br /&gt;
	rCell-&amp;gt;setValue(25);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==Formula in a Cell==&lt;br /&gt;
To put a formula in a cell is straightforward : replace the previous setValue by setFormula. This gives us :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 15 Putting a Formula in a Cell&lt;br /&gt;
//C++&lt;br /&gt;
	Reference&amp;lt; XCell &amp;gt; rCell = rSpSheet-&amp;gt;getCellByPosition(0, 0);&lt;br /&gt;
	rCell-&amp;gt;setValue(21);&lt;br /&gt;
	rCell = rSpSheet-&amp;gt;getCellByPosition(0, 1);&lt;br /&gt;
	rCell-&amp;gt;setValue(23);&lt;br /&gt;
	rCell = rSpSheet-&amp;gt;getCellByPosition(0, 2);&lt;br /&gt;
	rCell-&amp;gt;setFormula(OUString::createFromAscii(&amp;quot;=sum(A1:A2)&amp;quot;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
which puts in fact the value 44 in A3.&lt;br /&gt;
==String in a Cell==&lt;br /&gt;
We use a similar principle as in previous example :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 16 Putting a String (OUString) in a Cell&lt;br /&gt;
//C++ &lt;br /&gt;
//set a string in the cell  &lt;br /&gt;
	rCell-&amp;gt;setFormula(OUString::createFromAscii(&amp;quot;Hello&amp;quot;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
It is possible to change the textual content of a cell with a Cursor (XTextCursor interface). The code below allows us this change :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 17 Change the String Content of a Cell&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::text;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/text/XText.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.text.XText \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// query first the XText interface&lt;br /&gt;
	Reference&amp;lt; XText &amp;gt; rText (rCell, UNO_QUERY); &lt;br /&gt;
&lt;br /&gt;
//query for the XTextCursor interface &lt;br /&gt;
	//Reference&amp;lt; XTextCursor &amp;gt; rTextCurs (rText, UNO_QUERY); &lt;br /&gt;
	Reference&amp;lt; XTextCursor &amp;gt; rTextCurs = rText -&amp;gt; createTextCursor(); &lt;br /&gt;
	rTextCurs -&amp;gt; gotoEnd(false);&lt;br /&gt;
	rTextCurs -&amp;gt; setString(OUString::createFromAscii(&amp;quot; Bye&amp;quot;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Adding the code gives us “Hello Bye” in a cell.&lt;br /&gt;
==What is the Content Type of a Cell ?==&lt;br /&gt;
We naturally use a getType method of the XCell interface. It returns one of the four possibilities : EMPTY, VALUE, TEXT or FORMULA (::com::sun::star::table) How do we see the values in C++ ? We give here the partial content of CellContentType.idl :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// IDL&lt;br /&gt;
namespace com&lt;br /&gt;
{&lt;br /&gt;
namespace sun&lt;br /&gt;
{&lt;br /&gt;
namespace star&lt;br /&gt;
{&lt;br /&gt;
namespace table&lt;br /&gt;
{&lt;br /&gt;
enum CellContentType&lt;br /&gt;
{&lt;br /&gt;
    CellContentType_EMPTY = 0,&lt;br /&gt;
    CellContentType_VALUE = 1,&lt;br /&gt;
    CellContentType_TEXT = 2,&lt;br /&gt;
    CellContentType_FORMULA = 3,&lt;br /&gt;
    CellContentType_MAKE_FIXED_SIZE = SAL_MAX_ENUM&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
} // table&lt;br /&gt;
} // star&lt;br /&gt;
} // sun&lt;br /&gt;
} // com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which shows us a “using namespace com::sun::star::table” allows us to write in C++ something like : CellContentType_EMPTY if we have added the following statement  :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;com/sun/star/table/CellContentType.hpp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The code below is an example : &lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
Listing 18 Retrieve the Cell Content Type&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheet.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheet \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add #include &amp;lt;com/sun/star/table/CellContentType.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.table.CellContentType \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
//query for a XSpreadsheetDocument interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY);&lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets();&lt;br /&gt;
&lt;br /&gt;
	Any rSheet = rSheets-&amp;gt;getByName( OUString::createFromAscii(&amp;quot;Sheet1&amp;quot;));&lt;br /&gt;
	//query the reference of type Any for the XSpreadsheet interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheet &amp;gt; rSpSheet (rSheet, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
	Reference&amp;lt; XCell &amp;gt; rCell = rSpSheet-&amp;gt;getCellByPosition(0, 0);&lt;br /&gt;
	rCell-&amp;gt;setValue(43);&lt;br /&gt;
	switch (rCell-&amp;gt;getType()){&lt;br /&gt;
		case CellContentType_EMPTY : printf(&amp;quot;Empty\n&amp;quot;);break;&lt;br /&gt;
		case CellContentType_VALUE : printf(&amp;quot;Numerical Value\n&amp;quot;);break;&lt;br /&gt;
		case CellContentType_TEXT : printf(&amp;quot;Text\n&amp;quot;);break;&lt;br /&gt;
		case CellContentType_FORMULA : printf(&amp;quot;Formula\n&amp;quot;);break;&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
which writes out “Numerical Value”.&lt;br /&gt;
&lt;br /&gt;
==Computing the Formula==&lt;br /&gt;
Two methods calculate() and calculateAll() are available from the XCalculaTable interface. You can query this interface from a XSreadsheetDocument.&lt;br /&gt;
&lt;br /&gt;
==Formating a Cell== &lt;br /&gt;
The straight forwarder way to format a cell is to use an already defined-style in the spreadsheet. The predefined style&amp;#039;s names are in English even they appear in other languages in Object Bar. They are  : Result, Result2, Default, Heading, Heading1 ...&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 19 Formating a Cell&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::beans;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/beans/XPropertySet.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.beans.XPropertySet \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
//query for the cell property interface &lt;br /&gt;
	Reference&amp;lt; XPropertySet &amp;gt; rCellProps (rCell, UNO_QUERY); &lt;br /&gt;
&lt;br /&gt;
//create an Any to hold our property value &lt;br /&gt;
	Any mPropVal; &lt;br /&gt;
	mPropVal &amp;lt;&amp;lt;= OUString::createFromAscii(&amp;quot;Result&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
//set some properties &lt;br /&gt;
	rCellProps-&amp;gt;setPropertyValue(OUString::createFromAscii(&amp;quot;CellStyle&amp;quot;), mPropVal); &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==Cell Annotations==&lt;br /&gt;
The following example inserts an annotation and make it permanently visible.&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 20 Putting and retrieve Cell Annotations&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheet.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheet \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XCellAddressable.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XCellAddressable \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSheetAnnotationsSupplier.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSheetAnnotationsSupplier \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSheetAnnotationAnchor.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSheetAnnotationAnchor \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
//query for a XSpreadsheetDocument interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY);&lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets();&lt;br /&gt;
&lt;br /&gt;
	Any rSheet = rSheets-&amp;gt;getByName( OUString::createFromAscii(&amp;quot;Sheet1&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
//query the reference of type Any for the XSpreadsheet interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheet &amp;gt; rSpSheet (rSheet, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
//query for XCell Interface&lt;br /&gt;
	Reference&amp;lt; XCell &amp;gt; rCell = rSpSheet-&amp;gt;getCellByPosition(0, 0);&lt;br /&gt;
&lt;br /&gt;
//query for the XcellAddressable Interface&lt;br /&gt;
	Reference&amp;lt; XCellAddressable &amp;gt; rCellAddr (rCell, UNO_QUERY);&lt;br /&gt;
	CellAddress rAddress = rCellAddr -&amp;gt; getCellAddress();&lt;br /&gt;
&lt;br /&gt;
//query for XSheetAnnotationsSupplier Interface &lt;br /&gt;
	Reference&amp;lt; XSheetAnnotationsSupplier &amp;gt; rAnnotationSupp (rSheet, UNO_QUERY);&lt;br /&gt;
	Reference&amp;lt; XSheetAnnotations &amp;gt; rAnnotations = rAnnotationSupp -&amp;gt; getAnnotations();&lt;br /&gt;
	rAnnotations -&amp;gt; insertNew(rAddress,OUString::createFromAscii(&amp;quot;This is an annotation&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
// make the annotation visible&lt;br /&gt;
&lt;br /&gt;
//query the XSheetAnnotationAnchor&lt;br /&gt;
	Reference&amp;lt; XSheetAnnotationAnchor &amp;gt; rAnnotAnchor (rCell, UNO_QUERY);&lt;br /&gt;
	Reference&amp;lt; XSheetAnnotation &amp;gt; rAnnotation = rAnnotAnchor -&amp;gt; getAnnotation();&lt;br /&gt;
	rAnnotation-&amp;gt;setIsVisible(true);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If you want an annotation not always visible you only remove the three last lines. Very interesting to put an annotation, but how do you get it if it already exist ? You add for test into the previous code :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 21 Code for Test of previous Listing&lt;br /&gt;
// C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::text;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/text/XSimpleText.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSimpleText \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// query the XSimpleTextInterface&lt;br /&gt;
	Reference&amp;lt; XSimpleText &amp;gt; rSimpleText (rAnnotation, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
	printf(&amp;quot;Annotation : %s\n&amp;quot;,&lt;br /&gt;
		OUStringToOString(rSimpleText-&amp;gt;getString(),RTL_TEXTENCODING_ASCII_US).getStr());&lt;br /&gt;
// or if you want to put the text in the cell :&lt;br /&gt;
// 	rCell-&amp;gt;setFormula(rSimpleText-&amp;gt;getString());&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
which writes out  the string literal :“Annotation : This is an annotation”.&lt;br /&gt;
&lt;br /&gt;
=Cell Range=&lt;br /&gt;
The way to obtain a cell range is not so easy as in OooBasic. You have first to obtain the Xinterface to have access to the getcellRangeByName method :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 22 Cell Range Manipulation&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::table;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/table/XCellRange.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.table.XCellRange \&amp;quot; in the makefile&lt;br /&gt;
 &lt;br /&gt;
//query for a XSpreadsheetDocument interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY); &lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets(); &lt;br /&gt;
	&lt;br /&gt;
//use getByName to get a reference (type Any) &lt;br /&gt;
	Any rSheet = rSheets-&amp;gt;getByName( OUString::createFromAscii(&amp;quot;Sheet1&amp;quot;)); &lt;br /&gt;
&lt;br /&gt;
// query for the XCellRange interface&lt;br /&gt;
	Reference&amp;lt; XCellRange &amp;gt; rSheetCellRange (rSheet, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
// query the cell range&lt;br /&gt;
	Reference&amp;lt; XCellRange&amp;gt; rCellRange = &lt;br /&gt;
		rSheetCellRange-&amp;gt;getCellRangeByName(OUString::createFromAscii(&amp;quot;B2:F5&amp;quot;));&lt;br /&gt;
&amp;lt;/code&amp;gt; &lt;br /&gt;
With the XCellRange interface you can also access the range with getCellRangeByPosition method.&lt;br /&gt;
To query one cell in the cell range, add to the previous code :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 23 Finding one Cell in the Range&lt;br /&gt;
//C++&lt;br /&gt;
	Reference&amp;lt; XCell &amp;gt; rCell = rCellRange-&amp;gt;getCellByPosition(0, 0);&lt;br /&gt;
	rCell-&amp;gt;setFormula(OUString::createFromAscii(&amp;quot;it works&amp;quot;));&lt;br /&gt;
&amp;lt;/code&amp;gt;	&lt;br /&gt;
The X and Y position are then relative to the cell Range.&lt;br /&gt;
&lt;br /&gt;
==Retrieve the absolute X and Y Positions of a Cell ==&lt;br /&gt;
This subject has been already tackled in a previous section but embedded in other code. We need first a CellAddress type described in  &amp;lt;OpenOffice.org1.1_SDK&amp;gt;/idl/com/sun/star/text/CellAddress.idl :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// IDL&lt;br /&gt;
module com {  module sun {  module star {  module table {&lt;br /&gt;
struct CellAddress&lt;br /&gt;
{&lt;br /&gt;
	short Sheet;&lt;br /&gt;
	long Column;&lt;br /&gt;
	long Row;&lt;br /&gt;
};&lt;br /&gt;
}; }; }; };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Starting from the previous listing and adding :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 24 Absolute Position of a Cell&lt;br /&gt;
// C++&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XCellAddressable.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XCellAddressable \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/table/CellAddress.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.table.CellAddress \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
//query for the XcellAddressable Interface&lt;br /&gt;
	Reference&amp;lt; XCellAddressable &amp;gt; rCellAddr (rCell, UNO_QUERY);&lt;br /&gt;
	CellAddress rAddress = rCellAddr -&amp;gt; getCellAddress();&lt;br /&gt;
	printf(&amp;quot;sheet : %d, column : %d row: %d \n&amp;quot;,&lt;br /&gt;
				     rAddress.Sheet,rAddress.Column,rAddress.Row);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
gives us a program which writes out the absolute X and Y position of a cell.&lt;br /&gt;
&lt;br /&gt;
==Retrieve the absolute Address of the Cell Range==&lt;br /&gt;
We need first a CellRangeAddress type described in  &amp;lt;OpenOffice.org1.1_SDK&amp;gt;/idl/com/sun/star/table/CellRangeAddress.idl :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// IDL&lt;br /&gt;
module com {  module sun {  module star {  module table {&lt;br /&gt;
&lt;br /&gt;
struct CellRangeAddress&lt;br /&gt;
{&lt;br /&gt;
	short Sheet;&lt;br /&gt;
	long StartColumn;&lt;br /&gt;
	long StartRow;&lt;br /&gt;
	long EndColumn;&lt;br /&gt;
	long EndRow;&lt;br /&gt;
};&lt;br /&gt;
}; }; }; };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and a XCellRangeAdressable interface. Starting from the cell range program, we add :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 25 Using XCellRangeAddressable Interface&lt;br /&gt;
// C++&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XCellRangeAddressable.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XCellRangeAddressable \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/CellRangeAddress.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.CellRangeAddress \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
//query for the XCellRangeAddressable interface&lt;br /&gt;
	Reference&amp;lt; XCellRangeAddressable &amp;gt; rCellRangeAddr (rCellRange, UNO_QUERY);&lt;br /&gt;
	CellRangeAddress rRangeAddress = rCellRangeAddr -&amp;gt; getRangeAddress();&lt;br /&gt;
	printf(&amp;quot;sheet : %d, start column : %d start row: %d ...\n&amp;quot;,&lt;br /&gt;
		rRangeAddress.Sheet,rRangeAddress.StartColumn,rRangeAddress.StartRow);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This program only writes out three of the five cell range attribute.&lt;br /&gt;
==Getting a Cell range with a Selection==&lt;br /&gt;
We have tackled a similar problem in section (&lt;br /&gt;
[[OpenOffice_Calc#Retrieve_or_change_the_currently_focused_Sheet|Retrieve or change the currently focused Sheet]]) The way is to also start from a XModel interface, and query with getCurrentSelection an XInterface and then query an XCellRange interface. &lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 26 Cell Range under Focus&lt;br /&gt;
// C++&lt;br /&gt;
	Reference&amp;lt; XInterface &amp;gt; rInterface = rSpreadsheetModel-&amp;gt;getCurrentSelection();&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/table/XCellRange.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.table.XCellRange \&amp;quot; in the makefile&lt;br /&gt;
	Reference&amp;lt; XCellRange &amp;gt; rCellRange(rInterface,UNO_QUERY);&lt;br /&gt;
	rCell = rCellRange -&amp;gt;getCellByPosition(0, 0);&lt;br /&gt;
	rCell-&amp;gt;setFormula(OUString::createFromAscii(&amp;quot;Hello !!!&amp;quot;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This code writes out “Hello !!!” in the top left corner of the selected range.&lt;br /&gt;
&lt;br /&gt;
=Ready to translate the Developpers Guide into C++=&lt;br /&gt;
When you want to go further, the Developers Guide is a good start. But examples are given in Java code. You have then to learn how to translate it into C++. At first glance you can find this translation as a complicate task but I have experimented it as a Java complete novice  when writing the chapter on annotation and encounter no difficulties. But I was lucky, I present now examples which give me more difficulties. &lt;br /&gt;
&lt;br /&gt;
==The Compute Function  Example==&lt;br /&gt;
Let&amp;#039;s start with Compute Function SDK&amp;#039;s example :&lt;br /&gt;
&amp;lt;code&amp;gt;[java]&lt;br /&gt;
//Listing 27  Java first Example (from SDK)&lt;br /&gt;
// Java&lt;br /&gt;
// --- Sheet operation. --- &lt;br /&gt;
// Compute a function &lt;br /&gt;
	com.sun.star.sheet.XSheetOperation xSheetOp = &lt;br /&gt;
		(com.sun.star.sheet.XSheetOperation) UnoRuntime.queryInterface&lt;br /&gt;
			(com.sun.star.sheet.XSheetOperation.class, xCellRange);&lt;br /&gt;
	double fResult = xSheetOp.computeFunction(com.sun.star.sheet.GeneralFunction.AVERAGE); 	System.out.println(&amp;quot;Average value of the data table A10:C30: &amp;quot; + fResult); &lt;br /&gt;
// Clear cell contents&lt;br /&gt;
	xSheetOp.clearContents( com.sun.star.sheet.CellFlags.ANNOTATION |&lt;br /&gt;
		 com.sun.star.sheet.CellFlags.OBJECTS);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The C++ translation gives (keeping the same variables names as in Java code) :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 28  C++ Translation : calling a buildin Function&lt;br /&gt;
// C++&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSheetOperation.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSheetOperation \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/GeneralFunction.hpp&amp;gt;&lt;br /&gt;
// and see in GeneralFunction.hdl how AVERAGE is generated : here GeneralFunction_AVERAGE&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.GeneralFunction \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/CellFlags.hpp&amp;gt;&lt;br /&gt;
// and see in CellFlags.hdl how ANNOTATION and OBJECT are generated :  here ANNOTATION, OBJECT&lt;br /&gt;
// in the namespace CellFlags donc :&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet::CellFlags;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.CellFlags \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// --- Sheet operation. ---&lt;br /&gt;
// Compute a function&lt;br /&gt;
	Reference&amp;lt; XSheetOperation &amp;gt;  xSheetOp( xCellRange,UNO_QUERY);&lt;br /&gt;
	double fResult= xSheetOp-&amp;gt;computeFunction(GeneralFunction_AVERAGE);&lt;br /&gt;
	printf(&amp;quot;Average value of the data table B2:C4: %f&amp;quot;, fResult);&lt;br /&gt;
// Clear cell contents&lt;br /&gt;
	 xSheetOp-&amp;gt;clearContents( ANNOTATION | OBJECTS);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
We can see the UNO calls are simpler in C++ than in Java. I have added comments to explain how constants are managed. We are lucky with this piece of code : we can see two different kind of constant :&lt;br /&gt;
* one with a specific name : GeneralFunction_AVERAGE instead of AVERAGE in Java. This problem of enumeration has already been tackled [[SDKCppLanguage#To_go_further_:_the_Enumeration_Type_Problem|here]].&lt;br /&gt;
* one with the same name as in IDL and Java files but in a namespace which requires the classical “using namespace”.&lt;br /&gt;
&lt;br /&gt;
To find information requires to generate hdl and hpp files from IDL files and to read not the hpp but hdl files. This job is let for novices, others can see all in IDL files : see the difference between :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// IDL&lt;br /&gt;
// extracted from CellFlags.idl&lt;br /&gt;
constants CellFlags&lt;br /&gt;
{&lt;br /&gt;
	const long VALUE = 1;&lt;br /&gt;
	const long DATETIME = 2;&lt;br /&gt;
	const long STRING = 4;&lt;br /&gt;
	const long ANNOTATION = 8;&lt;br /&gt;
	const long FORMULA = 16;&lt;br /&gt;
	const long HARDATTR = 32;&lt;br /&gt;
	const long OBJECTS = 128;&lt;br /&gt;
	const long EDITATTR = 256;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// IDL&lt;br /&gt;
// extracted from GeneralFunction.idl&lt;br /&gt;
enum GeneralFunction&lt;br /&gt;
{&lt;br /&gt;
	NONE,&lt;br /&gt;
	AUTO,&lt;br /&gt;
	SUM,&lt;br /&gt;
	COUNT,&lt;br /&gt;
	AVERAGE,&lt;br /&gt;
	MAX,&lt;br /&gt;
	MIN,&lt;br /&gt;
	PRODUCT,&lt;br /&gt;
	COUNTNUMS,&lt;br /&gt;
	STDEV,&lt;br /&gt;
	STDEVP,&lt;br /&gt;
	VAR,&lt;br /&gt;
	VARP&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the consequences on the constants use. You can deduce tips isn&amp;#039;t it ?&lt;br /&gt;
&lt;br /&gt;
==A second Example : adding a Name to a Cell (or Cell Range)==&lt;br /&gt;
We give first the Java code still found in SDK :&lt;br /&gt;
&amp;lt;code&amp;gt;[java]&lt;br /&gt;
//Listing 29 Second Java Example&lt;br /&gt;
// Java&lt;br /&gt;
// insert a named range &lt;br /&gt;
	com.sun.star.beans.XPropertySet xDocProp = (com.sun.star.beans.XPropertySet)&lt;br /&gt;
		UnoRuntime.queryInterface(com.sun.star.beans.XPropertySet.class, xDocument);&lt;br /&gt;
	Object aRangesObj = xDocProp.getPropertyValue(&amp;quot;NamedRanges&amp;quot;);&lt;br /&gt;
	com.sun.star.sheet.XNamedRanges xNamedRanges = (com.sun.star.sheet.XNamedRanges) 			UnoRuntime.queryInterface(com.sun.star.sheet.XNamedRanges.class, aRangesObj);&lt;br /&gt;
	com.sun.star.table.CellAddress aRefPos = new com.sun.star.table.CellAddress(); 	 		aRefPos.Sheet = 0; &lt;br /&gt;
	aRefPos.Column = 6; &lt;br /&gt;
	aRefPos.Row = 44; &lt;br /&gt;
	xNamedRanges.addNewByName(&amp;quot;ExampleName&amp;quot;, &amp;quot;SUM(G43:G44)&amp;quot;, aRefPos, 0);&lt;br /&gt;
 // use the named range in formulas &lt;br /&gt;
	xSheet.getCellByPosition(6, 44).setFormula(&amp;quot;=ExampleName&amp;quot;); &lt;br /&gt;
	xSheet.getCellByPosition(7, 44).setFormula(&amp;quot;=ExampleName&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The same code in C++ :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 30 naming a Cell (Range)&lt;br /&gt;
// C++&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/beans/XPropertySet.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.beans.XPropertySet \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XNamedRanges.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XNamedRanges \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/table/CellAddress.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.table.CellAddress \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// insert a named range &lt;br /&gt;
		// !!! rSheetDoc instead xDocument in our previous code !!!&lt;br /&gt;
 	Reference&amp;lt; XPropertySet &amp;gt; xDocProp(xDocument, UNO_QUERY); &lt;br /&gt;
	Any aRangesObj = xDocProp-&amp;gt;getPropertyValue(OUString::createFromAscii(&amp;quot;NamedRanges&amp;quot;));&lt;br /&gt;
	Reference&amp;lt; XNamedRanges &amp;gt; xNamedRanges(aRangesObj,UNO_QUERY);&lt;br /&gt;
	CellAddress aRefPos;&lt;br /&gt;
	aRefPos.Sheet = 0;&lt;br /&gt;
	aRefPos.Column = 6;&lt;br /&gt;
	aRefPos.Row = 44;&lt;br /&gt;
	xNamedRanges-&amp;gt;addNewByName(OUString::createFromAscii(&amp;quot;ExampleName&amp;quot;),&lt;br /&gt;
			OUString::createFromAscii(&amp;quot;SUM(G43:G44)&amp;quot;), aRefPos, 0);&lt;br /&gt;
 // use the named range in formulas&lt;br /&gt;
		// !!! rSpSheet instead xSheet in our previous code  !!!&lt;br /&gt;
	xSheet-&amp;gt;getCellByPosition(6, 44)-&amp;gt;setFormula(OUString::createFromAscii(&amp;quot;=ExampleName&amp;quot;));&lt;br /&gt;
	xSheet-&amp;gt;getCellByPosition(7, 44)-&amp;gt;setFormula(OUString::createFromAscii(&amp;quot;=ExampleName&amp;quot;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
We can see Object is translated by Any. You have to add “OUString::createFromAscii “ before all strings. This program names a cell “ExampleName” and gives a value associated with this name : &amp;quot;SUM(G43:G44)&amp;quot;. When you use this name it is replaced by its value.&lt;br /&gt;
&lt;br /&gt;
==A third Example==&lt;br /&gt;
Here is an other example :&lt;br /&gt;
&amp;lt;code&amp;gt;[java]&lt;br /&gt;
//Listing 31 Java third Example&lt;br /&gt;
// Java&lt;br /&gt;
// --- Cell range data --- &lt;br /&gt;
com.sun.star.sheet.XCellRangeData xData = (com.sun.star.sheet.XCellRangeData)&lt;br /&gt;
 	UnoRuntime.queryInterface(com.sun.star.sheet.XCellRangeData.class, xCellRange); &lt;br /&gt;
Object[][] aValues = { {new Double(1.1), new Integer(10)}, &lt;br /&gt;
						{new Double(2.2), new String(&amp;quot;&amp;quot;)},&lt;br /&gt;
			 			{new Double(3.3), new String(&amp;quot;Text&amp;quot;)} }; &lt;br /&gt;
xData.setDataArray(aValues);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This very interesting example takes values from an array and put them in a cell range.&lt;br /&gt;
The code is given below :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 32 Putting Cell Range Values in an Array&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
//query for a XSpreadsheetDocument interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
//use it to get the XSpreadsheets interface&lt;br /&gt;
//	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets();&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::frame;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/frame/XModel.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.frame.XModel \&amp;quot; in the makefile&lt;br /&gt;
	Reference&amp;lt; XModel &amp;gt; rSpreadsheetModel (rSheetDoc, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
// then get the current controller from the model&lt;br /&gt;
	Reference&amp;lt; XController &amp;gt; rSpreadsheetController = &lt;br /&gt;
							rSpreadsheetModel-&amp;gt;getCurrentController();&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetView.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetView \&amp;quot; in the makefile&lt;br /&gt;
// get the XSpreadsheetView interface from the controller, we want to call its method&lt;br /&gt;
// setActiveSheet&lt;br /&gt;
	Reference&amp;lt; XSpreadsheetView &amp;gt; rSpreadsheetView (rSpreadsheetController, UNO_QUERY);&lt;br /&gt;
	Reference&amp;lt; XSpreadsheet&amp;gt; rSheet=rSpreadsheetView-&amp;gt;getActiveSheet();&lt;br /&gt;
&lt;br /&gt;
	Reference&amp;lt; XInterface &amp;gt; rInterface = rSpreadsheetModel-&amp;gt;getCurrentSelection();&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/table/XCellRange.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.table.XCellRange \&amp;quot; in the makefile&lt;br /&gt;
	Reference&amp;lt; XCellRange &amp;gt; rCellRange(rInterface,UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XCellRangeData.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XCellRangeData \&amp;quot; in the makefile&lt;br /&gt;
	Reference&amp;lt; XCellRangeData&amp;gt; xData(rCellRange, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
// Java translation begins here .........&lt;br /&gt;
	Sequence&amp;lt; Sequence&amp;lt; Any &amp;gt; &amp;gt; aValues(3); // or aValues(1)(2); ?????&lt;br /&gt;
	Sequence&amp;lt; Any &amp;gt; aValues2(2);&lt;br /&gt;
	aValues2[0] &amp;lt;&amp;lt;=  (double) 1.1; aValues2[1] &amp;lt;&amp;lt;= (sal_Int32)10;&lt;br /&gt;
	aValues[0] = aValues2;&lt;br /&gt;
	aValues2[0] &amp;lt;&amp;lt;=  (double)2.2; aValues2[1] &amp;lt;&amp;lt;= OUString::createFromAscii(&amp;quot;&amp;quot;);&lt;br /&gt;
	aValues[1] = aValues2;&lt;br /&gt;
	aValues2[0] &amp;lt;&amp;lt;=  (double)3.3; aValues2[1] &amp;lt;&amp;lt;= OUString::createFromAscii(&amp;quot;Text&amp;quot;);&lt;br /&gt;
	aValues[2] = aValues2;&lt;br /&gt;
	xData -&amp;gt; setDataArray(aValues);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
can be compiled and works if we have an opened OOoCalc document with focus on a cell range of two rows and three lines. This is important : the cell range size must be the same as the sequence sequence of any !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==An Example from OooForum: opening a Password protected Document==&lt;br /&gt;
Kscape posts :&lt;br /&gt;
“There is some example java code for opening a passworded file which will prompt the user for the password at [http://codesnippets.services.openoffice.org/Office/Office.openPwdProtectedFile.snip|OOo snippets] &lt;br /&gt;
but there is no example C++ code, and I cannot seem to get the services and queries around the right way. &lt;br /&gt;
Any chance someone can translate that snippet or provide a full example C++ program which will open a passworded document? &lt;br /&gt;
&lt;br /&gt;
Thanks in advance. “&lt;br /&gt;
&lt;br /&gt;
Here is the corresponding Java code :&lt;br /&gt;
&amp;lt;code&amp;gt;[java]&lt;br /&gt;
//Listing 33 Java starting Code&lt;br /&gt;
// Java&lt;br /&gt;
XInteractionHandler xHandler = (XInteractionHandler)UnoRuntime.queryInterface( XInteractionHandler.class, xSMGR.createInstance(&amp;quot;com.sun.star.task.InteractionHandler&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
PropertyValue[] lArgs    = new PropertyValue[1];&lt;br /&gt;
lArgs[0] = new PropertyValue();&lt;br /&gt;
lArgs[0].Name  = &amp;quot;InteractionHandler&amp;quot;;&lt;br /&gt;
lArgs[0].Value = xHandler;&lt;br /&gt;
&lt;br /&gt;
xDoc = xDesktop.loadComponentFromURL(sURL, sTarget, nSearchFlags, lArgs);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Here is the C++ translation :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 34 The correspnding C++ Code&lt;br /&gt;
// C++ &lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/task/XInteractionHandler.hpp&amp;gt; &lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.task.XInteractionHandler \&amp;quot; in the makefile &lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::task; &lt;br /&gt;
&lt;br /&gt;
	Reference &amp;lt;XInteractionHandler&amp;gt; xHandler = &lt;br /&gt;
		Reference&amp;lt;XInteractionHandler&amp;gt;( rOfficeServiceManager-&amp;gt;createInstance( &lt;br /&gt;
			OUString( RTL_CONSTASCII_USTRINGPARAM( &lt;br /&gt;
				&amp;quot;com.sun.star.task.InteractionHandler&amp;quot; ))), UNO_QUERY ); &lt;br /&gt;
	if (xHandler.is()) printf(&amp;quot;xHandler OK...\n&amp;quot;); else printf(&amp;quot;Error xHandler ... \n&amp;quot;); &lt;br /&gt;
&lt;br /&gt;
	Sequence &amp;lt;PropertyValue &amp;gt; largs(1); &lt;br /&gt;
	largs[0].Name = OUString::createFromAscii(&amp;quot;InteractionHandler&amp;quot;); &lt;br /&gt;
	largs[0].Value = makeAny(xHandler); &lt;br /&gt;
&lt;br /&gt;
//get an instance of the OOoDraw document &lt;br /&gt;
	Reference&amp;lt; XComponent &amp;gt; xcomponent = rComponentLoader-&amp;gt;loadComponentFromURL( &lt;br /&gt;
		OUString::createFromAscii(&amp;quot;private:factory/sdraw&amp;quot;), &lt;br /&gt;
		OUString::createFromAscii(&amp;quot;_blank&amp;quot;), &lt;br /&gt;
		0, &lt;br /&gt;
		largs); &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
=Event Listener=&lt;br /&gt;
==First Event Listener==&lt;br /&gt;
Event listener in C++ are not documented in the Developer&amp;#039;s Guide. To find a way to resolve this problem I first read Java Code. I deduce if you want to implement an event listener you have to construct a class which inherit from a known class and then install it. My first try hang completely OOo (without a message...) After I decided to read OOo&amp;#039; source code and hope to find an example. It was the case in the file  : OOo_1.1.3_src/basic/source/basmgr/basmgr.cxx&lt;br /&gt;
If you want to do that you have to use an helper to create the class :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 35 First Event Listener&lt;br /&gt;
// C++&lt;br /&gt;
// Don&amp;#039;t forget the #include&amp;lt;com/sun/star/view/XSelectionChangeListener.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add com.sun.star.view.XSelectionChangeListener \ in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget the #include &amp;lt;cppuhelper/implbase1.hxx&amp;gt;&lt;br /&gt;
&lt;br /&gt;
typedef ::cppu::WeakImplHelper1&amp;lt; ::com::sun::star::view::XSelectionChangeListener &amp;gt; &lt;br /&gt;
                                                              SelectionChangeListenerHelper;&lt;br /&gt;
&lt;br /&gt;
class SelectionChangeListener : public SelectionChangeListenerHelper&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
	SelectionChangeListener()&lt;br /&gt;
	{printf(&amp;quot;EventListener installed\n&amp;quot;);fflush(stdout);}&lt;br /&gt;
&lt;br /&gt;
	~SelectionChangeListener()&lt;br /&gt;
	{printf(&amp;quot;EventListener released\n&amp;quot;);fflush(stdout);}&lt;br /&gt;
&lt;br /&gt;
	virtual void SAL_CALL selectionChanged(const com::sun::star::lang::EventObject&amp;amp; aEvent)&lt;br /&gt;
	 throw ( RuntimeException)&lt;br /&gt;
	{&lt;br /&gt;
		printf(&amp;quot;Selection changed \n&amp;quot;);fflush(stdout);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	virtual void SAL_CALL disposing ( const com::sun::star::lang::EventObject&amp;amp; aEventObj )&lt;br /&gt;
		throw(::com::sun::star::uno::RuntimeException)&lt;br /&gt;
	{ printf(&amp;quot;object listened to will be disposed\n&amp;quot;); }&lt;br /&gt;
}; &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The selectionChanged will be called when a selection changes : it only prints out a message. The fflush(stdout) is important if you want see the printf when the event occurs (thanks to [[CppSDKAuthors|Emmanuel GUY]]).&lt;br /&gt;
Now we want to install this event listener : &lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 36 Installing an Event Listener&lt;br /&gt;
// C++&lt;br /&gt;
// event listener&lt;br /&gt;
// Don&amp;#039;t forget the #include &amp;lt;com/sun/star/view/XSelectionSupplier.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add com.sun.star.view.XSelectionSupplier \ in the makefile&lt;br /&gt;
&lt;br /&gt;
	Reference&amp;lt; XSelectionSupplier &amp;gt; aSelSupp(rSpreadsheetController,UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
	SelectionChangeListener  *xListener = new SelectionChangeListener();&lt;br /&gt;
&lt;br /&gt;
	Reference&amp;lt; XSelectionChangeListener &amp;gt; xSelChListener = &lt;br /&gt;
			static_cast&amp;lt; XSelectionChangeListener* &amp;gt; ( xListener );&lt;br /&gt;
	&lt;br /&gt;
	aSelSupp-&amp;gt;addSelectionChangeListener(xSelChListener);&lt;br /&gt;
&lt;br /&gt;
	getchar();&lt;br /&gt;
	aSelSupp-&amp;gt;removeSelectionChangeListener(xSelChListener);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
We first instantiate our class as usual with a new, but we use after a static_cast before to install it with an appropriate method. For us this method is a addSelectionchangeListener(). It is important now that the program doesn&amp;#039;t terminate without removing the listener. We use the C getchar() function for that but with real program this important part has to change.&lt;br /&gt;
To test this code you have to provide a rSpreadsheetController interface. A way is to use the previous [[OpenOffice_Calc#A_third_Example|code]], removing the Java translation part. You then launch a OOocalc and select a cell range. You select an other cell range and see the message in the shell windows.&lt;br /&gt;
MichaelJ1980 in oooforum indicates he has to write&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
// C++&lt;br /&gt;
SelectionChangeListener  *xListener = ::new SelectionChangeListener();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
instead&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
// C++&lt;br /&gt;
SelectionChangeListener  *xListener = new SelectionChangeListener();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==A second Event Listener==&lt;br /&gt;
Emmanuel GUY has posted an other example in OOoForum :&lt;br /&gt;
[http://www.oooforum.org/forum/viewtopic.phtml?t=14697|Use events (XEventListener, XWindowListener, ...) in C++]&lt;br /&gt;
&lt;br /&gt;
=Graphics=&lt;br /&gt;
&lt;br /&gt;
==Embedding Images==&lt;br /&gt;
&lt;br /&gt;
Adding external images to a spreadsheet is possible, and this is different from linking to images. [http://codesnippets.services.openoffice.org/Calc/Calc.InsertImage.snip Linking to images] requires a user to have an external file that is always in the same location relative to the spreadsheet file, while embedding an image deals with including the image in the ODS file itself.&lt;br /&gt;
&lt;br /&gt;
First, suppose we have a model implementing the XModel interface, and is related to a spreadsheet. We can get the spreadsheet and current (active) sheet using the code below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[java]&lt;br /&gt;
XSpreadsheetDocument xDoc = (XSpreadsheetDocument)UnoRuntime.queryInterface(&lt;br /&gt;
	XSpreadsheetDocument.class, xDocModel);&lt;br /&gt;
XSpreadsheetView xsv = (XSpreadsheetView)UnoRuntime.queryInterface(&lt;br /&gt;
	XSpreadsheetView.class, m_xFrame.getController());&lt;br /&gt;
XSpreadsheet curSheet = xsv.getActiveSheet();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, we need to create a XMultiServiceFactory object so we can create components in the actual file. We&amp;#039;ll create a BitmapTable, which will be tricked into storing the image internally (([http://codesnippets.services.openoffice.org/Writer/Writer.EmbedAGraphicIntoATextdocument.snip source for Writer]).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[java]&lt;br /&gt;
XMultiServiceFactory xmsf = (XMultiServiceFactory)UnoRuntime.queryInterface(&lt;br /&gt;
	XMultiServiceFactory.class, xDocModel);&lt;br /&gt;
XNameContainer xBitmapContainer = (XNameContainer) UnoRuntime.queryInterface(&lt;br /&gt;
	XNameContainer.class, xmsf.createInstance(&amp;quot;com.sun.star.drawing.BitmapTable&amp;quot;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file itself is added to the container as a link, similar to how URLs are represented online. Thus, a path to an image in a user&amp;#039;s home directory on Linux would be &amp;#039;&amp;#039;file:///home/username/image.png&amp;#039;&amp;#039;. We add this link to the container, and then use the &amp;#039;&amp;#039;AnyConverter&amp;#039;&amp;#039; class to get a URL to the container itself, called the &amp;#039;&amp;#039;internalURL&amp;#039;&amp;#039;. This &amp;#039;&amp;#039;internalURL&amp;#039;&amp;#039; will be used as the new link to the (now internal) image.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[java]&lt;br /&gt;
String sPath = &amp;quot;file:///home/wojciech/Desktop/img.png&amp;quot;; &lt;br /&gt;
xBitmapContainer.insertByName(&amp;quot;someID&amp;quot;, sPath);&lt;br /&gt;
String internalURL = AnyConverter.toString(xBitmapContainer.getByName(&amp;quot;someID&amp;quot;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The image itself is stored as an XShape object, which is created below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[java]&lt;br /&gt;
Object imgTemp = xmsf.createInstance(&amp;quot;com.sun.star.drawing.GraphicObjectShape&amp;quot;);&lt;br /&gt;
XShape xImage = (XShape)UnoRuntime.queryInterface(XShape.class, imgTemp);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we set the properties of the actual shape (and image):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[java]&lt;br /&gt;
XPropertySet xpi = ( XPropertySet )UnoRuntime.queryInterface(XPropertySet.class, xImage );&lt;br /&gt;
xpi.setPropertyValue(&amp;quot;GraphicURL&amp;quot;, internalURL);&lt;br /&gt;
Size imgSize = new Size(2500, 5000);&lt;br /&gt;
xImage.setSize(imgSize);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And finally, we get the necessary objects to draw in the spreadsheet itself, and we draw the image. The last line of code simply removes the image entry from the temporary container.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[java]&lt;br /&gt;
XDrawPageSupplier oDPS = (XDrawPageSupplier) UnoRuntime.queryInterface(&lt;br /&gt;
	XDrawPageSupplier.class, curSheet);&lt;br /&gt;
XDrawPage xDrawPage = oDPS.getDrawPage();  &lt;br /&gt;
xDrawPage.add(xImage);&lt;br /&gt;
xBitmapContainer.removeByName(&amp;quot;someID&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Template:Home_Page}}&lt;br /&gt;
&lt;br /&gt;
= See also=&lt;br /&gt;
&lt;br /&gt;
* [http://perso.wanadoo.fr/moutou/MyUNODoc_HTML/UNOCppAPI5.html OpenOffice Calc] (Chapter 5 from UNO/C++ document) &lt;br /&gt;
* Writing a Program to Control OpenOffice.org, by Franco Pingiori — [http://www.linuxjournal.com/article/8550 Part 1] and [http://www.linuxjournal.com/article/8608 Part 2], Linux Journal&lt;br /&gt;
&lt;br /&gt;
[[Category:Calc|API]]&lt;br /&gt;
[[Category:API]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Cpp]]&lt;br /&gt;
[[Category:Uno]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Calc/API/Programming&amp;diff=42530</id>
		<title>Calc/API/Programming</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Calc/API/Programming&amp;diff=42530"/>
		<updated>2007-08-16T03:12:15Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: /* Embedding Images */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
To avoid to search in the previous code where we insert the new listings given in this chapter, we first give it again (only the main() part) :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 1 Again our starting main Code&lt;br /&gt;
int main( ) {&lt;br /&gt;
//retrieve an instance of the remote service manager&lt;br /&gt;
    Reference&amp;lt; XMultiServiceFactory &amp;gt; rOfficeServiceManager;&lt;br /&gt;
    rOfficeServiceManager = ooConnect();&lt;br /&gt;
    if( rOfficeServiceManager.is() ){&lt;br /&gt;
        printf( &amp;quot;Connected sucessfully to the office\n&amp;quot; );&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
//get the desktop service using createInstance returns an XInterface type&lt;br /&gt;
    Reference&amp;lt; XInterface  &amp;gt; Desktop = rOfficeServiceManager-&amp;gt;createInstance(&lt;br /&gt;
    OUString::createFromAscii( &amp;quot;com.sun.star.frame.Desktop&amp;quot; ));&lt;br /&gt;
&lt;br /&gt;
//query for the XComponentLoader interface&lt;br /&gt;
    Reference&amp;lt; XComponentLoader &amp;gt; rComponentLoader (Desktop, UNO_QUERY);&lt;br /&gt;
    if( rComponentLoader.is() ){&lt;br /&gt;
        	printf( &amp;quot;XComponentloader successfully instanciated\n&amp;quot; );&lt;br /&gt;
    	}&lt;br /&gt;
&lt;br /&gt;
//get an instance of the spreadsheet&lt;br /&gt;
    Reference&amp;lt; XComponent &amp;gt; xcomponent = rComponentLoader-&amp;gt;loadComponentFromURL(&lt;br /&gt;
	OUString::createFromAscii(&amp;quot;private:factory/scalc&amp;quot;),&lt;br /&gt;
        OUString::createFromAscii(&amp;quot;_blank&amp;quot;),&lt;br /&gt;
        0,&lt;br /&gt;
        Sequence &amp;lt; ::com::sun::star::beans::PropertyValue &amp;gt;());&lt;br /&gt;
// add code here&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Remember each time you query for an interface you have to add code lines (if they don&amp;#039;t exist) in the source code and a line in the makefile. I will generally add comments to prevent omissions. You can find more explanations [[IDL_Files_and_Cpp#IDL__and_C.2B.2B|here]] (if you are not a beginner).&lt;br /&gt;
&lt;br /&gt;
=To find the Sheet=&lt;br /&gt;
The most important interface for this chapter is XspreadsheetDocument. This interface supply the getSheets() method. This interface is inherited from XInterface which provide queries for a new interface to an existing UNO object : queryInterface.&lt;br /&gt;
&lt;br /&gt;
==An existing Sheet==&lt;br /&gt;
If you know the sheet&amp;#039;s name use the getByName method :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 2 How to find a Sheet in a Spreadsheet&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
//query for a XSpreadsheetDocument interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY); &lt;br /&gt;
&lt;br /&gt;
//use it to get the XSpreadsheets interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets(); &lt;br /&gt;
&lt;br /&gt;
//use getByName to get a reference (type Any) &lt;br /&gt;
	Any rSheet = rSheets-&amp;gt;getByName( OUString::createFromAscii(&amp;quot;Sheet2&amp;quot;));&lt;br /&gt;
&amp;lt;/code&amp;gt; &lt;br /&gt;
If we have a look at getByName method, we can see it can manage an  “no such element” exception. The the previous code would be better written with a try and catch statement. &lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
Listing 3 Finding a Sheet and managing Exception&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
//query for a XSpreadsheetDocument interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY); &lt;br /&gt;
&lt;br /&gt;
//use it to get the XSpreadsheets interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets(); &lt;br /&gt;
&lt;br /&gt;
//use getByName to get a reference (type Any)&lt;br /&gt;
	try { &lt;br /&gt;
		Any rSheet = rSheets-&amp;gt;getByName( OUString::createFromAscii(&amp;quot;Sheet2&amp;quot;)); &lt;br /&gt;
	}&lt;br /&gt;
	catch( Exception &amp;amp;e ){&lt;br /&gt;
      OString o = OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US );&lt;br /&gt;
      printf( &amp;quot;Error: No such element ;%s\n&amp;quot;, o.pData-&amp;gt;buffer );&lt;br /&gt;
   }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For sake of simplicity we will only use this exception managing only at the end of this document, when “helpers” will be tackled in ([[Constructing_Helpers|Constructing Helpers]]). &lt;br /&gt;
If you only know the sheet&amp;#039;s number you can retrieve the sheet using this way :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 4 Finding a Sheet with an Index&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::container;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/container/XIndexAccess.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.container.XIndexAccess \&amp;quot; in the makefile&lt;br /&gt;
//query for a XSpreadsheetDocument interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY); &lt;br /&gt;
&lt;br /&gt;
//use it to get the XSpreadsheets interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets();&lt;br /&gt;
&lt;br /&gt;
// query for the ::com::sun::star::container::XIndexAccess service&lt;br /&gt;
    Reference&amp;lt; XIndexAccess &amp;gt; rSheetsByIndex (rSheets, UNO_QUERY);  &lt;br /&gt;
&lt;br /&gt;
//use getByName to get a reference (type Any) &lt;br /&gt;
	Any rSheet = rSheetsByIndex-&amp;gt;getByIndex( (short)1 ); &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
As you can see we have to query a new service XIndexAccess. This means adding two lines in the code and one in the makefile as seen in C++ comments.&lt;br /&gt;
Take care : UNO considers the sheet numbering, starting from 0, and then 1 is the second sheet.&lt;br /&gt;
&lt;br /&gt;
==Create, rename, copy and delete a Sheet==&lt;br /&gt;
To create a sheet the method insertNewByName is used :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 5 Create a Sheet&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
//query for a XSpreadsheetDocument interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY); &lt;br /&gt;
&lt;br /&gt;
//use it to get the XSpreadsheets interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets(); &lt;br /&gt;
&lt;br /&gt;
//use it to create a new sheet called MySheet &lt;br /&gt;
	rSheets-&amp;gt;insertNewByName(OUString::createFromAscii(&amp;quot;MySheet&amp;quot;), (short)0);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
(short)0 is the index of position where the new sheet is inserted. Here “MySheet” will be the first sheet.&lt;br /&gt;
&lt;br /&gt;
How to move a sheet when its name is known:&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 6 Moving a Sheet&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
//query for a XSpreadsheetDocument interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY); &lt;br /&gt;
&lt;br /&gt;
//use it to get the XSpreadsheets interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets(); &lt;br /&gt;
&lt;br /&gt;
//use it to move a sheet called MySheet in third(back)/second(forward) position  &lt;br /&gt;
	rSheets-&amp;gt;moveByName(OUString::createFromAscii(&amp;quot;MySheet&amp;quot;), (short)2);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
How to copy a sheet &lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 7 Copying a Sheet&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
//query for a XSpreadsheetDocument interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY); &lt;br /&gt;
&lt;br /&gt;
//use it to get the XSpreadsheets interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets(); &lt;br /&gt;
&lt;br /&gt;
//use it to copy a sheet called MySheet in second position with the name &amp;quot;MySheet2&amp;quot; &lt;br /&gt;
	rSheets-&amp;gt;copyByName(OUString::createFromAscii(&amp;quot;MySheet&amp;quot;),&lt;br /&gt;
                                 OUString::createFromAscii(&amp;quot;MySheet2&amp;quot;), (short)1);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
MySheet2 is an exact copy of &amp;quot;MySheet&amp;quot; inserted as a second sheet.&lt;br /&gt;
How to rename a sheet : &lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 8 Renaming a Sheet&lt;br /&gt;
//C++ &lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::container;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/container/XNamed.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.container.XNamed \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
//query for a XSpreadsheetDocument interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY); &lt;br /&gt;
&lt;br /&gt;
//use it to get the XSpreadsheets interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets(); &lt;br /&gt;
&lt;br /&gt;
//use getByName to get a reference (type Any) &lt;br /&gt;
	Any rSheet = rSheets-&amp;gt;getByName( OUString::createFromAscii(&amp;quot;Sheet2&amp;quot;)); &lt;br /&gt;
&lt;br /&gt;
// query for XNamed Interface&lt;br /&gt;
	Reference&amp;lt; XNamed &amp;gt; rname (rSheet, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
// rename&lt;br /&gt;
	rname-&amp;gt;setName(OUString::createFromAscii(&amp;quot;MySheet&amp;quot;)); &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
How to remove a sheet :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 9  Removing a Sheet&lt;br /&gt;
// C++&lt;br /&gt;
	rSheets-&amp;gt;removeByName(OUString::createFromAscii(&amp;quot;Sheet1&amp;quot;)); &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
works properly. You can use also the XnameContainer interface like :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 10 Removing a Sheet (an other way)&lt;br /&gt;
// C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::container;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/container/XNameContainer.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.container.xNameContainer \&amp;quot; in the makefile&lt;br /&gt;
	Reference&amp;lt;XNameContainer&amp;gt; xNameContainer (rSheets, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
	xNameContainer-&amp;gt;removeByName(OUString::createFromAscii(&amp;quot;Sheet1&amp;quot;)); //OK&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Retrieve or change the currently focused Sheet==&lt;br /&gt;
&lt;br /&gt;
How to set a known-named sheet as currently focused sheet :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 11 Focus and C++ programming&lt;br /&gt;
//C++ &lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::frame;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/frame/XModel.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.frame.XModel \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetView.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetView \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheet.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheet \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
//query for a XSpreadsheetDocument interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY); &lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets(); &lt;br /&gt;
	&lt;br /&gt;
//use getByName to get a reference (type Any) &lt;br /&gt;
	Any rSheet = rSheets-&amp;gt;getByName( OUString::createFromAscii(&amp;quot;Sheet2&amp;quot;)); &lt;br /&gt;
// we want to make our new sheet the current sheet, so we need to ask the model &lt;br /&gt;
// for the controller: first query the XModel interface from our spreadsheet component &lt;br /&gt;
&lt;br /&gt;
//query for the XSpreadsheet interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheet &amp;gt; rSpSheet (rSheet, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
	Reference&amp;lt; XModel &amp;gt; rSpreadsheetModel (rSheetDoc, UNO_QUERY); &lt;br /&gt;
&lt;br /&gt;
// then get the current controller from the model &lt;br /&gt;
	Reference&amp;lt; XController &amp;gt; rSpreadsheetController = rSpreadsheetModel-&amp;gt;getCurrentController(); &lt;br /&gt;
 &lt;br /&gt;
// get the XSpreadsheetView interface from the controller, we want to call its method &lt;br /&gt;
// setActiveSheet &lt;br /&gt;
	Reference&amp;lt; XSpreadsheetView &amp;gt; rSpreadsheetView (rSpreadsheetController, UNO_QUERY); &lt;br /&gt;
 &lt;br /&gt;
// make our newly inserted sheet the active sheet using setActiveSheet &lt;br /&gt;
	rSpreadsheetView-&amp;gt;setActiveSheet(rSpSheet); &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
How to retrieve the currently focused sheet ? This problem is in fact a little variation of the previous one but the test is not so straightforward. If a new spreadsheet is created as previously we have no chance to choose ourself a sheet with focus because the program take always the same default sheet when just created. Then before resolving this problem we have to modify the loadComponentFromURL as previously done (&lt;br /&gt;
[[ UNO_automation_with_a_binary_%28executable%29#The_default_opened_Document|default opened document]])&lt;br /&gt;
Here is a piece of code which retrieves the sheet under focus. &lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 12 Retrieve the Sheet under Focus&lt;br /&gt;
//C++&lt;br /&gt;
int main( ) {&lt;br /&gt;
//retrieve an instance of the remote service manager&lt;br /&gt;
    Reference&amp;lt; XMultiServiceFactory &amp;gt; rOfficeServiceManager;&lt;br /&gt;
    rOfficeServiceManager = ooConnect();&lt;br /&gt;
    if( rOfficeServiceManager.is() ){&lt;br /&gt;
        printf( &amp;quot;Connected sucessfully to the office\n&amp;quot; );&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
//get the desktop service using createInstance returns an XInterface type&lt;br /&gt;
    Reference&amp;lt; XInterface  &amp;gt; Desktop = rOfficeServiceManager-&amp;gt;createInstance(&lt;br /&gt;
    OUString::createFromAscii( &amp;quot;com.sun.star.frame.Desktop&amp;quot; ));&lt;br /&gt;
// Don&amp;#039;t forget the #include &amp;lt;com/sun/star/frame/XDesktop.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add com.sun.star.frame.XDesktop \ in the makefile&lt;br /&gt;
//query the XDesktop Interface&lt;br /&gt;
	Reference&amp;lt; XDesktop &amp;gt; xDesktop (Desktop, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
	Reference&amp;lt; XComponent &amp;gt; xcomponent = xDesktop-&amp;gt;getCurrentComponent();&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
//query for a XSpreadsheetDocument interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::frame;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/frame/XModel.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.frame.XModel \&amp;quot; in the makefile&lt;br /&gt;
	Reference&amp;lt; XModel &amp;gt; rSpreadsheetModel (rSheetDoc, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
// then get the current controller from the model&lt;br /&gt;
	Reference&amp;lt; XController &amp;gt; rSpreadsheetController = &lt;br /&gt;
			rSpreadsheetModel-&amp;gt;getCurrentController();&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetView.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetView \&amp;quot; in the makefile&lt;br /&gt;
// get the XSpreadsheetView interface from the controller, we want to call its method&lt;br /&gt;
// getActiveSheet&lt;br /&gt;
	Reference&amp;lt; XSpreadsheetView &amp;gt; rSpreadsheetView (rSpreadsheetController, UNO_QUERY);&lt;br /&gt;
	Reference&amp;lt; XSpreadsheet&amp;gt; rSheet=rSpreadsheetView-&amp;gt;getActiveSheet();&lt;br /&gt;
// for a test&lt;br /&gt;
	Reference&amp;lt; XCell &amp;gt; rCell = rSheet-&amp;gt;getCellByPosition(0, 0);&lt;br /&gt;
	rCell-&amp;gt;setFormula(OUString::createFromAscii(&amp;quot;Hello&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The way to obtain a cell is explained above, then don&amp;#039;t read the two last lines before the return : they only allow me to test the code.&lt;br /&gt;
&lt;br /&gt;
=How to obtain the Cell=&lt;br /&gt;
When you have your sheet, obtain a particular cell is easy :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 13  Obtaining a Cell&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::table; (for XCell)&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheet.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheet \&amp;quot; in the makefile&lt;br /&gt;
//query for a XSpreadsheetDocument interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
//use it to get the XSpreadsheets interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets();&lt;br /&gt;
&lt;br /&gt;
//use getByName to get a reference (type Any)&lt;br /&gt;
	Any rSheet = rSheets-&amp;gt;getByName( OUString::createFromAscii(&amp;quot;Sheet1&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
//query for the XSpreadsheet interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheet &amp;gt; rSpSheet (rSheet, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
	Reference&amp;lt; XCell &amp;gt; rCell = rSpSheet-&amp;gt;getCellByPosition(0, 0);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The first parameter is the column number, and the second is the row number, both starting from 0. See above the example where we access to the top left cell called A1.&lt;br /&gt;
&lt;br /&gt;
=What can be done with a Cell ?=&lt;br /&gt;
The XCell interface provide six methods :&lt;br /&gt;
&lt;br /&gt;
getFormula       returns the formula string of a cell. &lt;br /&gt;
setFormula       sets a formula into the cell. &lt;br /&gt;
getValue         returns the floating point value of the cell. &lt;br /&gt;
setValue         sets a floating point value into the cell. &lt;br /&gt;
getType          returns the type of the cell. &lt;br /&gt;
getError         returns the error value of the cell. &lt;br /&gt;
&lt;br /&gt;
==Numerical Value in a Cell==&lt;br /&gt;
To put a numerical value in a cell is easy :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 14 Putting a numerical Value in a Cell&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::table; (for XCell)&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheet.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheet \&amp;quot; in the makefile&lt;br /&gt;
//query for a XSpreadsheetDocument interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
//use it to get the XSpreadsheets interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets();&lt;br /&gt;
&lt;br /&gt;
//use getByName to get a reference (type Any)&lt;br /&gt;
	Any rSheet = rSheets-&amp;gt;getByName( OUString::createFromAscii(&amp;quot;Sheet1&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
//query the reference of type Any for the XSpreadsheet interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheet &amp;gt; rSpSheet (rSheet, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
	Reference&amp;lt; XCell &amp;gt; rCell = rSpSheet-&amp;gt;getCellByPosition(0, 0);&lt;br /&gt;
&lt;br /&gt;
//set the cell value then get another cell etc..&lt;br /&gt;
	rCell-&amp;gt;setValue(219);&lt;br /&gt;
	rCell = rSpSheet-&amp;gt;getCellByPosition(0, 1);&lt;br /&gt;
	rCell-&amp;gt;setValue(25);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==Formula in a Cell==&lt;br /&gt;
To put a formula in a cell is straightforward : replace the previous setValue by setFormula. This gives us :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 15 Putting a Formula in a Cell&lt;br /&gt;
//C++&lt;br /&gt;
	Reference&amp;lt; XCell &amp;gt; rCell = rSpSheet-&amp;gt;getCellByPosition(0, 0);&lt;br /&gt;
	rCell-&amp;gt;setValue(21);&lt;br /&gt;
	rCell = rSpSheet-&amp;gt;getCellByPosition(0, 1);&lt;br /&gt;
	rCell-&amp;gt;setValue(23);&lt;br /&gt;
	rCell = rSpSheet-&amp;gt;getCellByPosition(0, 2);&lt;br /&gt;
	rCell-&amp;gt;setFormula(OUString::createFromAscii(&amp;quot;=sum(A1:A2)&amp;quot;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
which puts in fact the value 44 in A3.&lt;br /&gt;
==String in a Cell==&lt;br /&gt;
We use a similar principle as in previous example :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 16 Putting a String (OUString) in a Cell&lt;br /&gt;
//C++ &lt;br /&gt;
//set a string in the cell  &lt;br /&gt;
	rCell-&amp;gt;setFormula(OUString::createFromAscii(&amp;quot;Hello&amp;quot;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
It is possible to change the textual content of a cell with a Cursor (XTextCursor interface). The code below allows us this change :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 17 Change the String Content of a Cell&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::text;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/text/XText.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.text.XText \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// query first the XText interface&lt;br /&gt;
	Reference&amp;lt; XText &amp;gt; rText (rCell, UNO_QUERY); &lt;br /&gt;
&lt;br /&gt;
//query for the XTextCursor interface &lt;br /&gt;
	//Reference&amp;lt; XTextCursor &amp;gt; rTextCurs (rText, UNO_QUERY); &lt;br /&gt;
	Reference&amp;lt; XTextCursor &amp;gt; rTextCurs = rText -&amp;gt; createTextCursor(); &lt;br /&gt;
	rTextCurs -&amp;gt; gotoEnd(false);&lt;br /&gt;
	rTextCurs -&amp;gt; setString(OUString::createFromAscii(&amp;quot; Bye&amp;quot;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Adding the code gives us “Hello Bye” in a cell.&lt;br /&gt;
==What is the Content Type of a Cell ?==&lt;br /&gt;
We naturally use a getType method of the XCell interface. It returns one of the four possibilities : EMPTY, VALUE, TEXT or FORMULA (::com::sun::star::table) How do we see the values in C++ ? We give here the partial content of CellContentType.idl :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// IDL&lt;br /&gt;
namespace com&lt;br /&gt;
{&lt;br /&gt;
namespace sun&lt;br /&gt;
{&lt;br /&gt;
namespace star&lt;br /&gt;
{&lt;br /&gt;
namespace table&lt;br /&gt;
{&lt;br /&gt;
enum CellContentType&lt;br /&gt;
{&lt;br /&gt;
    CellContentType_EMPTY = 0,&lt;br /&gt;
    CellContentType_VALUE = 1,&lt;br /&gt;
    CellContentType_TEXT = 2,&lt;br /&gt;
    CellContentType_FORMULA = 3,&lt;br /&gt;
    CellContentType_MAKE_FIXED_SIZE = SAL_MAX_ENUM&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
} // table&lt;br /&gt;
} // star&lt;br /&gt;
} // sun&lt;br /&gt;
} // com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which shows us a “using namespace com::sun::star::table” allows us to write in C++ something like : CellContentType_EMPTY if we have added the following statement  :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;com/sun/star/table/CellContentType.hpp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The code below is an example : &lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
Listing 18 Retrieve the Cell Content Type&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheet.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheet \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add #include &amp;lt;com/sun/star/table/CellContentType.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.table.CellContentType \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
//query for a XSpreadsheetDocument interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY);&lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets();&lt;br /&gt;
&lt;br /&gt;
	Any rSheet = rSheets-&amp;gt;getByName( OUString::createFromAscii(&amp;quot;Sheet1&amp;quot;));&lt;br /&gt;
	//query the reference of type Any for the XSpreadsheet interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheet &amp;gt; rSpSheet (rSheet, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
	Reference&amp;lt; XCell &amp;gt; rCell = rSpSheet-&amp;gt;getCellByPosition(0, 0);&lt;br /&gt;
	rCell-&amp;gt;setValue(43);&lt;br /&gt;
	switch (rCell-&amp;gt;getType()){&lt;br /&gt;
		case CellContentType_EMPTY : printf(&amp;quot;Empty\n&amp;quot;);break;&lt;br /&gt;
		case CellContentType_VALUE : printf(&amp;quot;Numerical Value\n&amp;quot;);break;&lt;br /&gt;
		case CellContentType_TEXT : printf(&amp;quot;Text\n&amp;quot;);break;&lt;br /&gt;
		case CellContentType_FORMULA : printf(&amp;quot;Formula\n&amp;quot;);break;&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
which writes out “Numerical Value”.&lt;br /&gt;
&lt;br /&gt;
==Computing the Formula==&lt;br /&gt;
Two methods calculate() and calculateAll() are available from the XCalculaTable interface. You can query this interface from a XSreadsheetDocument.&lt;br /&gt;
&lt;br /&gt;
==Formating a Cell== &lt;br /&gt;
The straight forwarder way to format a cell is to use an already defined-style in the spreadsheet. The predefined style&amp;#039;s names are in English even they appear in other languages in Object Bar. They are  : Result, Result2, Default, Heading, Heading1 ...&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 19 Formating a Cell&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::beans;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/beans/XPropertySet.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.beans.XPropertySet \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
//query for the cell property interface &lt;br /&gt;
	Reference&amp;lt; XPropertySet &amp;gt; rCellProps (rCell, UNO_QUERY); &lt;br /&gt;
&lt;br /&gt;
//create an Any to hold our property value &lt;br /&gt;
	Any mPropVal; &lt;br /&gt;
	mPropVal &amp;lt;&amp;lt;= OUString::createFromAscii(&amp;quot;Result&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
//set some properties &lt;br /&gt;
	rCellProps-&amp;gt;setPropertyValue(OUString::createFromAscii(&amp;quot;CellStyle&amp;quot;), mPropVal); &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==Cell Annotations==&lt;br /&gt;
The following example inserts an annotation and make it permanently visible.&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 20 Putting and retrieve Cell Annotations&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheet.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheet \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XCellAddressable.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XCellAddressable \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSheetAnnotationsSupplier.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSheetAnnotationsSupplier \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSheetAnnotationAnchor.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSheetAnnotationAnchor \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
//query for a XSpreadsheetDocument interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY);&lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets();&lt;br /&gt;
&lt;br /&gt;
	Any rSheet = rSheets-&amp;gt;getByName( OUString::createFromAscii(&amp;quot;Sheet1&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
//query the reference of type Any for the XSpreadsheet interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheet &amp;gt; rSpSheet (rSheet, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
//query for XCell Interface&lt;br /&gt;
	Reference&amp;lt; XCell &amp;gt; rCell = rSpSheet-&amp;gt;getCellByPosition(0, 0);&lt;br /&gt;
&lt;br /&gt;
//query for the XcellAddressable Interface&lt;br /&gt;
	Reference&amp;lt; XCellAddressable &amp;gt; rCellAddr (rCell, UNO_QUERY);&lt;br /&gt;
	CellAddress rAddress = rCellAddr -&amp;gt; getCellAddress();&lt;br /&gt;
&lt;br /&gt;
//query for XSheetAnnotationsSupplier Interface &lt;br /&gt;
	Reference&amp;lt; XSheetAnnotationsSupplier &amp;gt; rAnnotationSupp (rSheet, UNO_QUERY);&lt;br /&gt;
	Reference&amp;lt; XSheetAnnotations &amp;gt; rAnnotations = rAnnotationSupp -&amp;gt; getAnnotations();&lt;br /&gt;
	rAnnotations -&amp;gt; insertNew(rAddress,OUString::createFromAscii(&amp;quot;This is an annotation&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
// make the annotation visible&lt;br /&gt;
&lt;br /&gt;
//query the XSheetAnnotationAnchor&lt;br /&gt;
	Reference&amp;lt; XSheetAnnotationAnchor &amp;gt; rAnnotAnchor (rCell, UNO_QUERY);&lt;br /&gt;
	Reference&amp;lt; XSheetAnnotation &amp;gt; rAnnotation = rAnnotAnchor -&amp;gt; getAnnotation();&lt;br /&gt;
	rAnnotation-&amp;gt;setIsVisible(true);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If you want an annotation not always visible you only remove the three last lines. Very interesting to put an annotation, but how do you get it if it already exist ? You add for test into the previous code :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 21 Code for Test of previous Listing&lt;br /&gt;
// C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::text;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/text/XSimpleText.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSimpleText \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// query the XSimpleTextInterface&lt;br /&gt;
	Reference&amp;lt; XSimpleText &amp;gt; rSimpleText (rAnnotation, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
	printf(&amp;quot;Annotation : %s\n&amp;quot;,&lt;br /&gt;
		OUStringToOString(rSimpleText-&amp;gt;getString(),RTL_TEXTENCODING_ASCII_US).getStr());&lt;br /&gt;
// or if you want to put the text in the cell :&lt;br /&gt;
// 	rCell-&amp;gt;setFormula(rSimpleText-&amp;gt;getString());&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
which writes out  the string literal :“Annotation : This is an annotation”.&lt;br /&gt;
&lt;br /&gt;
=Cell Range=&lt;br /&gt;
The way to obtain a cell range is not so easy as in OooBasic. You have first to obtain the Xinterface to have access to the getcellRangeByName method :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 22 Cell Range Manipulation&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::table;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/table/XCellRange.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.table.XCellRange \&amp;quot; in the makefile&lt;br /&gt;
 &lt;br /&gt;
//query for a XSpreadsheetDocument interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY); &lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets(); &lt;br /&gt;
	&lt;br /&gt;
//use getByName to get a reference (type Any) &lt;br /&gt;
	Any rSheet = rSheets-&amp;gt;getByName( OUString::createFromAscii(&amp;quot;Sheet1&amp;quot;)); &lt;br /&gt;
&lt;br /&gt;
// query for the XCellRange interface&lt;br /&gt;
	Reference&amp;lt; XCellRange &amp;gt; rSheetCellRange (rSheet, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
// query the cell range&lt;br /&gt;
	Reference&amp;lt; XCellRange&amp;gt; rCellRange = &lt;br /&gt;
		rSheetCellRange-&amp;gt;getCellRangeByName(OUString::createFromAscii(&amp;quot;B2:F5&amp;quot;));&lt;br /&gt;
&amp;lt;/code&amp;gt; &lt;br /&gt;
With the XCellRange interface you can also access the range with getCellRangeByPosition method.&lt;br /&gt;
To query one cell in the cell range, add to the previous code :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 23 Finding one Cell in the Range&lt;br /&gt;
//C++&lt;br /&gt;
	Reference&amp;lt; XCell &amp;gt; rCell = rCellRange-&amp;gt;getCellByPosition(0, 0);&lt;br /&gt;
	rCell-&amp;gt;setFormula(OUString::createFromAscii(&amp;quot;it works&amp;quot;));&lt;br /&gt;
&amp;lt;/code&amp;gt;	&lt;br /&gt;
The X and Y position are then relative to the cell Range.&lt;br /&gt;
&lt;br /&gt;
==Retrieve the absolute X and Y Positions of a Cell ==&lt;br /&gt;
This subject has been already tackled in a previous section but embedded in other code. We need first a CellAddress type described in  &amp;lt;OpenOffice.org1.1_SDK&amp;gt;/idl/com/sun/star/text/CellAddress.idl :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// IDL&lt;br /&gt;
module com {  module sun {  module star {  module table {&lt;br /&gt;
struct CellAddress&lt;br /&gt;
{&lt;br /&gt;
	short Sheet;&lt;br /&gt;
	long Column;&lt;br /&gt;
	long Row;&lt;br /&gt;
};&lt;br /&gt;
}; }; }; };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Starting from the previous listing and adding :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 24 Absolute Position of a Cell&lt;br /&gt;
// C++&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XCellAddressable.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XCellAddressable \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/table/CellAddress.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.table.CellAddress \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
//query for the XcellAddressable Interface&lt;br /&gt;
	Reference&amp;lt; XCellAddressable &amp;gt; rCellAddr (rCell, UNO_QUERY);&lt;br /&gt;
	CellAddress rAddress = rCellAddr -&amp;gt; getCellAddress();&lt;br /&gt;
	printf(&amp;quot;sheet : %d, column : %d row: %d \n&amp;quot;,&lt;br /&gt;
				     rAddress.Sheet,rAddress.Column,rAddress.Row);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
gives us a program which writes out the absolute X and Y position of a cell.&lt;br /&gt;
&lt;br /&gt;
==Retrieve the absolute Address of the Cell Range==&lt;br /&gt;
We need first a CellRangeAddress type described in  &amp;lt;OpenOffice.org1.1_SDK&amp;gt;/idl/com/sun/star/table/CellRangeAddress.idl :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// IDL&lt;br /&gt;
module com {  module sun {  module star {  module table {&lt;br /&gt;
&lt;br /&gt;
struct CellRangeAddress&lt;br /&gt;
{&lt;br /&gt;
	short Sheet;&lt;br /&gt;
	long StartColumn;&lt;br /&gt;
	long StartRow;&lt;br /&gt;
	long EndColumn;&lt;br /&gt;
	long EndRow;&lt;br /&gt;
};&lt;br /&gt;
}; }; }; };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and a XCellRangeAdressable interface. Starting from the cell range program, we add :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 25 Using XCellRangeAddressable Interface&lt;br /&gt;
// C++&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XCellRangeAddressable.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XCellRangeAddressable \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/CellRangeAddress.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.CellRangeAddress \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
//query for the XCellRangeAddressable interface&lt;br /&gt;
	Reference&amp;lt; XCellRangeAddressable &amp;gt; rCellRangeAddr (rCellRange, UNO_QUERY);&lt;br /&gt;
	CellRangeAddress rRangeAddress = rCellRangeAddr -&amp;gt; getRangeAddress();&lt;br /&gt;
	printf(&amp;quot;sheet : %d, start column : %d start row: %d ...\n&amp;quot;,&lt;br /&gt;
		rRangeAddress.Sheet,rRangeAddress.StartColumn,rRangeAddress.StartRow);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This program only writes out three of the five cell range attribute.&lt;br /&gt;
==Getting a Cell range with a Selection==&lt;br /&gt;
We have tackled a similar problem in section (&lt;br /&gt;
[[OpenOffice_Calc#Retrieve_or_change_the_currently_focused_Sheet|Retrieve or change the currently focused Sheet]]) The way is to also start from a XModel interface, and query with getCurrentSelection an XInterface and then query an XCellRange interface. &lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 26 Cell Range under Focus&lt;br /&gt;
// C++&lt;br /&gt;
	Reference&amp;lt; XInterface &amp;gt; rInterface = rSpreadsheetModel-&amp;gt;getCurrentSelection();&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/table/XCellRange.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.table.XCellRange \&amp;quot; in the makefile&lt;br /&gt;
	Reference&amp;lt; XCellRange &amp;gt; rCellRange(rInterface,UNO_QUERY);&lt;br /&gt;
	rCell = rCellRange -&amp;gt;getCellByPosition(0, 0);&lt;br /&gt;
	rCell-&amp;gt;setFormula(OUString::createFromAscii(&amp;quot;Hello !!!&amp;quot;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This code writes out “Hello !!!” in the top left corner of the selected range.&lt;br /&gt;
&lt;br /&gt;
=Ready to translate the Developpers Guide into C++=&lt;br /&gt;
When you want to go further, the Developers Guide is a good start. But examples are given in Java code. You have then to learn how to translate it into C++. At first glance you can find this translation as a complicate task but I have experimented it as a Java complete novice  when writing the chapter on annotation and encounter no difficulties. But I was lucky, I present now examples which give me more difficulties. &lt;br /&gt;
&lt;br /&gt;
==The Compute Function  Example==&lt;br /&gt;
Let&amp;#039;s start with Compute Function SDK&amp;#039;s example :&lt;br /&gt;
&amp;lt;code&amp;gt;[java]&lt;br /&gt;
//Listing 27  Java first Example (from SDK)&lt;br /&gt;
// Java&lt;br /&gt;
// --- Sheet operation. --- &lt;br /&gt;
// Compute a function &lt;br /&gt;
	com.sun.star.sheet.XSheetOperation xSheetOp = &lt;br /&gt;
		(com.sun.star.sheet.XSheetOperation) UnoRuntime.queryInterface&lt;br /&gt;
			(com.sun.star.sheet.XSheetOperation.class, xCellRange);&lt;br /&gt;
	double fResult = xSheetOp.computeFunction(com.sun.star.sheet.GeneralFunction.AVERAGE); 	System.out.println(&amp;quot;Average value of the data table A10:C30: &amp;quot; + fResult); &lt;br /&gt;
// Clear cell contents&lt;br /&gt;
	xSheetOp.clearContents( com.sun.star.sheet.CellFlags.ANNOTATION |&lt;br /&gt;
		 com.sun.star.sheet.CellFlags.OBJECTS);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The C++ translation gives (keeping the same variables names as in Java code) :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 28  C++ Translation : calling a buildin Function&lt;br /&gt;
// C++&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSheetOperation.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSheetOperation \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/GeneralFunction.hpp&amp;gt;&lt;br /&gt;
// and see in GeneralFunction.hdl how AVERAGE is generated : here GeneralFunction_AVERAGE&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.GeneralFunction \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/CellFlags.hpp&amp;gt;&lt;br /&gt;
// and see in CellFlags.hdl how ANNOTATION and OBJECT are generated :  here ANNOTATION, OBJECT&lt;br /&gt;
// in the namespace CellFlags donc :&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet::CellFlags;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.CellFlags \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// --- Sheet operation. ---&lt;br /&gt;
// Compute a function&lt;br /&gt;
	Reference&amp;lt; XSheetOperation &amp;gt;  xSheetOp( xCellRange,UNO_QUERY);&lt;br /&gt;
	double fResult= xSheetOp-&amp;gt;computeFunction(GeneralFunction_AVERAGE);&lt;br /&gt;
	printf(&amp;quot;Average value of the data table B2:C4: %f&amp;quot;, fResult);&lt;br /&gt;
// Clear cell contents&lt;br /&gt;
	 xSheetOp-&amp;gt;clearContents( ANNOTATION | OBJECTS);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
We can see the UNO calls are simpler in C++ than in Java. I have added comments to explain how constants are managed. We are lucky with this piece of code : we can see two different kind of constant :&lt;br /&gt;
* one with a specific name : GeneralFunction_AVERAGE instead of AVERAGE in Java. This problem of enumeration has already been tackled [[SDKCppLanguage#To_go_further_:_the_Enumeration_Type_Problem|here]].&lt;br /&gt;
* one with the same name as in IDL and Java files but in a namespace which requires the classical “using namespace”.&lt;br /&gt;
&lt;br /&gt;
To find information requires to generate hdl and hpp files from IDL files and to read not the hpp but hdl files. This job is let for novices, others can see all in IDL files : see the difference between :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// IDL&lt;br /&gt;
// extracted from CellFlags.idl&lt;br /&gt;
constants CellFlags&lt;br /&gt;
{&lt;br /&gt;
	const long VALUE = 1;&lt;br /&gt;
	const long DATETIME = 2;&lt;br /&gt;
	const long STRING = 4;&lt;br /&gt;
	const long ANNOTATION = 8;&lt;br /&gt;
	const long FORMULA = 16;&lt;br /&gt;
	const long HARDATTR = 32;&lt;br /&gt;
	const long OBJECTS = 128;&lt;br /&gt;
	const long EDITATTR = 256;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// IDL&lt;br /&gt;
// extracted from GeneralFunction.idl&lt;br /&gt;
enum GeneralFunction&lt;br /&gt;
{&lt;br /&gt;
	NONE,&lt;br /&gt;
	AUTO,&lt;br /&gt;
	SUM,&lt;br /&gt;
	COUNT,&lt;br /&gt;
	AVERAGE,&lt;br /&gt;
	MAX,&lt;br /&gt;
	MIN,&lt;br /&gt;
	PRODUCT,&lt;br /&gt;
	COUNTNUMS,&lt;br /&gt;
	STDEV,&lt;br /&gt;
	STDEVP,&lt;br /&gt;
	VAR,&lt;br /&gt;
	VARP&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the consequences on the constants use. You can deduce tips isn&amp;#039;t it ?&lt;br /&gt;
&lt;br /&gt;
==A second Example : adding a Name to a Cell (or Cell Range)==&lt;br /&gt;
We give first the Java code still found in SDK :&lt;br /&gt;
&amp;lt;code&amp;gt;[java]&lt;br /&gt;
//Listing 29 Second Java Example&lt;br /&gt;
// Java&lt;br /&gt;
// insert a named range &lt;br /&gt;
	com.sun.star.beans.XPropertySet xDocProp = (com.sun.star.beans.XPropertySet)&lt;br /&gt;
		UnoRuntime.queryInterface(com.sun.star.beans.XPropertySet.class, xDocument);&lt;br /&gt;
	Object aRangesObj = xDocProp.getPropertyValue(&amp;quot;NamedRanges&amp;quot;);&lt;br /&gt;
	com.sun.star.sheet.XNamedRanges xNamedRanges = (com.sun.star.sheet.XNamedRanges) 			UnoRuntime.queryInterface(com.sun.star.sheet.XNamedRanges.class, aRangesObj);&lt;br /&gt;
	com.sun.star.table.CellAddress aRefPos = new com.sun.star.table.CellAddress(); 	 		aRefPos.Sheet = 0; &lt;br /&gt;
	aRefPos.Column = 6; &lt;br /&gt;
	aRefPos.Row = 44; &lt;br /&gt;
	xNamedRanges.addNewByName(&amp;quot;ExampleName&amp;quot;, &amp;quot;SUM(G43:G44)&amp;quot;, aRefPos, 0);&lt;br /&gt;
 // use the named range in formulas &lt;br /&gt;
	xSheet.getCellByPosition(6, 44).setFormula(&amp;quot;=ExampleName&amp;quot;); &lt;br /&gt;
	xSheet.getCellByPosition(7, 44).setFormula(&amp;quot;=ExampleName&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The same code in C++ :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 30 naming a Cell (Range)&lt;br /&gt;
// C++&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/beans/XPropertySet.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.beans.XPropertySet \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XNamedRanges.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XNamedRanges \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/table/CellAddress.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.table.CellAddress \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// insert a named range &lt;br /&gt;
		// !!! rSheetDoc instead xDocument in our previous code !!!&lt;br /&gt;
 	Reference&amp;lt; XPropertySet &amp;gt; xDocProp(xDocument, UNO_QUERY); &lt;br /&gt;
	Any aRangesObj = xDocProp-&amp;gt;getPropertyValue(OUString::createFromAscii(&amp;quot;NamedRanges&amp;quot;));&lt;br /&gt;
	Reference&amp;lt; XNamedRanges &amp;gt; xNamedRanges(aRangesObj,UNO_QUERY);&lt;br /&gt;
	CellAddress aRefPos;&lt;br /&gt;
	aRefPos.Sheet = 0;&lt;br /&gt;
	aRefPos.Column = 6;&lt;br /&gt;
	aRefPos.Row = 44;&lt;br /&gt;
	xNamedRanges-&amp;gt;addNewByName(OUString::createFromAscii(&amp;quot;ExampleName&amp;quot;),&lt;br /&gt;
			OUString::createFromAscii(&amp;quot;SUM(G43:G44)&amp;quot;), aRefPos, 0);&lt;br /&gt;
 // use the named range in formulas&lt;br /&gt;
		// !!! rSpSheet instead xSheet in our previous code  !!!&lt;br /&gt;
	xSheet-&amp;gt;getCellByPosition(6, 44)-&amp;gt;setFormula(OUString::createFromAscii(&amp;quot;=ExampleName&amp;quot;));&lt;br /&gt;
	xSheet-&amp;gt;getCellByPosition(7, 44)-&amp;gt;setFormula(OUString::createFromAscii(&amp;quot;=ExampleName&amp;quot;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
We can see Object is translated by Any. You have to add “OUString::createFromAscii “ before all strings. This program names a cell “ExampleName” and gives a value associated with this name : &amp;quot;SUM(G43:G44)&amp;quot;. When you use this name it is replaced by its value.&lt;br /&gt;
&lt;br /&gt;
==A third Example==&lt;br /&gt;
Here is an other example :&lt;br /&gt;
&amp;lt;code&amp;gt;[java]&lt;br /&gt;
//Listing 31 Java third Example&lt;br /&gt;
// Java&lt;br /&gt;
// --- Cell range data --- &lt;br /&gt;
com.sun.star.sheet.XCellRangeData xData = (com.sun.star.sheet.XCellRangeData)&lt;br /&gt;
 	UnoRuntime.queryInterface(com.sun.star.sheet.XCellRangeData.class, xCellRange); &lt;br /&gt;
Object[][] aValues = { {new Double(1.1), new Integer(10)}, &lt;br /&gt;
						{new Double(2.2), new String(&amp;quot;&amp;quot;)},&lt;br /&gt;
			 			{new Double(3.3), new String(&amp;quot;Text&amp;quot;)} }; &lt;br /&gt;
xData.setDataArray(aValues);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This very interesting example takes values from an array and put them in a cell range.&lt;br /&gt;
The code is given below :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 32 Putting Cell Range Values in an Array&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
//query for a XSpreadsheetDocument interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
//use it to get the XSpreadsheets interface&lt;br /&gt;
//	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets();&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::frame;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/frame/XModel.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.frame.XModel \&amp;quot; in the makefile&lt;br /&gt;
	Reference&amp;lt; XModel &amp;gt; rSpreadsheetModel (rSheetDoc, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
// then get the current controller from the model&lt;br /&gt;
	Reference&amp;lt; XController &amp;gt; rSpreadsheetController = &lt;br /&gt;
							rSpreadsheetModel-&amp;gt;getCurrentController();&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetView.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetView \&amp;quot; in the makefile&lt;br /&gt;
// get the XSpreadsheetView interface from the controller, we want to call its method&lt;br /&gt;
// setActiveSheet&lt;br /&gt;
	Reference&amp;lt; XSpreadsheetView &amp;gt; rSpreadsheetView (rSpreadsheetController, UNO_QUERY);&lt;br /&gt;
	Reference&amp;lt; XSpreadsheet&amp;gt; rSheet=rSpreadsheetView-&amp;gt;getActiveSheet();&lt;br /&gt;
&lt;br /&gt;
	Reference&amp;lt; XInterface &amp;gt; rInterface = rSpreadsheetModel-&amp;gt;getCurrentSelection();&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/table/XCellRange.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.table.XCellRange \&amp;quot; in the makefile&lt;br /&gt;
	Reference&amp;lt; XCellRange &amp;gt; rCellRange(rInterface,UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XCellRangeData.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XCellRangeData \&amp;quot; in the makefile&lt;br /&gt;
	Reference&amp;lt; XCellRangeData&amp;gt; xData(rCellRange, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
// Java translation begins here .........&lt;br /&gt;
	Sequence&amp;lt; Sequence&amp;lt; Any &amp;gt; &amp;gt; aValues(3); // or aValues(1)(2); ?????&lt;br /&gt;
	Sequence&amp;lt; Any &amp;gt; aValues2(2);&lt;br /&gt;
	aValues2[0] &amp;lt;&amp;lt;=  (double) 1.1; aValues2[1] &amp;lt;&amp;lt;= (sal_Int32)10;&lt;br /&gt;
	aValues[0] = aValues2;&lt;br /&gt;
	aValues2[0] &amp;lt;&amp;lt;=  (double)2.2; aValues2[1] &amp;lt;&amp;lt;= OUString::createFromAscii(&amp;quot;&amp;quot;);&lt;br /&gt;
	aValues[1] = aValues2;&lt;br /&gt;
	aValues2[0] &amp;lt;&amp;lt;=  (double)3.3; aValues2[1] &amp;lt;&amp;lt;= OUString::createFromAscii(&amp;quot;Text&amp;quot;);&lt;br /&gt;
	aValues[2] = aValues2;&lt;br /&gt;
	xData -&amp;gt; setDataArray(aValues);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
can be compiled and works if we have an opened OOoCalc document with focus on a cell range of two rows and three lines. This is important : the cell range size must be the same as the sequence sequence of any !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==An Example from OooForum: opening a Password protected Document==&lt;br /&gt;
Kscape posts :&lt;br /&gt;
“There is some example java code for opening a passworded file which will prompt the user for the password at [http://codesnippets.services.openoffice.org/Office/Office.openPwdProtectedFile.snip|OOo snippets] &lt;br /&gt;
but there is no example C++ code, and I cannot seem to get the services and queries around the right way. &lt;br /&gt;
Any chance someone can translate that snippet or provide a full example C++ program which will open a passworded document? &lt;br /&gt;
&lt;br /&gt;
Thanks in advance. “&lt;br /&gt;
&lt;br /&gt;
Here is the corresponding Java code :&lt;br /&gt;
&amp;lt;code&amp;gt;[java]&lt;br /&gt;
//Listing 33 Java starting Code&lt;br /&gt;
// Java&lt;br /&gt;
XInteractionHandler xHandler = (XInteractionHandler)UnoRuntime.queryInterface( XInteractionHandler.class, xSMGR.createInstance(&amp;quot;com.sun.star.task.InteractionHandler&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
PropertyValue[] lArgs    = new PropertyValue[1];&lt;br /&gt;
lArgs[0] = new PropertyValue();&lt;br /&gt;
lArgs[0].Name  = &amp;quot;InteractionHandler&amp;quot;;&lt;br /&gt;
lArgs[0].Value = xHandler;&lt;br /&gt;
&lt;br /&gt;
xDoc = xDesktop.loadComponentFromURL(sURL, sTarget, nSearchFlags, lArgs);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Here is the C++ translation :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 34 The correspnding C++ Code&lt;br /&gt;
// C++ &lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/task/XInteractionHandler.hpp&amp;gt; &lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.task.XInteractionHandler \&amp;quot; in the makefile &lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::task; &lt;br /&gt;
&lt;br /&gt;
	Reference &amp;lt;XInteractionHandler&amp;gt; xHandler = &lt;br /&gt;
		Reference&amp;lt;XInteractionHandler&amp;gt;( rOfficeServiceManager-&amp;gt;createInstance( &lt;br /&gt;
			OUString( RTL_CONSTASCII_USTRINGPARAM( &lt;br /&gt;
				&amp;quot;com.sun.star.task.InteractionHandler&amp;quot; ))), UNO_QUERY ); &lt;br /&gt;
	if (xHandler.is()) printf(&amp;quot;xHandler OK...\n&amp;quot;); else printf(&amp;quot;Error xHandler ... \n&amp;quot;); &lt;br /&gt;
&lt;br /&gt;
	Sequence &amp;lt;PropertyValue &amp;gt; largs(1); &lt;br /&gt;
	largs[0].Name = OUString::createFromAscii(&amp;quot;InteractionHandler&amp;quot;); &lt;br /&gt;
	largs[0].Value = makeAny(xHandler); &lt;br /&gt;
&lt;br /&gt;
//get an instance of the OOoDraw document &lt;br /&gt;
	Reference&amp;lt; XComponent &amp;gt; xcomponent = rComponentLoader-&amp;gt;loadComponentFromURL( &lt;br /&gt;
		OUString::createFromAscii(&amp;quot;private:factory/sdraw&amp;quot;), &lt;br /&gt;
		OUString::createFromAscii(&amp;quot;_blank&amp;quot;), &lt;br /&gt;
		0, &lt;br /&gt;
		largs); &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
=Event Listener=&lt;br /&gt;
==First Event Listener==&lt;br /&gt;
Event listener in C++ are not documented in the Developer&amp;#039;s Guide. To find a way to resolve this problem I first read Java Code. I deduce if you want to implement an event listener you have to construct a class which inherit from a known class and then install it. My first try hang completely OOo (without a message...) After I decided to read OOo&amp;#039; source code and hope to find an example. It was the case in the file  : OOo_1.1.3_src/basic/source/basmgr/basmgr.cxx&lt;br /&gt;
If you want to do that you have to use an helper to create the class :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 35 First Event Listener&lt;br /&gt;
// C++&lt;br /&gt;
// Don&amp;#039;t forget the #include&amp;lt;com/sun/star/view/XSelectionChangeListener.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add com.sun.star.view.XSelectionChangeListener \ in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget the #include &amp;lt;cppuhelper/implbase1.hxx&amp;gt;&lt;br /&gt;
&lt;br /&gt;
typedef ::cppu::WeakImplHelper1&amp;lt; ::com::sun::star::view::XSelectionChangeListener &amp;gt; &lt;br /&gt;
                                                              SelectionChangeListenerHelper;&lt;br /&gt;
&lt;br /&gt;
class SelectionChangeListener : public SelectionChangeListenerHelper&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
	SelectionChangeListener()&lt;br /&gt;
	{printf(&amp;quot;EventListener installed\n&amp;quot;);fflush(stdout);}&lt;br /&gt;
&lt;br /&gt;
	~SelectionChangeListener()&lt;br /&gt;
	{printf(&amp;quot;EventListener released\n&amp;quot;);fflush(stdout);}&lt;br /&gt;
&lt;br /&gt;
	virtual void SAL_CALL selectionChanged(const com::sun::star::lang::EventObject&amp;amp; aEvent)&lt;br /&gt;
	 throw ( RuntimeException)&lt;br /&gt;
	{&lt;br /&gt;
		printf(&amp;quot;Selection changed \n&amp;quot;);fflush(stdout);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	virtual void SAL_CALL disposing ( const com::sun::star::lang::EventObject&amp;amp; aEventObj )&lt;br /&gt;
		throw(::com::sun::star::uno::RuntimeException)&lt;br /&gt;
	{ printf(&amp;quot;object listened to will be disposed\n&amp;quot;); }&lt;br /&gt;
}; &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The selectionChanged will be called when a selection changes : it only prints out a message. The fflush(stdout) is important if you want see the printf when the event occurs (thanks to [[CppSDKAuthors|Emmanuel GUY]]).&lt;br /&gt;
Now we want to install this event listener : &lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 36 Installing an Event Listener&lt;br /&gt;
// C++&lt;br /&gt;
// event listener&lt;br /&gt;
// Don&amp;#039;t forget the #include &amp;lt;com/sun/star/view/XSelectionSupplier.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add com.sun.star.view.XSelectionSupplier \ in the makefile&lt;br /&gt;
&lt;br /&gt;
	Reference&amp;lt; XSelectionSupplier &amp;gt; aSelSupp(rSpreadsheetController,UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
	SelectionChangeListener  *xListener = new SelectionChangeListener();&lt;br /&gt;
&lt;br /&gt;
	Reference&amp;lt; XSelectionChangeListener &amp;gt; xSelChListener = &lt;br /&gt;
			static_cast&amp;lt; XSelectionChangeListener* &amp;gt; ( xListener );&lt;br /&gt;
	&lt;br /&gt;
	aSelSupp-&amp;gt;addSelectionChangeListener(xSelChListener);&lt;br /&gt;
&lt;br /&gt;
	getchar();&lt;br /&gt;
	aSelSupp-&amp;gt;removeSelectionChangeListener(xSelChListener);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
We first instantiate our class as usual with a new, but we use after a static_cast before to install it with an appropriate method. For us this method is a addSelectionchangeListener(). It is important now that the program doesn&amp;#039;t terminate without removing the listener. We use the C getchar() function for that but with real program this important part has to change.&lt;br /&gt;
To test this code you have to provide a rSpreadsheetController interface. A way is to use the previous [[OpenOffice_Calc#A_third_Example|code]], removing the Java translation part. You then launch a OOocalc and select a cell range. You select an other cell range and see the message in the shell windows.&lt;br /&gt;
MichaelJ1980 in oooforum indicates he has to write&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
// C++&lt;br /&gt;
SelectionChangeListener  *xListener = ::new SelectionChangeListener();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
instead&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
// C++&lt;br /&gt;
SelectionChangeListener  *xListener = new SelectionChangeListener();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==A second Event Listener==&lt;br /&gt;
Emmanuel GUY has posted an other example in OOoForum :&lt;br /&gt;
[http://www.oooforum.org/forum/viewtopic.phtml?t=14697|Use events (XEventListener, XWindowListener, ...) in C++]&lt;br /&gt;
&lt;br /&gt;
=Graphics=&lt;br /&gt;
&lt;br /&gt;
==Embedding Images==&lt;br /&gt;
&lt;br /&gt;
Adding external images to a spreadsheet is possible, and this is different from linking to images. [http://codesnippets.services.openoffice.org/Calc/Calc.InsertImage.snip Linking to images] requires a user to have an external file that is always in the same location relative to the spreadsheet file, while embedding an image deals with including the image in the ODS file itself.&lt;br /&gt;
&lt;br /&gt;
First, suppose we have a model implementing the XModel interface, and is related to a spreadsheet. We can get the spreadsheet and current (active) sheet using the code below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[java]&lt;br /&gt;
XSpreadsheetDocument xDoc = (XSpreadsheetDocument)UnoRuntime.queryInterface(&lt;br /&gt;
	XSpreadsheetDocument.class, xDocModel);&lt;br /&gt;
XSpreadsheetView xsv = (XSpreadsheetView)UnoRuntime.queryInterface(&lt;br /&gt;
	XSpreadsheetView.class, m_xFrame.getController());&lt;br /&gt;
XSpreadsheet curSheet = xsv.getActiveSheet();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, we need to create a XMultiServiceFactory object so we can create components in the actual file. We&amp;#039;ll create a BitmapTable, which will be tricked into storing the image internally (([http://codesnippets.services.openoffice.org/Writer/Writer.EmbedAGraphicIntoATextdocument.snip source for Writer]).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[java]&lt;br /&gt;
XMultiServiceFactory xmsf = (XMultiServiceFactory)UnoRuntime.queryInterface(XMultiServiceFactory.class, xDocModel);&lt;br /&gt;
XNameContainer xBitmapContainer = (XNameContainer) UnoRuntime.queryInterface(&lt;br /&gt;
	XNameContainer.class, xmsf.createInstance(&amp;quot;com.sun.star.drawing.BitmapTable&amp;quot;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file itself is added to the container as a link, similar to how URLs are represented online. Thus, a path to an image in a user&amp;#039;s home directory on Linux would be &amp;#039;&amp;#039;file:///home/username/image.png&amp;#039;&amp;#039;. We add this link to the container, and then use the &amp;#039;&amp;#039;AnyConverter&amp;#039;&amp;#039; class to get a URL to the container itself, called the &amp;#039;&amp;#039;internalURL&amp;#039;&amp;#039;. This &amp;#039;&amp;#039;internalURL&amp;#039;&amp;#039; will be used as the new link to the (now internal) image.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[java]&lt;br /&gt;
String sPath = &amp;quot;file:///home/wojciech/Desktop/img.png&amp;quot;; &lt;br /&gt;
xBitmapContainer.insertByName(&amp;quot;someID&amp;quot;, sPath);&lt;br /&gt;
String internalURL = AnyConverter.toString(xBitmapContainer.getByName(&amp;quot;someID&amp;quot;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The image itself is stored as an XShape object, which is created below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[java]&lt;br /&gt;
Object imgTemp = xmsf.createInstance(&amp;quot;com.sun.star.drawing.GraphicObjectShape&amp;quot;);&lt;br /&gt;
XShape xImage = (XShape)UnoRuntime.queryInterface(XShape.class, imgTemp);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we set the properties of the actual shape (and image):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[java]&lt;br /&gt;
XPropertySet xpi = ( XPropertySet )UnoRuntime.queryInterface(XPropertySet.class, xImage );&lt;br /&gt;
xpi.setPropertyValue(&amp;quot;GraphicURL&amp;quot;, internalURL);&lt;br /&gt;
Size imgSize = new Size(2500, 5000);&lt;br /&gt;
xImage.setSize(imgSize);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And finally, we get the necessary objects to draw in the spreadsheet itself, and we draw the image. The last line of code simply removes the image entry from the temporary container.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[java]&lt;br /&gt;
XDrawPageSupplier oDPS = (XDrawPageSupplier) UnoRuntime.queryInterface(&lt;br /&gt;
	XDrawPageSupplier.class, curSheet);&lt;br /&gt;
XDrawPage xDrawPage = oDPS.getDrawPage();  &lt;br /&gt;
xDrawPage.add(xImage);&lt;br /&gt;
xBitmapContainer.removeByName(&amp;quot;someID&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Template:Home_Page}}&lt;br /&gt;
&lt;br /&gt;
= See also=&lt;br /&gt;
&lt;br /&gt;
* [http://perso.wanadoo.fr/moutou/MyUNODoc_HTML/UNOCppAPI5.html OpenOffice Calc] (Chapter 5 from UNO/C++ document) &lt;br /&gt;
* Writing a Program to Control OpenOffice.org, by Franco Pingiori — [http://www.linuxjournal.com/article/8550 Part 1] and [http://www.linuxjournal.com/article/8608 Part 2], Linux Journal&lt;br /&gt;
&lt;br /&gt;
[[Category:Calc|API]]&lt;br /&gt;
[[Category:API]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Cpp]]&lt;br /&gt;
[[Category:Uno]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=Calc/API/Programming&amp;diff=42529</id>
		<title>Calc/API/Programming</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=Calc/API/Programming&amp;diff=42529"/>
		<updated>2007-08-16T03:10:59Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Introduction==&lt;br /&gt;
To avoid to search in the previous code where we insert the new listings given in this chapter, we first give it again (only the main() part) :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 1 Again our starting main Code&lt;br /&gt;
int main( ) {&lt;br /&gt;
//retrieve an instance of the remote service manager&lt;br /&gt;
    Reference&amp;lt; XMultiServiceFactory &amp;gt; rOfficeServiceManager;&lt;br /&gt;
    rOfficeServiceManager = ooConnect();&lt;br /&gt;
    if( rOfficeServiceManager.is() ){&lt;br /&gt;
        printf( &amp;quot;Connected sucessfully to the office\n&amp;quot; );&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
//get the desktop service using createInstance returns an XInterface type&lt;br /&gt;
    Reference&amp;lt; XInterface  &amp;gt; Desktop = rOfficeServiceManager-&amp;gt;createInstance(&lt;br /&gt;
    OUString::createFromAscii( &amp;quot;com.sun.star.frame.Desktop&amp;quot; ));&lt;br /&gt;
&lt;br /&gt;
//query for the XComponentLoader interface&lt;br /&gt;
    Reference&amp;lt; XComponentLoader &amp;gt; rComponentLoader (Desktop, UNO_QUERY);&lt;br /&gt;
    if( rComponentLoader.is() ){&lt;br /&gt;
        	printf( &amp;quot;XComponentloader successfully instanciated\n&amp;quot; );&lt;br /&gt;
    	}&lt;br /&gt;
&lt;br /&gt;
//get an instance of the spreadsheet&lt;br /&gt;
    Reference&amp;lt; XComponent &amp;gt; xcomponent = rComponentLoader-&amp;gt;loadComponentFromURL(&lt;br /&gt;
	OUString::createFromAscii(&amp;quot;private:factory/scalc&amp;quot;),&lt;br /&gt;
        OUString::createFromAscii(&amp;quot;_blank&amp;quot;),&lt;br /&gt;
        0,&lt;br /&gt;
        Sequence &amp;lt; ::com::sun::star::beans::PropertyValue &amp;gt;());&lt;br /&gt;
// add code here&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Remember each time you query for an interface you have to add code lines (if they don&amp;#039;t exist) in the source code and a line in the makefile. I will generally add comments to prevent omissions. You can find more explanations [[IDL_Files_and_Cpp#IDL__and_C.2B.2B|here]] (if you are not a beginner).&lt;br /&gt;
&lt;br /&gt;
=To find the Sheet=&lt;br /&gt;
The most important interface for this chapter is XspreadsheetDocument. This interface supply the getSheets() method. This interface is inherited from XInterface which provide queries for a new interface to an existing UNO object : queryInterface.&lt;br /&gt;
&lt;br /&gt;
==An existing Sheet==&lt;br /&gt;
If you know the sheet&amp;#039;s name use the getByName method :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 2 How to find a Sheet in a Spreadsheet&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
//query for a XSpreadsheetDocument interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY); &lt;br /&gt;
&lt;br /&gt;
//use it to get the XSpreadsheets interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets(); &lt;br /&gt;
&lt;br /&gt;
//use getByName to get a reference (type Any) &lt;br /&gt;
	Any rSheet = rSheets-&amp;gt;getByName( OUString::createFromAscii(&amp;quot;Sheet2&amp;quot;));&lt;br /&gt;
&amp;lt;/code&amp;gt; &lt;br /&gt;
If we have a look at getByName method, we can see it can manage an  “no such element” exception. The the previous code would be better written with a try and catch statement. &lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
Listing 3 Finding a Sheet and managing Exception&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
//query for a XSpreadsheetDocument interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY); &lt;br /&gt;
&lt;br /&gt;
//use it to get the XSpreadsheets interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets(); &lt;br /&gt;
&lt;br /&gt;
//use getByName to get a reference (type Any)&lt;br /&gt;
	try { &lt;br /&gt;
		Any rSheet = rSheets-&amp;gt;getByName( OUString::createFromAscii(&amp;quot;Sheet2&amp;quot;)); &lt;br /&gt;
	}&lt;br /&gt;
	catch( Exception &amp;amp;e ){&lt;br /&gt;
      OString o = OUStringToOString( e.Message, RTL_TEXTENCODING_ASCII_US );&lt;br /&gt;
      printf( &amp;quot;Error: No such element ;%s\n&amp;quot;, o.pData-&amp;gt;buffer );&lt;br /&gt;
   }&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
For sake of simplicity we will only use this exception managing only at the end of this document, when “helpers” will be tackled in ([[Constructing_Helpers|Constructing Helpers]]). &lt;br /&gt;
If you only know the sheet&amp;#039;s number you can retrieve the sheet using this way :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 4 Finding a Sheet with an Index&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::container;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/container/XIndexAccess.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.container.XIndexAccess \&amp;quot; in the makefile&lt;br /&gt;
//query for a XSpreadsheetDocument interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY); &lt;br /&gt;
&lt;br /&gt;
//use it to get the XSpreadsheets interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets();&lt;br /&gt;
&lt;br /&gt;
// query for the ::com::sun::star::container::XIndexAccess service&lt;br /&gt;
    Reference&amp;lt; XIndexAccess &amp;gt; rSheetsByIndex (rSheets, UNO_QUERY);  &lt;br /&gt;
&lt;br /&gt;
//use getByName to get a reference (type Any) &lt;br /&gt;
	Any rSheet = rSheetsByIndex-&amp;gt;getByIndex( (short)1 ); &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
As you can see we have to query a new service XIndexAccess. This means adding two lines in the code and one in the makefile as seen in C++ comments.&lt;br /&gt;
Take care : UNO considers the sheet numbering, starting from 0, and then 1 is the second sheet.&lt;br /&gt;
&lt;br /&gt;
==Create, rename, copy and delete a Sheet==&lt;br /&gt;
To create a sheet the method insertNewByName is used :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 5 Create a Sheet&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
//query for a XSpreadsheetDocument interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY); &lt;br /&gt;
&lt;br /&gt;
//use it to get the XSpreadsheets interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets(); &lt;br /&gt;
&lt;br /&gt;
//use it to create a new sheet called MySheet &lt;br /&gt;
	rSheets-&amp;gt;insertNewByName(OUString::createFromAscii(&amp;quot;MySheet&amp;quot;), (short)0);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
(short)0 is the index of position where the new sheet is inserted. Here “MySheet” will be the first sheet.&lt;br /&gt;
&lt;br /&gt;
How to move a sheet when its name is known:&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 6 Moving a Sheet&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
//query for a XSpreadsheetDocument interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY); &lt;br /&gt;
&lt;br /&gt;
//use it to get the XSpreadsheets interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets(); &lt;br /&gt;
&lt;br /&gt;
//use it to move a sheet called MySheet in third(back)/second(forward) position  &lt;br /&gt;
	rSheets-&amp;gt;moveByName(OUString::createFromAscii(&amp;quot;MySheet&amp;quot;), (short)2);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
How to copy a sheet &lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 7 Copying a Sheet&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
//query for a XSpreadsheetDocument interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY); &lt;br /&gt;
&lt;br /&gt;
//use it to get the XSpreadsheets interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets(); &lt;br /&gt;
&lt;br /&gt;
//use it to copy a sheet called MySheet in second position with the name &amp;quot;MySheet2&amp;quot; &lt;br /&gt;
	rSheets-&amp;gt;copyByName(OUString::createFromAscii(&amp;quot;MySheet&amp;quot;),&lt;br /&gt;
                                 OUString::createFromAscii(&amp;quot;MySheet2&amp;quot;), (short)1);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
MySheet2 is an exact copy of &amp;quot;MySheet&amp;quot; inserted as a second sheet.&lt;br /&gt;
How to rename a sheet : &lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 8 Renaming a Sheet&lt;br /&gt;
//C++ &lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::container;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/container/XNamed.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.container.XNamed \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
//query for a XSpreadsheetDocument interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY); &lt;br /&gt;
&lt;br /&gt;
//use it to get the XSpreadsheets interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets(); &lt;br /&gt;
&lt;br /&gt;
//use getByName to get a reference (type Any) &lt;br /&gt;
	Any rSheet = rSheets-&amp;gt;getByName( OUString::createFromAscii(&amp;quot;Sheet2&amp;quot;)); &lt;br /&gt;
&lt;br /&gt;
// query for XNamed Interface&lt;br /&gt;
	Reference&amp;lt; XNamed &amp;gt; rname (rSheet, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
// rename&lt;br /&gt;
	rname-&amp;gt;setName(OUString::createFromAscii(&amp;quot;MySheet&amp;quot;)); &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
How to remove a sheet :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 9  Removing a Sheet&lt;br /&gt;
// C++&lt;br /&gt;
	rSheets-&amp;gt;removeByName(OUString::createFromAscii(&amp;quot;Sheet1&amp;quot;)); &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
works properly. You can use also the XnameContainer interface like :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 10 Removing a Sheet (an other way)&lt;br /&gt;
// C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::container;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/container/XNameContainer.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.container.xNameContainer \&amp;quot; in the makefile&lt;br /&gt;
	Reference&amp;lt;XNameContainer&amp;gt; xNameContainer (rSheets, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
	xNameContainer-&amp;gt;removeByName(OUString::createFromAscii(&amp;quot;Sheet1&amp;quot;)); //OK&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Retrieve or change the currently focused Sheet==&lt;br /&gt;
&lt;br /&gt;
How to set a known-named sheet as currently focused sheet :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 11 Focus and C++ programming&lt;br /&gt;
//C++ &lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::frame;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/frame/XModel.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.frame.XModel \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetView.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetView \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheet.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheet \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
//query for a XSpreadsheetDocument interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY); &lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets(); &lt;br /&gt;
	&lt;br /&gt;
//use getByName to get a reference (type Any) &lt;br /&gt;
	Any rSheet = rSheets-&amp;gt;getByName( OUString::createFromAscii(&amp;quot;Sheet2&amp;quot;)); &lt;br /&gt;
// we want to make our new sheet the current sheet, so we need to ask the model &lt;br /&gt;
// for the controller: first query the XModel interface from our spreadsheet component &lt;br /&gt;
&lt;br /&gt;
//query for the XSpreadsheet interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheet &amp;gt; rSpSheet (rSheet, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
	Reference&amp;lt; XModel &amp;gt; rSpreadsheetModel (rSheetDoc, UNO_QUERY); &lt;br /&gt;
&lt;br /&gt;
// then get the current controller from the model &lt;br /&gt;
	Reference&amp;lt; XController &amp;gt; rSpreadsheetController = rSpreadsheetModel-&amp;gt;getCurrentController(); &lt;br /&gt;
 &lt;br /&gt;
// get the XSpreadsheetView interface from the controller, we want to call its method &lt;br /&gt;
// setActiveSheet &lt;br /&gt;
	Reference&amp;lt; XSpreadsheetView &amp;gt; rSpreadsheetView (rSpreadsheetController, UNO_QUERY); &lt;br /&gt;
 &lt;br /&gt;
// make our newly inserted sheet the active sheet using setActiveSheet &lt;br /&gt;
	rSpreadsheetView-&amp;gt;setActiveSheet(rSpSheet); &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
How to retrieve the currently focused sheet ? This problem is in fact a little variation of the previous one but the test is not so straightforward. If a new spreadsheet is created as previously we have no chance to choose ourself a sheet with focus because the program take always the same default sheet when just created. Then before resolving this problem we have to modify the loadComponentFromURL as previously done (&lt;br /&gt;
[[ UNO_automation_with_a_binary_%28executable%29#The_default_opened_Document|default opened document]])&lt;br /&gt;
Here is a piece of code which retrieves the sheet under focus. &lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 12 Retrieve the Sheet under Focus&lt;br /&gt;
//C++&lt;br /&gt;
int main( ) {&lt;br /&gt;
//retrieve an instance of the remote service manager&lt;br /&gt;
    Reference&amp;lt; XMultiServiceFactory &amp;gt; rOfficeServiceManager;&lt;br /&gt;
    rOfficeServiceManager = ooConnect();&lt;br /&gt;
    if( rOfficeServiceManager.is() ){&lt;br /&gt;
        printf( &amp;quot;Connected sucessfully to the office\n&amp;quot; );&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
//get the desktop service using createInstance returns an XInterface type&lt;br /&gt;
    Reference&amp;lt; XInterface  &amp;gt; Desktop = rOfficeServiceManager-&amp;gt;createInstance(&lt;br /&gt;
    OUString::createFromAscii( &amp;quot;com.sun.star.frame.Desktop&amp;quot; ));&lt;br /&gt;
// Don&amp;#039;t forget the #include &amp;lt;com/sun/star/frame/XDesktop.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add com.sun.star.frame.XDesktop \ in the makefile&lt;br /&gt;
//query the XDesktop Interface&lt;br /&gt;
	Reference&amp;lt; XDesktop &amp;gt; xDesktop (Desktop, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
	Reference&amp;lt; XComponent &amp;gt; xcomponent = xDesktop-&amp;gt;getCurrentComponent();&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
//query for a XSpreadsheetDocument interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::frame;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/frame/XModel.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.frame.XModel \&amp;quot; in the makefile&lt;br /&gt;
	Reference&amp;lt; XModel &amp;gt; rSpreadsheetModel (rSheetDoc, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
// then get the current controller from the model&lt;br /&gt;
	Reference&amp;lt; XController &amp;gt; rSpreadsheetController = &lt;br /&gt;
			rSpreadsheetModel-&amp;gt;getCurrentController();&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetView.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetView \&amp;quot; in the makefile&lt;br /&gt;
// get the XSpreadsheetView interface from the controller, we want to call its method&lt;br /&gt;
// getActiveSheet&lt;br /&gt;
	Reference&amp;lt; XSpreadsheetView &amp;gt; rSpreadsheetView (rSpreadsheetController, UNO_QUERY);&lt;br /&gt;
	Reference&amp;lt; XSpreadsheet&amp;gt; rSheet=rSpreadsheetView-&amp;gt;getActiveSheet();&lt;br /&gt;
// for a test&lt;br /&gt;
	Reference&amp;lt; XCell &amp;gt; rCell = rSheet-&amp;gt;getCellByPosition(0, 0);&lt;br /&gt;
	rCell-&amp;gt;setFormula(OUString::createFromAscii(&amp;quot;Hello&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The way to obtain a cell is explained above, then don&amp;#039;t read the two last lines before the return : they only allow me to test the code.&lt;br /&gt;
&lt;br /&gt;
=How to obtain the Cell=&lt;br /&gt;
When you have your sheet, obtain a particular cell is easy :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 13  Obtaining a Cell&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::table; (for XCell)&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheet.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheet \&amp;quot; in the makefile&lt;br /&gt;
//query for a XSpreadsheetDocument interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
//use it to get the XSpreadsheets interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets();&lt;br /&gt;
&lt;br /&gt;
//use getByName to get a reference (type Any)&lt;br /&gt;
	Any rSheet = rSheets-&amp;gt;getByName( OUString::createFromAscii(&amp;quot;Sheet1&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
//query for the XSpreadsheet interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheet &amp;gt; rSpSheet (rSheet, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
	Reference&amp;lt; XCell &amp;gt; rCell = rSpSheet-&amp;gt;getCellByPosition(0, 0);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The first parameter is the column number, and the second is the row number, both starting from 0. See above the example where we access to the top left cell called A1.&lt;br /&gt;
&lt;br /&gt;
=What can be done with a Cell ?=&lt;br /&gt;
The XCell interface provide six methods :&lt;br /&gt;
&lt;br /&gt;
getFormula       returns the formula string of a cell. &lt;br /&gt;
setFormula       sets a formula into the cell. &lt;br /&gt;
getValue         returns the floating point value of the cell. &lt;br /&gt;
setValue         sets a floating point value into the cell. &lt;br /&gt;
getType          returns the type of the cell. &lt;br /&gt;
getError         returns the error value of the cell. &lt;br /&gt;
&lt;br /&gt;
==Numerical Value in a Cell==&lt;br /&gt;
To put a numerical value in a cell is easy :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 14 Putting a numerical Value in a Cell&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::table; (for XCell)&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheet.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheet \&amp;quot; in the makefile&lt;br /&gt;
//query for a XSpreadsheetDocument interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
//use it to get the XSpreadsheets interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets();&lt;br /&gt;
&lt;br /&gt;
//use getByName to get a reference (type Any)&lt;br /&gt;
	Any rSheet = rSheets-&amp;gt;getByName( OUString::createFromAscii(&amp;quot;Sheet1&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
//query the reference of type Any for the XSpreadsheet interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheet &amp;gt; rSpSheet (rSheet, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
	Reference&amp;lt; XCell &amp;gt; rCell = rSpSheet-&amp;gt;getCellByPosition(0, 0);&lt;br /&gt;
&lt;br /&gt;
//set the cell value then get another cell etc..&lt;br /&gt;
	rCell-&amp;gt;setValue(219);&lt;br /&gt;
	rCell = rSpSheet-&amp;gt;getCellByPosition(0, 1);&lt;br /&gt;
	rCell-&amp;gt;setValue(25);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==Formula in a Cell==&lt;br /&gt;
To put a formula in a cell is straightforward : replace the previous setValue by setFormula. This gives us :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 15 Putting a Formula in a Cell&lt;br /&gt;
//C++&lt;br /&gt;
	Reference&amp;lt; XCell &amp;gt; rCell = rSpSheet-&amp;gt;getCellByPosition(0, 0);&lt;br /&gt;
	rCell-&amp;gt;setValue(21);&lt;br /&gt;
	rCell = rSpSheet-&amp;gt;getCellByPosition(0, 1);&lt;br /&gt;
	rCell-&amp;gt;setValue(23);&lt;br /&gt;
	rCell = rSpSheet-&amp;gt;getCellByPosition(0, 2);&lt;br /&gt;
	rCell-&amp;gt;setFormula(OUString::createFromAscii(&amp;quot;=sum(A1:A2)&amp;quot;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
which puts in fact the value 44 in A3.&lt;br /&gt;
==String in a Cell==&lt;br /&gt;
We use a similar principle as in previous example :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 16 Putting a String (OUString) in a Cell&lt;br /&gt;
//C++ &lt;br /&gt;
//set a string in the cell  &lt;br /&gt;
	rCell-&amp;gt;setFormula(OUString::createFromAscii(&amp;quot;Hello&amp;quot;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
It is possible to change the textual content of a cell with a Cursor (XTextCursor interface). The code below allows us this change :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 17 Change the String Content of a Cell&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::text;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/text/XText.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.text.XText \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// query first the XText interface&lt;br /&gt;
	Reference&amp;lt; XText &amp;gt; rText (rCell, UNO_QUERY); &lt;br /&gt;
&lt;br /&gt;
//query for the XTextCursor interface &lt;br /&gt;
	//Reference&amp;lt; XTextCursor &amp;gt; rTextCurs (rText, UNO_QUERY); &lt;br /&gt;
	Reference&amp;lt; XTextCursor &amp;gt; rTextCurs = rText -&amp;gt; createTextCursor(); &lt;br /&gt;
	rTextCurs -&amp;gt; gotoEnd(false);&lt;br /&gt;
	rTextCurs -&amp;gt; setString(OUString::createFromAscii(&amp;quot; Bye&amp;quot;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Adding the code gives us “Hello Bye” in a cell.&lt;br /&gt;
==What is the Content Type of a Cell ?==&lt;br /&gt;
We naturally use a getType method of the XCell interface. It returns one of the four possibilities : EMPTY, VALUE, TEXT or FORMULA (::com::sun::star::table) How do we see the values in C++ ? We give here the partial content of CellContentType.idl :&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// IDL&lt;br /&gt;
namespace com&lt;br /&gt;
{&lt;br /&gt;
namespace sun&lt;br /&gt;
{&lt;br /&gt;
namespace star&lt;br /&gt;
{&lt;br /&gt;
namespace table&lt;br /&gt;
{&lt;br /&gt;
enum CellContentType&lt;br /&gt;
{&lt;br /&gt;
    CellContentType_EMPTY = 0,&lt;br /&gt;
    CellContentType_VALUE = 1,&lt;br /&gt;
    CellContentType_TEXT = 2,&lt;br /&gt;
    CellContentType_FORMULA = 3,&lt;br /&gt;
    CellContentType_MAKE_FIXED_SIZE = SAL_MAX_ENUM&lt;br /&gt;
};&lt;br /&gt;
&lt;br /&gt;
} // table&lt;br /&gt;
} // star&lt;br /&gt;
} // sun&lt;br /&gt;
} // com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
which shows us a “using namespace com::sun::star::table” allows us to write in C++ something like : CellContentType_EMPTY if we have added the following statement  :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
#include &amp;lt;com/sun/star/table/CellContentType.hpp&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The code below is an example : &lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
Listing 18 Retrieve the Cell Content Type&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheet.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheet \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add #include &amp;lt;com/sun/star/table/CellContentType.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.table.CellContentType \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
//query for a XSpreadsheetDocument interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY);&lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets();&lt;br /&gt;
&lt;br /&gt;
	Any rSheet = rSheets-&amp;gt;getByName( OUString::createFromAscii(&amp;quot;Sheet1&amp;quot;));&lt;br /&gt;
	//query the reference of type Any for the XSpreadsheet interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheet &amp;gt; rSpSheet (rSheet, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
	Reference&amp;lt; XCell &amp;gt; rCell = rSpSheet-&amp;gt;getCellByPosition(0, 0);&lt;br /&gt;
	rCell-&amp;gt;setValue(43);&lt;br /&gt;
	switch (rCell-&amp;gt;getType()){&lt;br /&gt;
		case CellContentType_EMPTY : printf(&amp;quot;Empty\n&amp;quot;);break;&lt;br /&gt;
		case CellContentType_VALUE : printf(&amp;quot;Numerical Value\n&amp;quot;);break;&lt;br /&gt;
		case CellContentType_TEXT : printf(&amp;quot;Text\n&amp;quot;);break;&lt;br /&gt;
		case CellContentType_FORMULA : printf(&amp;quot;Formula\n&amp;quot;);break;&lt;br /&gt;
	}&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
which writes out “Numerical Value”.&lt;br /&gt;
&lt;br /&gt;
==Computing the Formula==&lt;br /&gt;
Two methods calculate() and calculateAll() are available from the XCalculaTable interface. You can query this interface from a XSreadsheetDocument.&lt;br /&gt;
&lt;br /&gt;
==Formating a Cell== &lt;br /&gt;
The straight forwarder way to format a cell is to use an already defined-style in the spreadsheet. The predefined style&amp;#039;s names are in English even they appear in other languages in Object Bar. They are  : Result, Result2, Default, Heading, Heading1 ...&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 19 Formating a Cell&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::beans;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/beans/XPropertySet.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.beans.XPropertySet \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
//query for the cell property interface &lt;br /&gt;
	Reference&amp;lt; XPropertySet &amp;gt; rCellProps (rCell, UNO_QUERY); &lt;br /&gt;
&lt;br /&gt;
//create an Any to hold our property value &lt;br /&gt;
	Any mPropVal; &lt;br /&gt;
	mPropVal &amp;lt;&amp;lt;= OUString::createFromAscii(&amp;quot;Result&amp;quot;); &lt;br /&gt;
 &lt;br /&gt;
//set some properties &lt;br /&gt;
	rCellProps-&amp;gt;setPropertyValue(OUString::createFromAscii(&amp;quot;CellStyle&amp;quot;), mPropVal); &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
==Cell Annotations==&lt;br /&gt;
The following example inserts an annotation and make it permanently visible.&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 20 Putting and retrieve Cell Annotations&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheet.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheet \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XCellAddressable.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XCellAddressable \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSheetAnnotationsSupplier.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSheetAnnotationsSupplier \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSheetAnnotationAnchor.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSheetAnnotationAnchor \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
//query for a XSpreadsheetDocument interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY);&lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets();&lt;br /&gt;
&lt;br /&gt;
	Any rSheet = rSheets-&amp;gt;getByName( OUString::createFromAscii(&amp;quot;Sheet1&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
//query the reference of type Any for the XSpreadsheet interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheet &amp;gt; rSpSheet (rSheet, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
//query for XCell Interface&lt;br /&gt;
	Reference&amp;lt; XCell &amp;gt; rCell = rSpSheet-&amp;gt;getCellByPosition(0, 0);&lt;br /&gt;
&lt;br /&gt;
//query for the XcellAddressable Interface&lt;br /&gt;
	Reference&amp;lt; XCellAddressable &amp;gt; rCellAddr (rCell, UNO_QUERY);&lt;br /&gt;
	CellAddress rAddress = rCellAddr -&amp;gt; getCellAddress();&lt;br /&gt;
&lt;br /&gt;
//query for XSheetAnnotationsSupplier Interface &lt;br /&gt;
	Reference&amp;lt; XSheetAnnotationsSupplier &amp;gt; rAnnotationSupp (rSheet, UNO_QUERY);&lt;br /&gt;
	Reference&amp;lt; XSheetAnnotations &amp;gt; rAnnotations = rAnnotationSupp -&amp;gt; getAnnotations();&lt;br /&gt;
	rAnnotations -&amp;gt; insertNew(rAddress,OUString::createFromAscii(&amp;quot;This is an annotation&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
// make the annotation visible&lt;br /&gt;
&lt;br /&gt;
//query the XSheetAnnotationAnchor&lt;br /&gt;
	Reference&amp;lt; XSheetAnnotationAnchor &amp;gt; rAnnotAnchor (rCell, UNO_QUERY);&lt;br /&gt;
	Reference&amp;lt; XSheetAnnotation &amp;gt; rAnnotation = rAnnotAnchor -&amp;gt; getAnnotation();&lt;br /&gt;
	rAnnotation-&amp;gt;setIsVisible(true);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
If you want an annotation not always visible you only remove the three last lines. Very interesting to put an annotation, but how do you get it if it already exist ? You add for test into the previous code :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 21 Code for Test of previous Listing&lt;br /&gt;
// C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::text;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/text/XSimpleText.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSimpleText \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// query the XSimpleTextInterface&lt;br /&gt;
	Reference&amp;lt; XSimpleText &amp;gt; rSimpleText (rAnnotation, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
	printf(&amp;quot;Annotation : %s\n&amp;quot;,&lt;br /&gt;
		OUStringToOString(rSimpleText-&amp;gt;getString(),RTL_TEXTENCODING_ASCII_US).getStr());&lt;br /&gt;
// or if you want to put the text in the cell :&lt;br /&gt;
// 	rCell-&amp;gt;setFormula(rSimpleText-&amp;gt;getString());&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
which writes out  the string literal :“Annotation : This is an annotation”.&lt;br /&gt;
&lt;br /&gt;
=Cell Range=&lt;br /&gt;
The way to obtain a cell range is not so easy as in OooBasic. You have first to obtain the Xinterface to have access to the getcellRangeByName method :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 22 Cell Range Manipulation&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::table;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/table/XCellRange.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.table.XCellRange \&amp;quot; in the makefile&lt;br /&gt;
 &lt;br /&gt;
//query for a XSpreadsheetDocument interface &lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY); &lt;br /&gt;
	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets(); &lt;br /&gt;
	&lt;br /&gt;
//use getByName to get a reference (type Any) &lt;br /&gt;
	Any rSheet = rSheets-&amp;gt;getByName( OUString::createFromAscii(&amp;quot;Sheet1&amp;quot;)); &lt;br /&gt;
&lt;br /&gt;
// query for the XCellRange interface&lt;br /&gt;
	Reference&amp;lt; XCellRange &amp;gt; rSheetCellRange (rSheet, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
// query the cell range&lt;br /&gt;
	Reference&amp;lt; XCellRange&amp;gt; rCellRange = &lt;br /&gt;
		rSheetCellRange-&amp;gt;getCellRangeByName(OUString::createFromAscii(&amp;quot;B2:F5&amp;quot;));&lt;br /&gt;
&amp;lt;/code&amp;gt; &lt;br /&gt;
With the XCellRange interface you can also access the range with getCellRangeByPosition method.&lt;br /&gt;
To query one cell in the cell range, add to the previous code :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 23 Finding one Cell in the Range&lt;br /&gt;
//C++&lt;br /&gt;
	Reference&amp;lt; XCell &amp;gt; rCell = rCellRange-&amp;gt;getCellByPosition(0, 0);&lt;br /&gt;
	rCell-&amp;gt;setFormula(OUString::createFromAscii(&amp;quot;it works&amp;quot;));&lt;br /&gt;
&amp;lt;/code&amp;gt;	&lt;br /&gt;
The X and Y position are then relative to the cell Range.&lt;br /&gt;
&lt;br /&gt;
==Retrieve the absolute X and Y Positions of a Cell ==&lt;br /&gt;
This subject has been already tackled in a previous section but embedded in other code. We need first a CellAddress type described in  &amp;lt;OpenOffice.org1.1_SDK&amp;gt;/idl/com/sun/star/text/CellAddress.idl :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// IDL&lt;br /&gt;
module com {  module sun {  module star {  module table {&lt;br /&gt;
struct CellAddress&lt;br /&gt;
{&lt;br /&gt;
	short Sheet;&lt;br /&gt;
	long Column;&lt;br /&gt;
	long Row;&lt;br /&gt;
};&lt;br /&gt;
}; }; }; };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Starting from the previous listing and adding :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 24 Absolute Position of a Cell&lt;br /&gt;
// C++&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XCellAddressable.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XCellAddressable \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/table/CellAddress.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.table.CellAddress \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
//query for the XcellAddressable Interface&lt;br /&gt;
	Reference&amp;lt; XCellAddressable &amp;gt; rCellAddr (rCell, UNO_QUERY);&lt;br /&gt;
	CellAddress rAddress = rCellAddr -&amp;gt; getCellAddress();&lt;br /&gt;
	printf(&amp;quot;sheet : %d, column : %d row: %d \n&amp;quot;,&lt;br /&gt;
				     rAddress.Sheet,rAddress.Column,rAddress.Row);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
gives us a program which writes out the absolute X and Y position of a cell.&lt;br /&gt;
&lt;br /&gt;
==Retrieve the absolute Address of the Cell Range==&lt;br /&gt;
We need first a CellRangeAddress type described in  &amp;lt;OpenOffice.org1.1_SDK&amp;gt;/idl/com/sun/star/table/CellRangeAddress.idl :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// IDL&lt;br /&gt;
module com {  module sun {  module star {  module table {&lt;br /&gt;
&lt;br /&gt;
struct CellRangeAddress&lt;br /&gt;
{&lt;br /&gt;
	short Sheet;&lt;br /&gt;
	long StartColumn;&lt;br /&gt;
	long StartRow;&lt;br /&gt;
	long EndColumn;&lt;br /&gt;
	long EndRow;&lt;br /&gt;
};&lt;br /&gt;
}; }; }; };&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and a XCellRangeAdressable interface. Starting from the cell range program, we add :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 25 Using XCellRangeAddressable Interface&lt;br /&gt;
// C++&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XCellRangeAddressable.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XCellRangeAddressable \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/CellRangeAddress.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.CellRangeAddress \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
//query for the XCellRangeAddressable interface&lt;br /&gt;
	Reference&amp;lt; XCellRangeAddressable &amp;gt; rCellRangeAddr (rCellRange, UNO_QUERY);&lt;br /&gt;
	CellRangeAddress rRangeAddress = rCellRangeAddr -&amp;gt; getRangeAddress();&lt;br /&gt;
	printf(&amp;quot;sheet : %d, start column : %d start row: %d ...\n&amp;quot;,&lt;br /&gt;
		rRangeAddress.Sheet,rRangeAddress.StartColumn,rRangeAddress.StartRow);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This program only writes out three of the five cell range attribute.&lt;br /&gt;
==Getting a Cell range with a Selection==&lt;br /&gt;
We have tackled a similar problem in section (&lt;br /&gt;
[[OpenOffice_Calc#Retrieve_or_change_the_currently_focused_Sheet|Retrieve or change the currently focused Sheet]]) The way is to also start from a XModel interface, and query with getCurrentSelection an XInterface and then query an XCellRange interface. &lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 26 Cell Range under Focus&lt;br /&gt;
// C++&lt;br /&gt;
	Reference&amp;lt; XInterface &amp;gt; rInterface = rSpreadsheetModel-&amp;gt;getCurrentSelection();&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/table/XCellRange.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.table.XCellRange \&amp;quot; in the makefile&lt;br /&gt;
	Reference&amp;lt; XCellRange &amp;gt; rCellRange(rInterface,UNO_QUERY);&lt;br /&gt;
	rCell = rCellRange -&amp;gt;getCellByPosition(0, 0);&lt;br /&gt;
	rCell-&amp;gt;setFormula(OUString::createFromAscii(&amp;quot;Hello !!!&amp;quot;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This code writes out “Hello !!!” in the top left corner of the selected range.&lt;br /&gt;
&lt;br /&gt;
=Ready to translate the Developpers Guide into C++=&lt;br /&gt;
When you want to go further, the Developers Guide is a good start. But examples are given in Java code. You have then to learn how to translate it into C++. At first glance you can find this translation as a complicate task but I have experimented it as a Java complete novice  when writing the chapter on annotation and encounter no difficulties. But I was lucky, I present now examples which give me more difficulties. &lt;br /&gt;
&lt;br /&gt;
==The Compute Function  Example==&lt;br /&gt;
Let&amp;#039;s start with Compute Function SDK&amp;#039;s example :&lt;br /&gt;
&amp;lt;code&amp;gt;[java]&lt;br /&gt;
//Listing 27  Java first Example (from SDK)&lt;br /&gt;
// Java&lt;br /&gt;
// --- Sheet operation. --- &lt;br /&gt;
// Compute a function &lt;br /&gt;
	com.sun.star.sheet.XSheetOperation xSheetOp = &lt;br /&gt;
		(com.sun.star.sheet.XSheetOperation) UnoRuntime.queryInterface&lt;br /&gt;
			(com.sun.star.sheet.XSheetOperation.class, xCellRange);&lt;br /&gt;
	double fResult = xSheetOp.computeFunction(com.sun.star.sheet.GeneralFunction.AVERAGE); 	System.out.println(&amp;quot;Average value of the data table A10:C30: &amp;quot; + fResult); &lt;br /&gt;
// Clear cell contents&lt;br /&gt;
	xSheetOp.clearContents( com.sun.star.sheet.CellFlags.ANNOTATION |&lt;br /&gt;
		 com.sun.star.sheet.CellFlags.OBJECTS);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The C++ translation gives (keeping the same variables names as in Java code) :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 28  C++ Translation : calling a buildin Function&lt;br /&gt;
// C++&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSheetOperation.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSheetOperation \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/GeneralFunction.hpp&amp;gt;&lt;br /&gt;
// and see in GeneralFunction.hdl how AVERAGE is generated : here GeneralFunction_AVERAGE&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.GeneralFunction \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/CellFlags.hpp&amp;gt;&lt;br /&gt;
// and see in CellFlags.hdl how ANNOTATION and OBJECT are generated :  here ANNOTATION, OBJECT&lt;br /&gt;
// in the namespace CellFlags donc :&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet::CellFlags;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.CellFlags \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// --- Sheet operation. ---&lt;br /&gt;
// Compute a function&lt;br /&gt;
	Reference&amp;lt; XSheetOperation &amp;gt;  xSheetOp( xCellRange,UNO_QUERY);&lt;br /&gt;
	double fResult= xSheetOp-&amp;gt;computeFunction(GeneralFunction_AVERAGE);&lt;br /&gt;
	printf(&amp;quot;Average value of the data table B2:C4: %f&amp;quot;, fResult);&lt;br /&gt;
// Clear cell contents&lt;br /&gt;
	 xSheetOp-&amp;gt;clearContents( ANNOTATION | OBJECTS);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
We can see the UNO calls are simpler in C++ than in Java. I have added comments to explain how constants are managed. We are lucky with this piece of code : we can see two different kind of constant :&lt;br /&gt;
* one with a specific name : GeneralFunction_AVERAGE instead of AVERAGE in Java. This problem of enumeration has already been tackled [[SDKCppLanguage#To_go_further_:_the_Enumeration_Type_Problem|here]].&lt;br /&gt;
* one with the same name as in IDL and Java files but in a namespace which requires the classical “using namespace”.&lt;br /&gt;
&lt;br /&gt;
To find information requires to generate hdl and hpp files from IDL files and to read not the hpp but hdl files. This job is let for novices, others can see all in IDL files : see the difference between :&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// IDL&lt;br /&gt;
// extracted from CellFlags.idl&lt;br /&gt;
constants CellFlags&lt;br /&gt;
{&lt;br /&gt;
	const long VALUE = 1;&lt;br /&gt;
	const long DATETIME = 2;&lt;br /&gt;
	const long STRING = 4;&lt;br /&gt;
	const long ANNOTATION = 8;&lt;br /&gt;
	const long FORMULA = 16;&lt;br /&gt;
	const long HARDATTR = 32;&lt;br /&gt;
	const long OBJECTS = 128;&lt;br /&gt;
	const long EDITATTR = 256;&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
// IDL&lt;br /&gt;
// extracted from GeneralFunction.idl&lt;br /&gt;
enum GeneralFunction&lt;br /&gt;
{&lt;br /&gt;
	NONE,&lt;br /&gt;
	AUTO,&lt;br /&gt;
	SUM,&lt;br /&gt;
	COUNT,&lt;br /&gt;
	AVERAGE,&lt;br /&gt;
	MAX,&lt;br /&gt;
	MIN,&lt;br /&gt;
	PRODUCT,&lt;br /&gt;
	COUNTNUMS,&lt;br /&gt;
	STDEV,&lt;br /&gt;
	STDEVP,&lt;br /&gt;
	VAR,&lt;br /&gt;
	VARP&lt;br /&gt;
};&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
and the consequences on the constants use. You can deduce tips isn&amp;#039;t it ?&lt;br /&gt;
&lt;br /&gt;
==A second Example : adding a Name to a Cell (or Cell Range)==&lt;br /&gt;
We give first the Java code still found in SDK :&lt;br /&gt;
&amp;lt;code&amp;gt;[java]&lt;br /&gt;
//Listing 29 Second Java Example&lt;br /&gt;
// Java&lt;br /&gt;
// insert a named range &lt;br /&gt;
	com.sun.star.beans.XPropertySet xDocProp = (com.sun.star.beans.XPropertySet)&lt;br /&gt;
		UnoRuntime.queryInterface(com.sun.star.beans.XPropertySet.class, xDocument);&lt;br /&gt;
	Object aRangesObj = xDocProp.getPropertyValue(&amp;quot;NamedRanges&amp;quot;);&lt;br /&gt;
	com.sun.star.sheet.XNamedRanges xNamedRanges = (com.sun.star.sheet.XNamedRanges) 			UnoRuntime.queryInterface(com.sun.star.sheet.XNamedRanges.class, aRangesObj);&lt;br /&gt;
	com.sun.star.table.CellAddress aRefPos = new com.sun.star.table.CellAddress(); 	 		aRefPos.Sheet = 0; &lt;br /&gt;
	aRefPos.Column = 6; &lt;br /&gt;
	aRefPos.Row = 44; &lt;br /&gt;
	xNamedRanges.addNewByName(&amp;quot;ExampleName&amp;quot;, &amp;quot;SUM(G43:G44)&amp;quot;, aRefPos, 0);&lt;br /&gt;
 // use the named range in formulas &lt;br /&gt;
	xSheet.getCellByPosition(6, 44).setFormula(&amp;quot;=ExampleName&amp;quot;); &lt;br /&gt;
	xSheet.getCellByPosition(7, 44).setFormula(&amp;quot;=ExampleName&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The same code in C++ :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 30 naming a Cell (Range)&lt;br /&gt;
// C++&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/beans/XPropertySet.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.beans.XPropertySet \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XNamedRanges.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XNamedRanges \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/table/CellAddress.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.table.CellAddress \&amp;quot; in the makefile&lt;br /&gt;
&lt;br /&gt;
// insert a named range &lt;br /&gt;
		// !!! rSheetDoc instead xDocument in our previous code !!!&lt;br /&gt;
 	Reference&amp;lt; XPropertySet &amp;gt; xDocProp(xDocument, UNO_QUERY); &lt;br /&gt;
	Any aRangesObj = xDocProp-&amp;gt;getPropertyValue(OUString::createFromAscii(&amp;quot;NamedRanges&amp;quot;));&lt;br /&gt;
	Reference&amp;lt; XNamedRanges &amp;gt; xNamedRanges(aRangesObj,UNO_QUERY);&lt;br /&gt;
	CellAddress aRefPos;&lt;br /&gt;
	aRefPos.Sheet = 0;&lt;br /&gt;
	aRefPos.Column = 6;&lt;br /&gt;
	aRefPos.Row = 44;&lt;br /&gt;
	xNamedRanges-&amp;gt;addNewByName(OUString::createFromAscii(&amp;quot;ExampleName&amp;quot;),&lt;br /&gt;
			OUString::createFromAscii(&amp;quot;SUM(G43:G44)&amp;quot;), aRefPos, 0);&lt;br /&gt;
 // use the named range in formulas&lt;br /&gt;
		// !!! rSpSheet instead xSheet in our previous code  !!!&lt;br /&gt;
	xSheet-&amp;gt;getCellByPosition(6, 44)-&amp;gt;setFormula(OUString::createFromAscii(&amp;quot;=ExampleName&amp;quot;));&lt;br /&gt;
	xSheet-&amp;gt;getCellByPosition(7, 44)-&amp;gt;setFormula(OUString::createFromAscii(&amp;quot;=ExampleName&amp;quot;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
We can see Object is translated by Any. You have to add “OUString::createFromAscii “ before all strings. This program names a cell “ExampleName” and gives a value associated with this name : &amp;quot;SUM(G43:G44)&amp;quot;. When you use this name it is replaced by its value.&lt;br /&gt;
&lt;br /&gt;
==A third Example==&lt;br /&gt;
Here is an other example :&lt;br /&gt;
&amp;lt;code&amp;gt;[java]&lt;br /&gt;
//Listing 31 Java third Example&lt;br /&gt;
// Java&lt;br /&gt;
// --- Cell range data --- &lt;br /&gt;
com.sun.star.sheet.XCellRangeData xData = (com.sun.star.sheet.XCellRangeData)&lt;br /&gt;
 	UnoRuntime.queryInterface(com.sun.star.sheet.XCellRangeData.class, xCellRange); &lt;br /&gt;
Object[][] aValues = { {new Double(1.1), new Integer(10)}, &lt;br /&gt;
						{new Double(2.2), new String(&amp;quot;&amp;quot;)},&lt;br /&gt;
			 			{new Double(3.3), new String(&amp;quot;Text&amp;quot;)} }; &lt;br /&gt;
xData.setDataArray(aValues);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
This very interesting example takes values from an array and put them in a cell range.&lt;br /&gt;
The code is given below :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 32 Putting Cell Range Values in an Array&lt;br /&gt;
//C++&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::sheet;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetDocument.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetDocument \&amp;quot; in the makefile&lt;br /&gt;
//query for a XSpreadsheetDocument interface&lt;br /&gt;
	Reference&amp;lt; XSpreadsheetDocument &amp;gt; rSheetDoc (xcomponent, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
//use it to get the XSpreadsheets interface&lt;br /&gt;
//	Reference&amp;lt; XSpreadsheets &amp;gt; rSheets = rSheetDoc-&amp;gt;getSheets();&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::frame;&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/frame/XModel.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.frame.XModel \&amp;quot; in the makefile&lt;br /&gt;
	Reference&amp;lt; XModel &amp;gt; rSpreadsheetModel (rSheetDoc, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
// then get the current controller from the model&lt;br /&gt;
	Reference&amp;lt; XController &amp;gt; rSpreadsheetController = &lt;br /&gt;
							rSpreadsheetModel-&amp;gt;getCurrentController();&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XSpreadsheetView.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XSpreadsheetView \&amp;quot; in the makefile&lt;br /&gt;
// get the XSpreadsheetView interface from the controller, we want to call its method&lt;br /&gt;
// setActiveSheet&lt;br /&gt;
	Reference&amp;lt; XSpreadsheetView &amp;gt; rSpreadsheetView (rSpreadsheetController, UNO_QUERY);&lt;br /&gt;
	Reference&amp;lt; XSpreadsheet&amp;gt; rSheet=rSpreadsheetView-&amp;gt;getActiveSheet();&lt;br /&gt;
&lt;br /&gt;
	Reference&amp;lt; XInterface &amp;gt; rInterface = rSpreadsheetModel-&amp;gt;getCurrentSelection();&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/table/XCellRange.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.table.XCellRange \&amp;quot; in the makefile&lt;br /&gt;
	Reference&amp;lt; XCellRange &amp;gt; rCellRange(rInterface,UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/sheet/XCellRangeData.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.sheet.XCellRangeData \&amp;quot; in the makefile&lt;br /&gt;
	Reference&amp;lt; XCellRangeData&amp;gt; xData(rCellRange, UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
// Java translation begins here .........&lt;br /&gt;
	Sequence&amp;lt; Sequence&amp;lt; Any &amp;gt; &amp;gt; aValues(3); // or aValues(1)(2); ?????&lt;br /&gt;
	Sequence&amp;lt; Any &amp;gt; aValues2(2);&lt;br /&gt;
	aValues2[0] &amp;lt;&amp;lt;=  (double) 1.1; aValues2[1] &amp;lt;&amp;lt;= (sal_Int32)10;&lt;br /&gt;
	aValues[0] = aValues2;&lt;br /&gt;
	aValues2[0] &amp;lt;&amp;lt;=  (double)2.2; aValues2[1] &amp;lt;&amp;lt;= OUString::createFromAscii(&amp;quot;&amp;quot;);&lt;br /&gt;
	aValues[1] = aValues2;&lt;br /&gt;
	aValues2[0] &amp;lt;&amp;lt;=  (double)3.3; aValues2[1] &amp;lt;&amp;lt;= OUString::createFromAscii(&amp;quot;Text&amp;quot;);&lt;br /&gt;
	aValues[2] = aValues2;&lt;br /&gt;
	xData -&amp;gt; setDataArray(aValues);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
can be compiled and works if we have an opened OOoCalc document with focus on a cell range of two rows and three lines. This is important : the cell range size must be the same as the sequence sequence of any !&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==An Example from OooForum: opening a Password protected Document==&lt;br /&gt;
Kscape posts :&lt;br /&gt;
“There is some example java code for opening a passworded file which will prompt the user for the password at [http://codesnippets.services.openoffice.org/Office/Office.openPwdProtectedFile.snip|OOo snippets] &lt;br /&gt;
but there is no example C++ code, and I cannot seem to get the services and queries around the right way. &lt;br /&gt;
Any chance someone can translate that snippet or provide a full example C++ program which will open a passworded document? &lt;br /&gt;
&lt;br /&gt;
Thanks in advance. “&lt;br /&gt;
&lt;br /&gt;
Here is the corresponding Java code :&lt;br /&gt;
&amp;lt;code&amp;gt;[java]&lt;br /&gt;
//Listing 33 Java starting Code&lt;br /&gt;
// Java&lt;br /&gt;
XInteractionHandler xHandler = (XInteractionHandler)UnoRuntime.queryInterface( XInteractionHandler.class, xSMGR.createInstance(&amp;quot;com.sun.star.task.InteractionHandler&amp;quot;));&lt;br /&gt;
&lt;br /&gt;
PropertyValue[] lArgs    = new PropertyValue[1];&lt;br /&gt;
lArgs[0] = new PropertyValue();&lt;br /&gt;
lArgs[0].Name  = &amp;quot;InteractionHandler&amp;quot;;&lt;br /&gt;
lArgs[0].Value = xHandler;&lt;br /&gt;
&lt;br /&gt;
xDoc = xDesktop.loadComponentFromURL(sURL, sTarget, nSearchFlags, lArgs);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
Here is the C++ translation :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 34 The correspnding C++ Code&lt;br /&gt;
// C++ &lt;br /&gt;
// Don&amp;#039;t forget to add : #include &amp;lt;com/sun/star/task/XInteractionHandler.hpp&amp;gt; &lt;br /&gt;
// Don&amp;#039;t forget to add &amp;quot;com.sun.star.task.XInteractionHandler \&amp;quot; in the makefile &lt;br /&gt;
// Don&amp;#039;t forget to add : using namespace com::sun::star::task; &lt;br /&gt;
&lt;br /&gt;
	Reference &amp;lt;XInteractionHandler&amp;gt; xHandler = &lt;br /&gt;
		Reference&amp;lt;XInteractionHandler&amp;gt;( rOfficeServiceManager-&amp;gt;createInstance( &lt;br /&gt;
			OUString( RTL_CONSTASCII_USTRINGPARAM( &lt;br /&gt;
				&amp;quot;com.sun.star.task.InteractionHandler&amp;quot; ))), UNO_QUERY ); &lt;br /&gt;
	if (xHandler.is()) printf(&amp;quot;xHandler OK...\n&amp;quot;); else printf(&amp;quot;Error xHandler ... \n&amp;quot;); &lt;br /&gt;
&lt;br /&gt;
	Sequence &amp;lt;PropertyValue &amp;gt; largs(1); &lt;br /&gt;
	largs[0].Name = OUString::createFromAscii(&amp;quot;InteractionHandler&amp;quot;); &lt;br /&gt;
	largs[0].Value = makeAny(xHandler); &lt;br /&gt;
&lt;br /&gt;
//get an instance of the OOoDraw document &lt;br /&gt;
	Reference&amp;lt; XComponent &amp;gt; xcomponent = rComponentLoader-&amp;gt;loadComponentFromURL( &lt;br /&gt;
		OUString::createFromAscii(&amp;quot;private:factory/sdraw&amp;quot;), &lt;br /&gt;
		OUString::createFromAscii(&amp;quot;_blank&amp;quot;), &lt;br /&gt;
		0, &lt;br /&gt;
		largs); &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
=Event Listener=&lt;br /&gt;
==First Event Listener==&lt;br /&gt;
Event listener in C++ are not documented in the Developer&amp;#039;s Guide. To find a way to resolve this problem I first read Java Code. I deduce if you want to implement an event listener you have to construct a class which inherit from a known class and then install it. My first try hang completely OOo (without a message...) After I decided to read OOo&amp;#039; source code and hope to find an example. It was the case in the file  : OOo_1.1.3_src/basic/source/basmgr/basmgr.cxx&lt;br /&gt;
If you want to do that you have to use an helper to create the class :&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 35 First Event Listener&lt;br /&gt;
// C++&lt;br /&gt;
// Don&amp;#039;t forget the #include&amp;lt;com/sun/star/view/XSelectionChangeListener.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add com.sun.star.view.XSelectionChangeListener \ in the makefile&lt;br /&gt;
&lt;br /&gt;
// Don&amp;#039;t forget the #include &amp;lt;cppuhelper/implbase1.hxx&amp;gt;&lt;br /&gt;
&lt;br /&gt;
typedef ::cppu::WeakImplHelper1&amp;lt; ::com::sun::star::view::XSelectionChangeListener &amp;gt; &lt;br /&gt;
                                                              SelectionChangeListenerHelper;&lt;br /&gt;
&lt;br /&gt;
class SelectionChangeListener : public SelectionChangeListenerHelper&lt;br /&gt;
{&lt;br /&gt;
public:&lt;br /&gt;
	SelectionChangeListener()&lt;br /&gt;
	{printf(&amp;quot;EventListener installed\n&amp;quot;);fflush(stdout);}&lt;br /&gt;
&lt;br /&gt;
	~SelectionChangeListener()&lt;br /&gt;
	{printf(&amp;quot;EventListener released\n&amp;quot;);fflush(stdout);}&lt;br /&gt;
&lt;br /&gt;
	virtual void SAL_CALL selectionChanged(const com::sun::star::lang::EventObject&amp;amp; aEvent)&lt;br /&gt;
	 throw ( RuntimeException)&lt;br /&gt;
	{&lt;br /&gt;
		printf(&amp;quot;Selection changed \n&amp;quot;);fflush(stdout);&lt;br /&gt;
	}&lt;br /&gt;
&lt;br /&gt;
	virtual void SAL_CALL disposing ( const com::sun::star::lang::EventObject&amp;amp; aEventObj )&lt;br /&gt;
		throw(::com::sun::star::uno::RuntimeException)&lt;br /&gt;
	{ printf(&amp;quot;object listened to will be disposed\n&amp;quot;); }&lt;br /&gt;
}; &lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
The selectionChanged will be called when a selection changes : it only prints out a message. The fflush(stdout) is important if you want see the printf when the event occurs (thanks to [[CppSDKAuthors|Emmanuel GUY]]).&lt;br /&gt;
Now we want to install this event listener : &lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
//Listing 36 Installing an Event Listener&lt;br /&gt;
// C++&lt;br /&gt;
// event listener&lt;br /&gt;
// Don&amp;#039;t forget the #include &amp;lt;com/sun/star/view/XSelectionSupplier.hpp&amp;gt;&lt;br /&gt;
// Don&amp;#039;t forget to add com.sun.star.view.XSelectionSupplier \ in the makefile&lt;br /&gt;
&lt;br /&gt;
	Reference&amp;lt; XSelectionSupplier &amp;gt; aSelSupp(rSpreadsheetController,UNO_QUERY);&lt;br /&gt;
&lt;br /&gt;
	SelectionChangeListener  *xListener = new SelectionChangeListener();&lt;br /&gt;
&lt;br /&gt;
	Reference&amp;lt; XSelectionChangeListener &amp;gt; xSelChListener = &lt;br /&gt;
			static_cast&amp;lt; XSelectionChangeListener* &amp;gt; ( xListener );&lt;br /&gt;
	&lt;br /&gt;
	aSelSupp-&amp;gt;addSelectionChangeListener(xSelChListener);&lt;br /&gt;
&lt;br /&gt;
	getchar();&lt;br /&gt;
	aSelSupp-&amp;gt;removeSelectionChangeListener(xSelChListener);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
We first instantiate our class as usual with a new, but we use after a static_cast before to install it with an appropriate method. For us this method is a addSelectionchangeListener(). It is important now that the program doesn&amp;#039;t terminate without removing the listener. We use the C getchar() function for that but with real program this important part has to change.&lt;br /&gt;
To test this code you have to provide a rSpreadsheetController interface. A way is to use the previous [[OpenOffice_Calc#A_third_Example|code]], removing the Java translation part. You then launch a OOocalc and select a cell range. You select an other cell range and see the message in the shell windows.&lt;br /&gt;
MichaelJ1980 in oooforum indicates he has to write&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
// C++&lt;br /&gt;
SelectionChangeListener  *xListener = ::new SelectionChangeListener();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
instead&lt;br /&gt;
&amp;lt;code&amp;gt;[cpp]&lt;br /&gt;
// C++&lt;br /&gt;
SelectionChangeListener  *xListener = new SelectionChangeListener();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==A second Event Listener==&lt;br /&gt;
Emmanuel GUY has posted an other example in OOoForum :&lt;br /&gt;
[http://www.oooforum.org/forum/viewtopic.phtml?t=14697|Use events (XEventListener, XWindowListener, ...) in C++]&lt;br /&gt;
&lt;br /&gt;
=Graphics=&lt;br /&gt;
&lt;br /&gt;
==Embedding Images==&lt;br /&gt;
&lt;br /&gt;
Adding external images to a spreadsheet is possible, and this is different from linking to images. [http://codesnippets.services.openoffice.org/Calc/Calc.InsertImage.snip Linking to images] requires a user to have an external file that is always in the same location relative to the spreadsheet file, while embedding an image deals with including the image in the ODS file itself.&lt;br /&gt;
&lt;br /&gt;
First, suppose we have a model implementing the XModel interface, and is related to a spreadsheet. We can get the spreadsheet and current (active) sheet using the code below:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[java]&lt;br /&gt;
XSpreadsheetDocument xDoc = (XSpreadsheetDocument)UnoRuntime.queryInterface(XSpreadsheetDocument.class, xDocModel);&lt;br /&gt;
XSpreadsheetView xsv = (XSpreadsheetView)UnoRuntime.queryInterface(XSpreadsheetView.class, m_xFrame.getController());&lt;br /&gt;
XSpreadsheet curSheet = xsv.getActiveSheet();&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Next, we need to create a XMultiServiceFactory object so we can create components in the actual file. We&amp;#039;ll create a BitmapTable, which will be tricked into storing the image internally (([http://codesnippets.services.openoffice.org/Writer/Writer.EmbedAGraphicIntoATextdocument.snip source for Writer]).&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[java]&lt;br /&gt;
XMultiServiceFactory xmsf = (XMultiServiceFactory)UnoRuntime.queryInterface(XMultiServiceFactory.class, xDocModel);&lt;br /&gt;
XNameContainer xBitmapContainer = (XNameContainer) UnoRuntime.queryInterface(&lt;br /&gt;
	XNameContainer.class, xmsf.createInstance(&amp;quot;com.sun.star.drawing.BitmapTable&amp;quot;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The file itself is added to the container as a link, similar to how URLs are represented online. Thus, a path to an image in a user&amp;#039;s home directory on Linux would be &amp;#039;&amp;#039;file:///home/username/image.png&amp;#039;&amp;#039;. We add this link to the container, and then use the &amp;#039;&amp;#039;AnyConverter&amp;#039;&amp;#039; class to get a URL to the container itself, called the &amp;#039;&amp;#039;internalURL&amp;#039;&amp;#039;. This &amp;#039;&amp;#039;internalURL&amp;#039;&amp;#039; will be used as the new link to the (now internal) image.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[java]&lt;br /&gt;
String sPath = &amp;quot;file:///home/wojciech/Desktop/img.png&amp;quot;; &lt;br /&gt;
xBitmapContainer.insertByName(&amp;quot;someID&amp;quot;, sPath);&lt;br /&gt;
String internalURL = AnyConverter.toString(xBitmapContainer.getByName(&amp;quot;someID&amp;quot;));&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The image itself is stored as an XShape object, which is created below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[java]&lt;br /&gt;
Object imgTemp = xmsf.createInstance(&amp;quot;com.sun.star.drawing.GraphicObjectShape&amp;quot;);&lt;br /&gt;
XShape xImage = (XShape)UnoRuntime.queryInterface(XShape.class, imgTemp);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Now we set the properties of the actual shape (and image):&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[java]&lt;br /&gt;
XPropertySet xpi = ( XPropertySet )UnoRuntime.queryInterface(XPropertySet.class, xImage );&lt;br /&gt;
xpi.setPropertyValue(&amp;quot;GraphicURL&amp;quot;, internalURL);&lt;br /&gt;
Size imgSize = new Size(2500, 5000);&lt;br /&gt;
xImage.setSize(imgSize);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And finally, we get the necessary objects to draw in the spreadsheet itself, and we draw the image. The last line of code simply removes the image entry from the temporary container.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;[java]&lt;br /&gt;
XDrawPageSupplier oDPS = (XDrawPageSupplier) UnoRuntime.queryInterface(XDrawPageSupplier.class, curSheet);&lt;br /&gt;
XDrawPage xDrawPage = oDPS.getDrawPage();  &lt;br /&gt;
xDrawPage.add(xImage);&lt;br /&gt;
xBitmapContainer.removeByName(&amp;quot;someID&amp;quot;);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{Template:Home_Page}}&lt;br /&gt;
&lt;br /&gt;
= See also=&lt;br /&gt;
&lt;br /&gt;
* [http://perso.wanadoo.fr/moutou/MyUNODoc_HTML/UNOCppAPI5.html OpenOffice Calc] (Chapter 5 from UNO/C++ document) &lt;br /&gt;
* Writing a Program to Control OpenOffice.org, by Franco Pingiori — [http://www.linuxjournal.com/article/8550 Part 1] and [http://www.linuxjournal.com/article/8608 Part 2], Linux Journal&lt;br /&gt;
&lt;br /&gt;
[[Category:Calc|API]]&lt;br /&gt;
[[Category:API]]&lt;br /&gt;
[[Category:Development]]&lt;br /&gt;
[[Category:Cpp]]&lt;br /&gt;
[[Category:Uno]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=41818</id>
		<title>R and Calc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=41818"/>
		<updated>2007-08-10T05:23:30Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;blockquote style=&amp;quot;background: white; border: 1px solid rgb(153, 153, 153); padding: 1em;&amp;quot;&amp;gt;This page is meant as a general overview and installation guide for the software. Please see [[R and Calc Documentation]] for more information on functions, scripting, and general usage.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;R and Calc&amp;quot; is an [[OpenOffice.org]] (OO.o) [[Calc]] add-on that allows you to use [http://www.r-project.org/ R] methods and functions. The software is currently in early development, though a &amp;#039;&amp;#039;&amp;#039;basic&amp;#039;&amp;#039;&amp;#039; working version does exist, and is available for download.&lt;br /&gt;
&lt;br /&gt;
We welcome any and all comments and name suggestions. Please send them to [[User:Wojciech|Wojciech Gryc]].&lt;br /&gt;
&lt;br /&gt;
For those who come here often, here is the latest version:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Version:&amp;#039;&amp;#039;&amp;#039; 0.1.4&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Release Date:&amp;#039;&amp;#039;&amp;#039; August 10, 2007 (1:22 am EST)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Link:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-10/RAddon.uno.pkg&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Source Code:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-10/rcalc-0_1_4.zip&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Manual:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-10/manual.pdf&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
You need the following software to run this add-on. While older versions may suffice, they have not been tested yet.&lt;br /&gt;
* OpenOffice.org 2.1&lt;br /&gt;
* Java 1.5.0&lt;br /&gt;
* RServe 0.4.7&lt;br /&gt;
&lt;br /&gt;
==Installing==&lt;br /&gt;
&lt;br /&gt;
The current version is a prototype and implements only one tool: RDUMP. This method is accessed through the actual Calc menu, and allows you to see the R object structure for various method calls. &lt;br /&gt;
&lt;br /&gt;
To use the add-on, you need to install R and [http://www.rforge.net/Rserve Rserve]. Instructions for installing R can be found at http://www.r-project.org/ Once installed, run R and type the following to install Rserve. Click &amp;quot;enter&amp;quot; at the end of each bullet point:&lt;br /&gt;
&lt;br /&gt;
* install.packages(&amp;quot;Rserve&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Rserve needs to be running to work, and can be launched with the following commands... Note that you only need to do this when you want to use the R Add-on for Calc.&lt;br /&gt;
&lt;br /&gt;
* library(Rserve)&lt;br /&gt;
* Rserve()&lt;br /&gt;
&lt;br /&gt;
Now that you have the prerequisites installed, download the package RAddon.uno.pkg (linked above). Unzip the file, and let&amp;#039;s call the directory you unzipped it in &amp;lt;RA_DIR&amp;gt;. Now let &amp;lt;OO_HOME&amp;gt; be your OpenOffice.org installation directory. Open the command prompt or terminal window and go to &amp;lt;OO_HOME&amp;gt;/program/ and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg add &amp;lt;RA_DIR&amp;gt;/RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
If this is not your first time installing the add-in, you need to check if a previous version is also on the system. If it is, then you will not be able to install the new version. To do this, go to &amp;lt;OO HOME&amp;gt;/program and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg list&lt;br /&gt;
&lt;br /&gt;
This will show you the list of packages already installed, and you should be able to check if the add-is is there. Remember to look for &amp;quot;RAddon.uno.pkg&amp;quot;. You can also skip this step and try to uninstall RAddon.uno.pkg regardless -- this will not harm your OpenOffice.org installation in any way, even if RAddon.uno.pkg is abset. To do this, type:&lt;br /&gt;
&lt;br /&gt;
* unopkg remove RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
Finally, some operating systems require that you restart your OpenOffice.org installation (if you&amp;#039;re not sure, restart your computer) to be able to see the cell functions that come with this package.&lt;br /&gt;
&lt;br /&gt;
==Using==&lt;br /&gt;
&lt;br /&gt;
Using the add-on is very simple at this stage. To see the tool at work, open Calc. In the menus, go to R Add-on &amp;gt; Rdump(). A new dialog window will pop up. Type in an R script -- here are some examples:&lt;br /&gt;
&lt;br /&gt;
* rnorm(10)&lt;br /&gt;
* cor.test(c(1,2,3,4), c(1,2,2,3))&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Run&amp;quot;. A new sheet should appear. Close the dialog with &amp;quot;Close&amp;quot; and check the new sheet -- you should see various pieces of information on the sheet.&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
So far, the software has been tested on the following.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.0===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 6 running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP running running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
==Known Issues==&lt;br /&gt;
&lt;br /&gt;
Yes, we already have some known issues! That&amp;#039;s OK, these are common issues and are not problematic with regards to the code:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #1 (&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Fixed in 0.1.1&amp;lt;/font&amp;gt;):&amp;#039;&amp;#039;&amp;#039; Strings and characters, when part of the R object model, do not get published in Rdump().&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #2:&amp;#039;&amp;#039;&amp;#039; RDUMP() does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #3:&amp;#039;&amp;#039;&amp;#039; Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
&lt;br /&gt;
==About==&lt;br /&gt;
&lt;br /&gt;
This add-on is the result of a Google [[Summer of Code 2007]] project. It was initially created by [[User:Wojciech|Wojciech Gryc]]. For information pertaining to the development of this add-on, see [http://www.11-55.org/ooblog/ Wojciech&amp;#039;s Blog].&lt;br /&gt;
&lt;br /&gt;
==Older Versions==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.3&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-02/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-02/rcalc-0_1_3.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.2&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-06-01/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-06-01/rcalc-0_1_2.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.1&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-25/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-25/rcalc-0_1_1.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.0&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-15/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-15/rcalc-0.1.0.zip Source Code])&lt;br /&gt;
&lt;br /&gt;
[[Category:Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
	<entry>
		<id>https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=41817</id>
		<title>R and Calc</title>
		<link rel="alternate" type="text/html" href="https://wiki.openoffice.org/w/index.php?title=R_and_Calc&amp;diff=41817"/>
		<updated>2007-08-10T05:23:10Z</updated>

		<summary type="html">&lt;p&gt;Wojciech: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;blockquote style=&amp;quot;background: white; border: 1px solid rgb(153, 153, 153); padding: 1em;&amp;quot;&amp;gt;This page is meant as a general overview and installation guide for the software. Please see [[R and Calc Documentation]] for more information on functions, scripting, and general usage.&amp;lt;/blockquote&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;R and Calc&amp;quot; is an [[OpenOffice.org]] (OO.o) [[Calc]] add-on that allows you to use [http://www.r-project.org/ R] methods and functions. The software is currently in early development, though a &amp;#039;&amp;#039;&amp;#039;basic&amp;#039;&amp;#039;&amp;#039; working version does exist, and is available for download.&lt;br /&gt;
&lt;br /&gt;
We welcome any and all comments and name suggestions. Please send them to [[User:Wojciech|Wojciech Gryc]].&lt;br /&gt;
&lt;br /&gt;
For those who come here often, here is the latest version:&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Version:&amp;#039;&amp;#039;&amp;#039; 0.1.3&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Release Date:&amp;#039;&amp;#039;&amp;#039; August 10, 2007 (1:22 am EST)&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Link:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-10/RAddon.uno.pkg&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Source Code:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-10/rcalc-0_1_4.zip&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Manual:&amp;#039;&amp;#039;&amp;#039; http://www.11-55.org/rcalc/2007-08-10/manual.pdf&lt;br /&gt;
&lt;br /&gt;
==Requirements==&lt;br /&gt;
&lt;br /&gt;
You need the following software to run this add-on. While older versions may suffice, they have not been tested yet.&lt;br /&gt;
* OpenOffice.org 2.1&lt;br /&gt;
* Java 1.5.0&lt;br /&gt;
* RServe 0.4.7&lt;br /&gt;
&lt;br /&gt;
==Installing==&lt;br /&gt;
&lt;br /&gt;
The current version is a prototype and implements only one tool: RDUMP. This method is accessed through the actual Calc menu, and allows you to see the R object structure for various method calls. &lt;br /&gt;
&lt;br /&gt;
To use the add-on, you need to install R and [http://www.rforge.net/Rserve Rserve]. Instructions for installing R can be found at http://www.r-project.org/ Once installed, run R and type the following to install Rserve. Click &amp;quot;enter&amp;quot; at the end of each bullet point:&lt;br /&gt;
&lt;br /&gt;
* install.packages(&amp;quot;Rserve&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
Rserve needs to be running to work, and can be launched with the following commands... Note that you only need to do this when you want to use the R Add-on for Calc.&lt;br /&gt;
&lt;br /&gt;
* library(Rserve)&lt;br /&gt;
* Rserve()&lt;br /&gt;
&lt;br /&gt;
Now that you have the prerequisites installed, download the package RAddon.uno.pkg (linked above). Unzip the file, and let&amp;#039;s call the directory you unzipped it in &amp;lt;RA_DIR&amp;gt;. Now let &amp;lt;OO_HOME&amp;gt; be your OpenOffice.org installation directory. Open the command prompt or terminal window and go to &amp;lt;OO_HOME&amp;gt;/program/ and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg add &amp;lt;RA_DIR&amp;gt;/RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
If this is not your first time installing the add-in, you need to check if a previous version is also on the system. If it is, then you will not be able to install the new version. To do this, go to &amp;lt;OO HOME&amp;gt;/program and type:&lt;br /&gt;
&lt;br /&gt;
* unopkg list&lt;br /&gt;
&lt;br /&gt;
This will show you the list of packages already installed, and you should be able to check if the add-is is there. Remember to look for &amp;quot;RAddon.uno.pkg&amp;quot;. You can also skip this step and try to uninstall RAddon.uno.pkg regardless -- this will not harm your OpenOffice.org installation in any way, even if RAddon.uno.pkg is abset. To do this, type:&lt;br /&gt;
&lt;br /&gt;
* unopkg remove RAddon.uno.pkg&lt;br /&gt;
&lt;br /&gt;
Finally, some operating systems require that you restart your OpenOffice.org installation (if you&amp;#039;re not sure, restart your computer) to be able to see the cell functions that come with this package.&lt;br /&gt;
&lt;br /&gt;
==Using==&lt;br /&gt;
&lt;br /&gt;
Using the add-on is very simple at this stage. To see the tool at work, open Calc. In the menus, go to R Add-on &amp;gt; Rdump(). A new dialog window will pop up. Type in an R script -- here are some examples:&lt;br /&gt;
&lt;br /&gt;
* rnorm(10)&lt;br /&gt;
* cor.test(c(1,2,3,4), c(1,2,2,3))&lt;br /&gt;
&lt;br /&gt;
Then click &amp;quot;Run&amp;quot;. A new sheet should appear. Close the dialog with &amp;quot;Close&amp;quot; and check the new sheet -- you should see various pieces of information on the sheet.&lt;br /&gt;
&lt;br /&gt;
==Testing==&lt;br /&gt;
&lt;br /&gt;
So far, the software has been tested on the following.&lt;br /&gt;
&lt;br /&gt;
===Version 0.1.0===&lt;br /&gt;
&lt;br /&gt;
* Fedora Core 6 running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
* Ubuntu Edgy Eft running SDK 1.5.0_08 and OpenOffice 2.1.&lt;br /&gt;
* Windows XP running running JDK 1.6.0_01 and OpenOffice 2.2.&lt;br /&gt;
&lt;br /&gt;
==Known Issues==&lt;br /&gt;
&lt;br /&gt;
Yes, we already have some known issues! That&amp;#039;s OK, these are common issues and are not problematic with regards to the code:&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #1 (&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Fixed in 0.1.1&amp;lt;/font&amp;gt;):&amp;#039;&amp;#039;&amp;#039; Strings and characters, when part of the R object model, do not get published in Rdump().&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #2:&amp;#039;&amp;#039;&amp;#039; RDUMP() does not print matrices and frames properly, but prints columns instead.&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;Issue #3:&amp;#039;&amp;#039;&amp;#039; Missing values -- need a good way to deal with missing values. We cannot use a test for non-numeric values because of Factors in R.&lt;br /&gt;
&lt;br /&gt;
==About==&lt;br /&gt;
&lt;br /&gt;
This add-on is the result of a Google [[Summer of Code 2007]] project. It was initially created by [[User:Wojciech|Wojciech Gryc]]. For information pertaining to the development of this add-on, see [http://www.11-55.org/ooblog/ Wojciech&amp;#039;s Blog].&lt;br /&gt;
&lt;br /&gt;
==Older Versions==&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.3&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-08-02/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-08-02/rcalc-0_1_3.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.2&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-06-01/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-06-01/rcalc-0_1_2.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.1&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-25/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-25/rcalc-0_1_1.zip Source Code])&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;0.1.0&amp;#039;&amp;#039;&amp;#039;: [http://www.11-55.org/rcalc/2007-05-15/RAddon.uno.pkg UNO Package] ([http://www.11-55.org/rcalc/2007-05-15/rcalc-0.1.0.zip Source Code])&lt;br /&gt;
&lt;br /&gt;
[[Category:Calc]]&lt;/div&gt;</summary>
		<author><name>Wojciech</name></author>
	</entry>
</feed>