Этот кусок кода находится внутри функции, которую я пишу.Моя проблема в двух последних строках.
cournot_2 = function(q0_1 = 0, c1 = 1, c1_2 = 0,
q0_2 = 0, c2 = 1, c2_2 = 0,
p_0, a = 1, b = 0) {
firm1 = quote(q0_1 + c1 * q1 + c1_2 * q1) ## firm 1's cost curve
firm2 = quote(q0_2 + c2 * q2 + c2_2 * q2) ## firm 2's cost curve
q = quote(q1 + q2) #total supply
demand = quote(p_0 + a*q + b * q^2) # market demand curve
mg_cost1 = D(firm1, "q1") #firm 1's marginal cost/ supply curve
mg_cost2 = D(firm2, "q2") # firm 2's marginal cost/ supply curve
profit1 = (mg_cost1*demand) - firm1 #each firm's profit curve
profit2 = (mg_cost2*demand) - firm2
mg_costi
и demand
- это кавычки, но, по-видимому, нельзя умножать кавычки просто с помощью операции "*", что было бы целесообразно при умножении переменных.Итак, что мне делать?