[R] solve scalar linear equation

Rui Barradas ruipbarradas at sapo.pt
Tue May 20 00:04:27 CEST 2014


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
> 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 able to
> find a very basic description to solve simple equations (as an initial
> learning stage). Thanks.
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list