search for: pythagorean

Displaying 11 results from an estimated 11 matches for "pythagorean".

Did you mean: pythagoras
2004 Jun 21
2
Elementary sapply question
...values = c(2,4,8) | values = c(2,4,8) answers=numeric(3) | answers = sapply(values, f) for (i in 1:3) { | answers[i] = f(values[i]) | } | and this is cool! My problem is this. Suppose I have: pythagorean <- function(x, y) { return(x*x + y*y) } then how do I utilise sapply to replace fixed.x = 3 y.values = c(3,4,5) answers=numeric(3) for (i in 1:3) { answers[i] = pythagorean(fixed.x, y.values[i]) } ? I have read the sapply docs, and don't know...
2012 Dec 18
1
Breaking out of multiple loops
Hey all, I'm currently working through the problems at Project Euler -- this question came up while working on Problem 9 (http://projecteuler.net/problem=9): "A Pythagorean triplet is a set of three natural numbers, a < b < c, for which, a^2 + b^2 = c^2. For example, 3^2 + 4^2 = 9 + 16 = 25 = 5^2. There exists exactly one Pythagorean triplet for which a + b + c = 1000. Find the product abc." Not too hard: n=1000 for(i in 1:floor(n/3)) for(j in (i+1):flo...
2005 Nov 09
2
Variograms and large distances
Hello R list, I need to compute empirical variograms using data from a large geographic area (~10^6 km2). Although I could not find a specific reference, I assume that both geoR and gstat calculate distances among data points assuming points are on a flat surface (using the Pythagorean Theorem). Because the location of my data is large and located near the pole, assuming that latitude and longitude are coordinates on a flat surface would introduce a -possibly large- bias in the empirical variogram estimate. My questions are the following: a) Does geoR and gstat assume tha...
2007 Oct 18
3
Managehome not working in User type in Linux OS
I am using the user type function as below to create and manage user accounts in RHEL, CentOS, Ubuntu, FreeBSD & BSD, I have only tried on RHEL, CentOS it works fine for user creation, but not managing homedirectory. I ran puppetd -test in Ubuntu it showed the below message in debug mode Ubuntu(Debian), don''t create homedirectory unless -m arg is passed. [0;34mdebug:
2006 Jun 16
2
Effect size in mixed models
Hello, Is there a way to compare the relative relevance of fixed and random effects in mixed models? I have in mind measures of effect size in ANOVAs, and would like to obtain similar information with mixed models. Are there information criteria that allow to compare the relevance of each of the effects in a mixed model to the overall fit? Thank you, Bruno
2006 Sep 29
0
ANNOUNCE: Facter 1.3.5
This fixes a very small bug: On non-linux OSes, facter was printing to STDERR a message that lsb_release was missing. This is now fixed. -- On Bureaucracy.... The Pythagorean theorem contains 24 words. Archimedes Principle, 67. The Ten Commandments, 179. The American Declaration of Independence, 300. And recent legislation in Europe concerning when and where to smoke, 23,942. -- The European, June 23-29, 1995 -------------------------------------------------------...
2012 Jul 18
1
Regression Identity
Hi, I see a lot of folks verify the regression identity SST = SSE + SSR numerically, but I cannot seem to find a proof. I wonder if any folks on this list could guide me to a mathematical proof of this fact. Thanks. David. -- View this message in context: http://r.789695.n4.nabble.com/Regression-Identity-tp4636829.html Sent from the R help mailing list archive at Nabble.com.
2008 Dec 09
2
Better way to find distances between points in a set?
I was playing around a bit to see how I could find the two points in a set of points (or ordered pairs) furthest from each other. Here's what I did: 1) created a Nrow by 2col matrix, so each row contains an x,y coordinate pair. 2) fed the matrix to a nested mapply (cv is my matrix): mapply(function(k,l) mapply(function(x,y,a,b) +
2007 Jun 12
6
ensure => latest forcing recompile?
I''m running puppet from svn - build 2537. I''ve got a functional configuration and am testing it on a couple of development machines prior to moving it into production. I noticed today that the machines are taking ~300 seconds to process their configurations, so i watched a run and saw that it''s recompiling all of the Packages every single time. The only thing
2006 Dec 07
9
Exec as another user
I''m running puppetd as root and I''m trying to execute tar as the "puppetd" user 59 define untar ( $source, $dest, $creates, $user = "puppetd" ) { 60 exec { "tar -xzf $source" : 61 cwd => $dest, 62 path => "/bin:/usr/bin", 63 user => $user, 64 creates => $creates,
2007 Jan 23
20
"Found a bug" message when purging services
I attempted the following: resources { service: purge => true, noop => true } service { sshd: ensure => running; iptables ensure => running; } And got the following message: notice: Starting configuration run err: Found a bug: uninitialized constant Parse notice: Finished configuration run in 0.47 seconds When I remove the ''resources'' line, everything works