Welcome to Software Development on Codidact!
Will you help us build our independent community of developers helping developers? We're small and trying to grow. We welcome questions about all aspects of software development, from design to code to QA and more. Got questions? Got answers? Got code you'd like someone to review? Please join us.
Comments on How can I assign the result of an operation from within a function to the global environment?
Post
How can I assign the result of an operation from within a function to the global environment?
+2
−0
I have a function that which does some calculations. I would like to assign the result of the function to the global environment from within the function, how do I proceed?
A minimal example:
meanFUN <- function(x) {
mean(x, na.rm = TRUE)
}
How can I assign the result from mean(x, na.rm = TRUE)
from within the function to the global environment?
1 comment thread