You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both create_node_df and add_node_df at the moment offer really little value to the user. Stripped to the core, a node df can be a character vector, with everything else being optional. One could just use a wrapper function to feed a character vector into create_node_df and if would work 100% of the time. The greatest offender is the required n argument for create_node_df which is nothing but an unnecessary math exercise. n is a function of the type or label argument. The way that the arguments are parsed also conceals the fact that the whole thing is nothing but a wrapper around a df with an id, type, and label column.
add_node_df should reflect the reality that users are capable of keeping track of types and labels themselves. Just allow the user to feed in a dataframe and require as a minimum no more than what is absolutely necessary to create a diagram--one column, either type or label with ID and everything else being optional. In fact, we don't need to even do any data validation here. As long as a meaningful error message is thrown, the average R user should really be able to figure out what is wrong.
The text was updated successfully, but these errors were encountered:
Both
create_node_df
andadd_node_df
at the moment offer really little value to the user. Stripped to the core, a node df can be a character vector, with everything else being optional. One could just use a wrapper function to feed a character vector intocreate_node_df
and if would work 100% of the time. The greatest offender is the requiredn
argument forcreate_node_df
which is nothing but an unnecessary math exercise.n
is a function of thetype
orlabel
argument. The way that the arguments are parsed also conceals the fact that the whole thing is nothing but a wrapper around a df with an id, type, and label column.add_node_df
should reflect the reality that users are capable of keeping track of types and labels themselves. Just allow the user to feed in a dataframe and require as a minimum no more than what is absolutely necessary to create a diagram--one column, eithertype
orlabel
with ID and everything else being optional. In fact, we don't need to even do any data validation here. As long as a meaningful error message is thrown, the average R user should really be able to figure out what is wrong.The text was updated successfully, but these errors were encountered: