Displaying 2 results from an estimated 2 matches for "calc_gg".
2017 Jul 20
2
dynamically create columns using a function
...create column names and fill those columns with some basic calculations. My function "demo_fn" takes argument "blup_datacut" and I like to use the contents of those arguments to dynamically create new columns in my dataset. Please note that I have another function called "calc_gg" within the function "demo_fn". Both functions are pasted below.
I have a for loop within my function and it appears to only create new column for the last value in the argument "blup_datacut" which makes me think that I am not storing the values coming out of for_loop corr...
2017 Jul 21
0
dynamically create columns using a function
...and fill those
> columns with some basic calculations. My function "demo_fn" takes argument
> "blup_datacut" and I like to use the contents of those arguments to
> dynamically create new columns in my dataset. Please note that I have
> another function called "calc_gg" within the function "demo_fn". Both
> functions are pasted below.
> I have a for loop within my function and it appears to only create new
> column for the last value in the argument "blup_datacut" which makes me
> think that I am not storing the values coming...