View source: R/goals_and_projections.R
add_accelerated_growth | R Documentation |
add_accelerated_growth
is a constructor function that adds a
"goals" object (a list with a goals
data frame, a join_by_fields
character vector, and slot_name
single element character vector) to
a mapvizieR
object. The goals object is added to a goals
slot in the mapvizieR
object. The goals themselves, as well as any
projections or simulations, are created by a "goals function" (see goal_kipp_tiered
for an example) that is passed as the goal_function argument
;
arguments to the goal_function
are passed via the goal_function_args
argument. Note well that the goal_function
must (i) return a list with
three elements (the goals data frame, the join_by_fields character vector,
and the slot_name) and (ii) the goals data frame must have at least fields named
accel_growth
and met_accel_growth
. If the updated_growth_df
is TRUE then the goals data frame is inner_join
ed with the
growth_df
using the join_by_fields
, accelerated growth columns are added or updated, and any
duplicate columns from the join are cleaned up (original columns from
the growth_df
are maintened). Obviouslly, the goals function should
return a one to one match on any first iterations.
add_accelerated_growth(mapvizier_object,
goal_function = goal_kipp_tiered,
goal_function_args = list(iterations = 1), update_growth_df = FALSE)
mapvizier_object |
a |
goal_function |
a function that returns a list containing a a data
frame named |
goal_function_args |
arguments passed to |
update_growth_df |
if |
a mapvizieR
object.
## Not run:
data(ex_CombinedAssessmentResults)
data(ex_CombinedStudentsBySchool)
cdf_mv <- mapvizieR(
ex_CombinedAssessmentResults,
ex_CombinedStudentsBySchool
)
new_mv <- add_accelerated_growth(
cdf_mv,
goal_function = goal_kipp_tiered,
goal_function_args = list(iterations=1),
update_growth_df = FALSE
)
str(new_mv)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.