r - Define variables in an implicit way -


I wanted to know how I can define a variable in R in an inherent way

For example, suppose i have z

Obviously, if I z , I have the following error: error in beta (x, y): object 'y' not found .

I tried to find a solution in Google, but I did not find anything strange.

Thank you in advance!

For your example you can search for the value of y uniroot $ root [1] $ 1. F.Rote [1] -1.08689e-07 $ ITR [1] $ 13 estimated [1] 6.103516-05 beta (x, y $ root) == z [1] FALSE All.equal (beta (x, y $ root), z, tol = 1e-5) [1] TRUE beta (x , 1) == z [1] TRUE

Although it depends on many assumptions such that only one value is being made to satisfy the equation and you make it a sensible interval Are able to deliver. Normally your functions can not accept solutions, and if you need to calculate a large number of Y values, then it may be slow to calculate. You should also consider that a numerical solution can not be accurate, so care will be required with comparison.

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -