<html>
<head>
</head>
<body>
..many thanks !<br>
<br>
Achim Zeileis wrote:<br>
<blockquote type="cite" cite="mid:3CBEAA78.22703647@ci.tuwien.ac.at">
<pre wrap="">Christian Schulz wrote:<br></pre>
<blockquote type="cite">
<pre wrap="">Have got any R-proffessional a starting point for me<br>how i can write me a function which multiply every column with<br>every other column in the data.frame - indenpendent from the dim's .<br></pre>
</blockquote>
<pre wrap=""><!----><br>You could start from a function that multiplies a chosen column `col' of<br>a data.frame `df' with the following columns<br><br> multiply <- function(df, col) df[,col] * df[,-(1:col), drop = FALSE]<br><br>and then apply that to your data.frame `mydata' like<br><br> sapply(1:(ncol(mydata) - 1), function(x) multiply(mydata, x))<br><br>For the latter part, there might be a better way to do that depending on<br>how you want to format the output...<br>Z <br><br></pre>
<blockquote type="cite">
<pre wrap="">Thanks in advance<br>regards,Christian<br><br>-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-<br>r-help mailing list -- Read <a class="moz-txt-link-freetext" href="http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html">http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html</a><br>Send "info", "help", or "[un]subscribe"<br>(in the "body", not the subject !) To: <a class="moz-txt-link-abbreviated" href="mailto:r-help-request@stat.math.ethz.ch">r-help-request@stat.math.ethz.ch</a><br>_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._<br></pre>
</blockquote>
<pre wrap=""><!---->-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-<br>r-help mailing list -- Read <a class="moz-txt-link-freetext" href="http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html">http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html</a><br>Send "info", "help", or "[un]subscribe"<br>(in the "body", not the subject !) To: <a class="moz-txt-link-abbreviated" href="mailto:r-help-request@stat.math.ethz.ch">r-help-request@stat.math.ethz.ch</a><br>_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._<br><br></pre>
</blockquote>
<br>
<pre class="moz-signature" cols="$mailwrapcol">--
Mit freundlichen Grüßen
Christian Schulz
MetaFacts GmbH
Fon: +49 (0)30 69 51 71 - 0
Fax: +49 (0)30 69 51 71 - 33
<a class="moz-txt-link-freetext" href="mailto:c.schulz@metafacts.de">mailto:c.schulz@metafacts.de</a>
<a class="moz-txt-link-freetext" href="http://www.metafacts.de">http://www.metafacts.de</a>
</pre>
<br>
</body>
</html>