Re: [R] solve scalar linear equation

2014-05-22 Thread message
On 2014-05-20 10:00, r-help-requ...@r-project.org wrote: -- Message: 32 Date: Mon, 19 May 2014 23:04:27 +0100 From: Rui Barradas ruipbarra...@sapo.pt To: message let...@openmailbox.org, r-help@r-project.org uniroot(function(x) 5*x - 55, c(0, 20)) Why does this

Re: [R] solve scalar linear equation

2014-05-22 Thread Berend Hasselman
On 22-05-2014, at 12:28, message let...@openmailbox.org wrote: On 2014-05-20 10:00, r-help-requ...@r-project.org wrote: -- Message: 32 Date: Mon, 19 May 2014 23:04:27 +0100 From: Rui Barradas ruipbarra...@sapo.pt To: message let...@openmailbox.org,

Re: [R] solve scalar linear equation

2014-05-22 Thread Rui Barradas
Hello, Because there is no root of that function in the interval c(0, 10). Just like the error message says. Rui Barradas Em 22-05-2014 11:28, message escreveu: On 2014-05-20 10:00, r-help-requ...@r-project.org wrote: -- Message: 32 Date: Mon, 19 May 2014

Re: [R] solve scalar linear equation

2014-05-22 Thread message
On 2014-05-22 11:00, Berend Hasselman wrote: uniroot(function(x) 5*x - 55, c(0, 10)) Error in uniroot(function(x) 5 * x - 55, c(0, 10)) : f() values at end points not of opposite sign I don’t believe this. The error message says it all. 5*0-55 == -55 5*10-55 == -5 The error states

Re: [R] solve scalar linear equation

2014-05-22 Thread Rui Barradas
Hello, See inline. Em 22-05-2014 13:35, message escreveu: On 2014-05-22 11:00, Berend Hasselman wrote: uniroot(function(x) 5*x - 55, c(0, 10)) Error in uniroot(function(x) 5 * x - 55, c(0, 10)) : f() values at end points not of opposite sign I don’t believe this. The error message says

Re: [R] solve scalar linear equation

2014-05-22 Thread Berend Hasselman
On 22-05-2014, at 14:35, message let...@openmailbox.org wrote: On 2014-05-22 11:00, Berend Hasselman wrote: uniroot(function(x) 5*x - 55, c(0, 10)) Error in uniroot(function(x) 5 * x - 55, c(0, 10)) : f() values at end points not of opposite sign I don’t believe this. The error message

[R] solve scalar linear equation

2014-05-19 Thread message
Readers, The function 'solve' states that it is applicable to a vector or matrix object. Please what is the syntax to solve a very simple equation like: 5x + 1 = 56 The books read so far give explanations for simultaneous linear equations or differential equations, but there have not been

Re: [R] solve scalar linear equation

2014-05-19 Thread Rui Barradas
Hello, Try ?uniroot instead. Your equation is equivalent to 5x - 55 = 0, so the instruction would be uniroot(function(x) 5*x - 55, c(0, 20)) Hope this helps, Rui Barradas Em 19-05-2014 14:46, message escreveu: Readers, The function 'solve' states that it is applicable to a vector or matrix