'Is it possible to know the size of a variable that is being created while the function is running?

I am very new to R and I was exploring a function in a library that download data from a server and leaves the data as dataframe.

The data are stored in a variable but as I want to download a big time series, I get an error in the function because exceeds the variable size as I understood.

I though making an iteration so the data can be stored in different variables as soon as exceed the size of the variable that is being create in the function.

So I would like to know if is it possible to know the size of the variable while the function is running, in order to be able to do it a condition?

Thanks a lot!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source