Message-ID: <1351294455262-4647621.post@n4.nabble.com>
Date: 2012-10-26T23:34:15Z
From: sffarooqi
Subject: summation sign
Hi all,
I have a very quick question on how to use the summation sign in R for the
function.
Here?s a basic example: the function is sum(i=1 to 5)log(1-xi^2)
Id be grateful if someone knows how to do this without writing it out 5
times - I am looking sth along the lines of the following:
computeR <- function(x)
{
return (-sum(log(1-x^2))
}^
thank you vm in advance!
--
View this message in context: http://r.789695.n4.nabble.com/summation-sign-tp4647621.html
Sent from the R help mailing list archive at Nabble.com.