To improve speed i create some general global data set that are always available. From time to time they need to be updated.
I am trying to do this in a function that i will call when the dataset needs to be updated.
Is there any way you can create a global dataset in a function in R? I am aware of the assign function, but I cannot get the function to work for a dataframe, only a variable.
How do i do that?
x <- c(1,2,3,4)
z <- function () x <- c(1,2,3,4,5,6,7,8,9,10)
now when i run z(), it should update x to (1...10)