I'm new to R and am trying to learn how to create my own functions.
I'm wondering why my following function and subsequent function call
func <- function(data) {
new_data <- data
return(new_data)
}
func(iris)
does not create the data frame new_data?
If I submit the following stand alone statement
new_data <- iris
, new_data is created.
I'm using RStudio IDE V2021.9.1.372 with R v4.1.2 on Windows 10.
Thanks for any insights.