Assn6_not relying on global variables

Assn6_not relying on global variables

by Raabez Ahmad -
Number of replies: 1

Hello, I am confused about how to not use global variables in the assignment.
Is calling dataframe$circ and dataframe$heights explicitly in functions not okay?
I am not assigning these columns to variables, just explicitly passing the extracted vector into functions I've made.
I am not sure of another way to put data into my functions.

Thank you,

Raabez

In reply to Raabez Ahmad

Re: Assn6_not relying on global variables

by Erik Spence -
Global variables can exist (and they will, in your driver script), but you must not access them directly from within your functions. You must pass those variables through the function's argument list, so that the information in the global variables is passed to local variables.