I'm trying to build my first package, but the code that worked perfectly as just code doesn't work as a function. I want to have a function which also puts two empty dataframes into the environment. I need them to be empty since I'm using a loop which stores all it's information into those dataframes with rbind
with every iteration.
While the rest of the function runs through without an error message, it doesn't create any dataframes. Why does my function not return any objects?
I created a simplified example, I hope that's enough to demonstrate my problem.
a <- function(x){
object <- x
emptydf <- data.frame()
anotherdf <- data.frame()
}