We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
e.g.,
https://github.com/greta-dev/greta/blob/master/R/simulate.R#L65
target_node_names <- vapply(target_nodes, member, "unique_name", FUN.VALUE = character(1) ) object_node_names <- vapply(object$dag$node_list, member, "unique_name", FUN.VALUE = character(1) )
and
https://github.com/greta-dev/greta/blob/master/R/utils.R#L504
can be replaced with the new base::lengths
The text was updated successfully, but these errors were encountered:
In vapply, FUN.VALUE is sometimes “” and other times, character(1), is there a difference/benefit from doing this?
Sorry, something went wrong.
Same result, but I think I switched to character(1) as it makes the intent clearer
character(1)
Some common vapply patterns:
vapply(x, member, "unique_name")
vapply(x, identical, ...)
vapply(x, is.null, ...)
vapply(x, is.greta_array)
vapply(x, has_distribution, ...)
vapply(dot_nodes, is_scalar, logical(1))
vapply(x, member, "discrete")
classes <- vapply(x, class, "")
vapply(x, member, "multivariate")
vapply(names, deparse, "")
vapply(nodes, dag$tf_name, ...)
njtierney
Successfully merging a pull request may close this issue.
e.g.,
https://github.com/greta-dev/greta/blob/master/R/simulate.R#L65
and
can be replaced with the new base::lengths
The text was updated successfully, but these errors were encountered: