title: R Functions: Print Warning Only on First Call of Function
body: <p>So I'm trying to write a function that prints an error message, but <em>only on the first time the user calls the function</em>.  If they open R, load the library, and call the function, it will print a warning message.  If they call the function again, it will not print this warning message.  If they close R and do the same process, it will print the warning message for the first call and not on the second. I understand the idea of the basic warning() function in R, but I don't see any documentation in the help file for this kind of condition.  Does anyone know of a function or a condition that could be used with the warning() function that would be able to solve this?  Thanks! I am working on a project where the professor in charge needs this for some sort of copyright thing and he wants it to be this way.</p>