• Register
0 votes
138 views

Problem :

My R code is giving me following error
promise already under evaluation: recursive default argument reference or earlier problems?
6 5 3
6,930 points

1 Answer

0 votes

Solution :

Formal arguments of the form x=x are causing this issue. So eliminating them we get the updated and working code as follows:

f <- function(x, T) {
   10 * sin(0.3 * x) * sin(1.3 * x^2) + 0.001 * x^3 + 0.2 * x + 80 
}

g <- function(x, T, f. = f) {## 1.just note f.
   exp(-f.(x)/T) 
}

test<- function(g. = g, T = 1) {## 2.just note g.
   g.(1,T) 
}

9 7 4
38,600 points

Related questions

0 votes
1 answer 14 views
1 vote
1 answer 515 views
515 views
Problem : Currently I am learning the r programming. I am unable to find the answer to below error but I am unable to do so. Currently I have one dataframe it has a column of strings. My task is to count the exact number of characters present in each entry of ... , with no default Error in match.fun(FUN): argument "FUN" is missing, with no default Can someone guide me in fixing above error?
asked Mar 30 morrisBson 3.2k points
0 votes
1 answer 125 views
125 views
Problem: I have only the fundamental knowledge related to R. I want to simulate the very basic moving average process in R which is as shown below for your reference: x_t = Z_(t-1)-0.4Z_(t-2)+Z_t. Please find below my code in R: z = rnorm(500, 0, 1) x ... was unable to find the exact solution for my above error. I am looking for some help from R expert if possible to fix my above R related error.
asked Aug 12 Raphael Pacheco 4.9k points