I want to clean my R code, therefore i want to write several RScript's and call the Functions there, but i have no idea how to do this.
For example, I have the following call in my Main Class:
G = function(x) {
return(-exp(-1i * x) * Conj(H(x+pi)) )
}
and the function H is written in an other R script as follows
H = function(x) {
return (exp(-1i * x / 2) * cos(x / 2) )
}
Both RScripts are in the same Project but my Main Class doesen't recognize the function H.
Where is my error?
Thanks in anticipation
Matthias
Gis dependent on functionH. Did you defineHbefore you definedG?rm(list=c("H"))? Wouldn't that removeHfrom your environment?