R programming: Linear Equation

0 votes

Is it possible in R, to list a set of certain possible values for a given equation? For example:

Fora, b, and c with the formula a^3 + b^2 = c.

How can this be tested for all combinations of a and b such that a and b are less than 1000 and c to satisfy the formula and check if the variables are also valid inputs?

Apr 30 in Data Analytics by Tyrion anex
• 8,280 points
10 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes

Use expand.grid to get all possible combinations and then subset the ones you require:

vals <- expand.grid(x=seq(1000), y=seq(1000))
subset(vals, a^3 + b^2 == 108)
#      a  b
# 8003 3  9
# 9002 2 10
answered Apr 30 by Sophie may
• 9,250 points

Related Questions In Data Analytics

0 votes
1 answer
0 votes
1 answer

Steps to evaluate Linear Regression in R

 These are sequential steps which need to ...READ MORE

answered Jul 25, 2018 in Data Analytics by CodingByHeart77
• 3,680 points
79 views
0 votes
1 answer

What are the rules to define a variable name in R programming language?

A variable name in R programming language ...READ MORE

answered Sep 7, 2018 in Data Analytics by zombie
• 3,690 points
61 views
0 votes
1 answer

How can I create log linear models in R language?

By using the loglm () function  READ MORE

answered Oct 10, 2018 in Data Analytics by zombie
• 3,690 points
19 views
+4 votes
2 answers
0 votes
1 answer

R programming: Linear programming problems

The documentation for the lp package provides ...READ MORE

answered Feb 4 in Data Analytics by Tyrion anex
• 8,280 points
50 views
+1 vote
2 answers
0 votes
1 answer

R programming logic

Use gsub to match the substring that we want ...READ MORE

answered Nov 16, 2018 in Data Analytics by Maverick
• 10,020 points
17 views
0 votes
1 answer

R Programming: matrices

Try this, It will test if a matrix ...READ MORE

answered Dec 17, 2018 in Data Analytics by Sophie may
• 9,250 points
19 views
0 votes
1 answer

R programming: Unexpected symbol error

Format your code this way: myfunction <- function() ...READ MORE

answered Dec 17, 2018 in Data Analytics by Sophie may
• 9,250 points
131 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.